Configure Milestone AI Bridge analytics topics
An analytics topic is a named feed that the IVA application can send data to and each IVA application contains one or more analytics topics.
Analytics topics are used to analyze video sequences for recognizable patterns, for example car license plates, movement, appearance, etc. and to send data back from the IVA application through the Milestone AI Bridge to your XProtect VMS if configured to do so.
An IVA application can define a number of topics when it is registered in Milestone AI Bridge. By default, no topics are defined and you can add the topics you want by modifying the register.graphql file.
By subscribing to an analytics topic, your XProtect VMS can receive data sent from the IVA application and use it in your XProtect VMS for whatever purpose is appropriate for the data received, for example displaying a video sequence or triggering an event.
There are three types of topics an IVA application can register:
-
Event topics: The topic can send data back to your XProtect VMS. The data can then be used to trigger an event or an alarm, for example if an object (vehicle) is detected driving in the wrong direction, perhaps down a one-way street.
-
Metadata topics: The topic can send metadata back to your XProtect VMS, for example drawing a bounding box around detected objects.
-
Video topics: The topic can send processed video back to your XProtect VMS. The processed video can then be displayed like any other video stream in the VMS, for example a video stream can be sent back to the VMS where key identified areas of the original video have been blurred.
IVA applications
IVA applications can be created as self-registering or IVA applications that are not self-registering.
Self-registering IVA applications
Self-registering IVA applications have connection details embedded in the initialization of the IVA application itself and do not need to be manually provided, for example in the register.graphql file.
Self-registering IVA applications will register the application and all its topics and their configuration settings whenever the application itself is started.
Milestone recommends the use of self-registering IVA applications to improve the process when updating the application.
IVA applications that are not self-registering
IVA applications that are not self-registering will require the processing server to be started or restarted to register the application and all its topics and their configuration settings. The register.graphql file must be modified to include the registration for the IVA application in question. When the processing server is started or restarted, the register.graphql file will be read and all IVA applications correctly defined in the register.graphql file will registered.
This is especially relevant when changes are made to the configuration settings of the topics in already registered IVA applications.
Editing IVA application topic settings
The only way you can change the configuration settings of topics in an IVA application that is not self-registering is to edit the register.graphql file. Since the register.graphql file is only read when the processing server starts up, the processing server must be restarted to deploy the new topic configuration.
A self-registering IVA application will register any changes made to its topic configuration when the IVA application itself is started. This way, you will not need to restart the processing server if all you have done is edit a few topic configurations in the IVA applications.
Self-registering IVA application characteristics
A self-registering IVA application must query the endpoint register with the IVA application configuration data as well as with the unique identifier of the video management system the IVA application wants to register on.
You can obtain the unique identifier of your video management system by requesting the identifier in a GraphQL query.
GraphQL query example of a video management system ID request
query {
about {
videoManagementSystems {
id
}
}
}
The requested video management system ID can then be used to register the IVA application later in the GraphQL query as depicted in the example below.
Example of application of video management system ID in a GraphQL query
mutation {
register(
input: {
id: "<The vms id obtained from the about query>"
apps: {
id: "<An app id assigned by the app developer>"
url: "<An url to the app webservice for example>"
name: "<App name>"
description: "<App description>"
version: "<App version>"
manufacturer: {
name: "<Manufacturer name>"
}
eventTopics:[{
url: "<Path to topic handler>"
name: "<Topic name>"
description: "<Topic description>"
eventFormat: ANALYTICS_EVENT # there is one format
}],
metadataTopics:[{
url: "<Path to topic handler>"
name: "<Topic name>"
description: "<Topic description>"
metadataFormat: ONVIF_ANALYTICS # ONVIF_ANALYTICS, ONVIF_ANALYTICS_FRAME, DEEPSTREAM
}],
videoTopics:[{
url: "<Path to topic handler>"
name: "<Topic name>"
description: "<Topic description>"
videoCodec: H265 # MJPEG, H264 or H265
}]
}
}
) {
id
}
}
IVA application registration
When the IVA application is successfully registered, a status code 200 response with the unique identifier of the specified video management system will be displayed. Additionally, the topics of the IVA application are displayed in the Process server tab in XProtect Management Client.
If you do not receive the Status Code 200 response or if the IVA application topics are not displayed correctly, the IVA application may not be registered correctly, or the IVA topics themselves may not be configured correctly.
Editing self-registering IVA application settings
If you need to edit the configuration settings of a self-registering IVA application, including any topic configuration settings, you should edit the relevant sections of the GraphQL query for the IVA application instead of the register.graphql file.
Other ways of editing IVA application settings
Some IVA applications utilize their own configuration file which can be edited directly and some IVA applications contain internal configuration settings that are edited from within the IVA application.
For these IVA applications, you must update the IVA and/or topic configurations in the relevant places instead of the GraphQL query for the IVA application or the register.graphql file.
Adding and configuring Analytics topics
Milestone AI Bridge and its default IVA applications do not contain any pre-configured analytics topics, as topic configuration will depend on the IVA application itself and the analytics topics the application contains as well as the needs and requirements of your organization.
You can add and configure analytics topics to the IVA application by modifying the register.graphql file.
Topics and XProtect Management Client
The configured topics will be displayed in the XProtect Management Client on the Processing Server node and can be subscribed to through the XProtect Management Client.
If the IVA application contains a web interface that is exposed in the XProtect Management Client, you can perform additional configuration of the topic through the web interface from XProtect Management Client.