Data routing method, apparatus, device, and computer-readable storage medium

By receiving structured data from network cameras and routing it to the target service based on device identifiers, the problem of high customized development costs for intelligent IPC data transmission systems is solved, enabling cross-scenario data transmission and low-cost maintenance.

CN113407643BActive Publication Date: 2026-06-19TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2020-11-26
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

In existing technologies, the data transmission system of intelligent IPCs needs to be customized for each scenario, resulting in high development and maintenance costs and making it impossible to achieve universal data transmission across different scenarios.

Method used

By receiving structured data sent by network cameras, obtaining the registration information of target services using device identifiers, and pushing data to the corresponding target services according to the registration information, unified data routing is achieved.

Benefits of technology

It reduces the development and maintenance costs of data transmission systems, supports different business scenarios, expands the application scope of data routing methods, and enables the correct transmission of structured data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113407643B_ABST
    Figure CN113407643B_ABST
Patent Text Reader

Abstract

The application provides a data routing method, device and equipment and a computer readable storage medium; and is applied to the field of cloud technology. The method comprises the following steps: receiving structured data sent by a forwarding layer; the forwarding layer is used for receiving structured data sent by at least one network camera; the structured data comprises a device identifier of the network camera sending the structured data; obtaining registration information of at least one target service corresponding to the structured data according to the device identifier; and pushing the structured data to each target service respectively according to the registration information of each target service. Through the data routing method provided by the application, the maintenance cost and development cost of the service based on the network camera can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of surveillance technology, and in particular to a data routing method, apparatus, device, and computer-readable storage medium. Background Technology

[0002] With the rapid development of AI (Artificial Intelligence), the security monitoring industry, after undergoing transformations from analog to digital and from digital to high-definition, has also achieved the integration of artificial intelligence with security monitoring. The implementation of artificial intelligence in smart commerce and smart security relies on the development of intelligent IPCs (Internet Protocol Cameras), the core of which is image recognition technology. Through various intelligent video analysis technologies, the problem of traditional video analysis relying on manual video viewing is solved. This enables the structured extraction of effective information, allowing users of video analysis to truly move beyond manual security and retail work, ushering in a new era of intelligent security and smart retail.

[0003] In related technologies, applications of intelligent IPCs such as smart retail and smart security typically implement a separate data transmission system for each individual scenario. These data transmission systems involve numerous upstream and downstream components; for example, data uploading from the intelligent IPC and forwarding to downstream intelligent services via relay services are all customized for each scenario. It is evident that the data transmission systems in these technologies cannot achieve data transmission across different scenarios. Customized development is required for each scenario's data transmission system, resulting in high development and maintenance costs. Summary of the Invention

[0004] This application provides a data routing method, apparatus, device, and computer-readable storage medium, which can reduce the development and maintenance costs of data transmission systems.

[0005] The technical solution of this application embodiment is implemented as follows:

[0006] This application provides a data routing method, including: receiving structured data sent by a forwarding layer; the forwarding layer is used to receive structured data sent by at least one network camera; the structured data includes a device identifier of the network camera that sent the structured data; obtaining registration information of at least one target service corresponding to the structured data based on the device identifier; and pushing the structured data to each target service according to the registration information of each target service.

[0007] In some embodiments of this application, obtaining the registration information of at least one target service corresponding to structured data based on the device identifier includes: determining at least one task type in the task database based on the device identifier; determining at least one target service corresponding to at least one task type based on a preset mapping relationship between task types and service types; each task type corresponds to at least one target service of at least one service type; and querying the registration information of each target service in the task database.

[0008] In some embodiments of this application, the step of pushing structured data to each target service based on the registration information of each target service includes: when the service type of the target service is event push type, obtaining the subscription topic corresponding to the target service based on the registration information of the target service; generating a push event based on the subscription topic and structured data; persisting the push event to a message queue; and pushing the push event to the subscription service corresponding to the subscription topic through the message queue.

[0009] In some embodiments of this application, the step of pushing structured data to each target service based on the registration information of each target service includes: when the service type of the target service is task push type, obtaining the address information of the target service based on the registration information of the target service; the address information includes the network address and port information of the target service; and pushing the structured data to the target service based on the network address and port information of the target service.

[0010] In some embodiments of this application, the method further includes: obtaining parameter information of the target service based on the registration information of the target service; the parameter information includes service parameters and data format; the step of pushing structured data to the target service based on the network address and port information of the target service includes: extracting service parameters from the structured data; encapsulating the service parameters according to the data format to obtain encapsulated data; and pushing the encapsulated data to the target service based on the network address and port information of the target service.

[0011] In some embodiments of this application, the method further includes: receiving a registration request corresponding to a service to be registered; storing the task type and registration information of the service to be registered carried in the registration request, so as to determine the service to be registered as a registered service.

[0012] In some embodiments of this application, storing the task type and registration information of the service to be registered carried in the registration request to determine the service to be registered as a registered service includes: when the service type of the service to be registered is a task push type, obtaining the task type and registration information of the service to be registered carried in the registration request; the registration information includes address information and parameter information; storing the task type, address information and parameter information of the service to be registered in the task database to determine the service to be registered as a registered service.

[0013] In some embodiments of this application, storing the task type and registration information of the service to be registered carried in the registration request to determine the service to be registered as a registered service includes: if the service type of the service to be registered is an event push type, obtaining the task type and event topic of the service to be registered carried in the registration request; determining whether the registration request is valid according to a preset mapping relationship between task type and service type; if the registration request is valid, storing the task type and event topic of the service to be registered to determine the service to be registered as a registered service.

[0014] In some embodiments of this application, the method further includes: monitoring registration information change events of registered services; in response to registration information change events, extracting new registration information of registered services from the registration information change events; and storing the new registration information to complete the update of registered services.

[0015] This application provides a data routing device, the device comprising:

[0016] A service routing module is used to receive structured data sent by a forwarding layer; the forwarding layer is used to receive the structured data sent by at least one network camera; the structured data includes the device identifier of the network camera that sent the structured data;

[0017] The task management module is used to obtain the registration information of at least one target service corresponding to the structured data based on the device identifier;

[0018] The service routing module is also used to push the structured data to each of the target services in the service layer according to the registration information of each target service.

[0019] This application provides a data routing device, including:

[0020] Memory, used to store executable instructions;

[0021] The processor, when executing executable instructions stored in the memory, implements the data routing method provided in the embodiments of this application.

[0022] This application provides a computer-readable storage medium storing executable instructions for inducing a processor to execute and implement the data routing method provided in this application.

[0023] The embodiments of this application have the following beneficial effects:

[0024] This application embodiment receives structured data sent by all network cameras through a forwarding layer, enabling target services corresponding to different scenarios to share the same forwarding layer to acquire structured data, thereby reducing system development and maintenance costs. Simultaneously, by acquiring the device identifier corresponding to each piece of structured data, the registration information of at least one target service corresponding to each piece of structured data can be determined based on the device identifier, thus completing the correct routing of each piece of structured data. This achieves correct transmission of structured data when all network cameras share the same forwarding layer and service routing module, not only reducing development and maintenance costs but also supporting different business scenarios, expanding the application scope of the data routing method in this application. Attached Figure Description

[0025] Figure 1 This is a schematic diagram of an optional architecture of the data routing system provided in an embodiment of this application;

[0026] Figure 2 This is a schematic diagram of the structure of the data routing device provided in the embodiments of this application;

[0027] Figure 3 This is an optional flowchart illustrating the data routing method provided in an embodiment of this application;

[0028] Figure 4 This is an optional flowchart illustrating the data routing method provided in an embodiment of this application;

[0029] Figure 5 This is an optional flowchart illustrating the data routing method provided in an embodiment of this application;

[0030] Figure 6 This is an optional flowchart illustrating the data routing method provided in an embodiment of this application;

[0031] Figure 7 This is an optional flowchart illustrating the data routing method provided in an embodiment of this application;

[0032] Figure 8 This is an optional flowchart illustrating the data routing method provided in an embodiment of this application;

[0033] Figure 9 This is an optional flowchart illustrating the data routing method provided in an embodiment of this application;

[0034] Figure 10 This is a schematic diagram of the architecture of an optional data routing system provided in an embodiment of this application;

[0035] Figure 11 This is a schematic diagram of the principle of the intelligent service registrar provided in the embodiments of this application. Detailed Implementation

[0036] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0037] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0038] In the following description, the terms "first, second, third" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described in this embodiment can be implemented in an order other than that illustrated or described in this embodiment.

[0039] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0040] In the implementation of this application, the collection and processing of relevant data should strictly comply with the requirements of relevant laws and regulations, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of laws and regulations and the authorization of the personal information subject.

[0041] See Figure 1 , Figure 1 This is an optional architecture diagram of the data routing system 100 provided in the embodiments of this application. In order to support a data routing application, the data receiving end (exemplarily shown as receiving end 400-1 and receiving end 400-2) is connected to the server 200 through the network 300. The network 300 can be a wide area network or a local area network, or a combination of the two. Figure 1 The embodiment also shows that server 200 can be a server cluster, which includes servers 200-1 to 200-3. Similarly, servers 200-1 to 200-3 can be physical machines or virtual machines built using virtualization technologies (such as container technology and virtual machine technology). This embodiment does not limit this; of course, a single server can also be used to provide services in this embodiment. Server 200 can receive structured data sent by data sender 600 and route the structured data to the corresponding data receiver.

[0042] The embodiments of this application can be implemented with the help of cloud technology, which refers to a hosting technology that unifies a series of resources such as hardware, software, and network within a wide area network or local area network to realize the computation, storage, processing, and sharing of data.

[0043] Cloud technology is a collective term for network technology, information technology, integration technology, management platform technology, and application technology applied to the cloud computing business model. It can form resource pools, allowing for on-demand, flexible, and convenient use. Cloud computing technology will become a crucial support. The backend services of technical network systems require substantial computing and storage resources; for example, the portal websites of educational systems.

[0044] As an example, server 200 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, or smartwatch, but is not limited to these. The terminal and server 200 can be directly or indirectly connected via wired or wireless communication, which is not limited in this embodiment.

[0045] See Figure 2 , Figure 2 This is a schematic diagram of the structure of the data routing device 500 provided in an embodiment of this application. Figure 2 The data routing device 500 shown includes at least one processor 510, a memory 550, at least one network interface 520, and a user interface 530. The various components in the data routing device 500 are coupled together via a bus system 540. It is understood that the bus system 540 is used to implement communication between these components. In addition to a data bus, the bus system 540 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 2 The general labeled all buses as Bus System 540.

[0046] The processor 510 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.

[0047] User interface 530 includes one or more output devices 531 that enable the presentation of media content, including one or more speakers and / or one or more visual displays. User interface 530 also includes one or more input devices 532, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.

[0048] Memory 550 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), and the volatile memory may be random access memory (RAM). The memory 550 described in this application embodiment is intended to include any suitable type of memory. Memory 550 may optionally include one or more storage devices physically located away from processor 510.

[0049] In some embodiments of this application, memory 550 is capable of storing data to support various operations. Examples of such data include programs, modules, and data structures, or subsets or supersets thereof, as illustrated below.

[0050] Operating system 551 includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, driver layer, etc., for implementing various basic business functions and handling hardware-based tasks;

[0051] The network communication module 552 is used to reach other computing devices via one or more (wired or wireless) network interfaces 520, exemplary network interfaces 520 including: Bluetooth, WiFi, and Universal Serial Bus (USB), etc.

[0052] Display module 553 is configured to enable the presentation of information (e.g., user interface for operating peripheral devices and displaying content and information) via one or more output devices 531 (e.g., display screen, speaker, etc.) associated with user interface 530.

[0053] The input processing module 554 is used to detect and translate one or more user inputs or interactions from one or more input devices 532.

[0054] In some embodiments of this application, the data routing device provided in the embodiments of this application can be implemented in a combination of hardware and software. As an example, the data routing device provided in the embodiments of this application can be a processor in the form of a hardware decoding processor, which is programmed to execute the data routing method provided in the embodiments of this application.

[0055] In some embodiments of this application, the data routing device provided in this application can be implemented in software. Figure 2 A data routing device 555 stored in memory 550 is shown. It can be software in the form of programs and plug-ins, including the following software modules: service routing module 5551, task management module 5552, and registration module 5553. These modules are logical and can therefore be arbitrarily combined or further split according to the functions they implement.

[0056] The functions of each module will be explained below.

[0057] In other embodiments, the apparatus provided in this application can be implemented in hardware. As an example, the apparatus provided in this application can be a processor in the form of a hardware decoding processor, which is programmed to execute the data routing method provided in this application. For example, the processor in the form of a hardware decoding processor can be one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.

[0058] In conjunction with the exemplary applications and implementations of the server provided in the embodiments of this application, the data routing method provided in the embodiments of this application will be described with the server as the execution subject.

[0059] See Figure 3 , Figure 3 This is an optional flowchart illustrating the data routing method provided in this application embodiment, which will be combined with... Figure 3 The steps shown are explained.

[0060] In step 301, structured data sent by the forwarding layer is received; the forwarding layer is used to receive structured data sent by at least one network camera; the structured data includes the device identifier of the network camera that sent the structured data.

[0061] In some embodiments of this application, the forwarding layer is connected to at least one network camera. Each network camera, after collecting real-time data, generates structured data corresponding to that network camera based on its own device identifier and the real-time data, and sends the generated structured data to the forwarding layer. Upon receiving the structured data sent by at least one network camera, the forwarding layer extracts the device identifier carried in each structured data segment to determine the device identifier corresponding to each segment.

[0062] It should be noted that since the corresponding network camera can be identified through the device identifier, and each network camera's information is also unique, including camera type, location, and function, obtaining the device identifier allows us to determine the specific purpose of the corresponding structured data.

[0063] In some embodiments of this application, the network camera is an intelligent camera. This intelligent camera can perform preliminary intelligent recognition on the raw video data. The raw video is unstructured data; the target objects in the raw video can only be identified by human viewing and cannot be directly read and identified by electronic devices. Therefore, the intelligent camera analyzes the raw video to extract structured data. This extraction can be achieved using analysis techniques such as target detection, feature extraction, object recognition, and deep learning. The structured data can include the target object's tag information, trajectory information, etc.

[0064] In step 302, registration information of at least one target service corresponding to the structured data is obtained based on the device identifier.

[0065] In some embodiments of this application, the server can determine at least one target service that needs to use the structured data based on the device identifier. The step of obtaining the registration information of at least one target service can be implemented by sending a query request to the storage layer, so that the storage layer determines the service identifier of at least one target service corresponding to the device identifier based on the device identifier carried in the query request and the stored matching relationship, and obtains the registration information of the corresponding at least one target service based on the at least one service identifier. The storage layer can be located within the server or within other services used for data storage. The storage layer can store the aforementioned matching relationship using a Redis database, and this matching relationship includes the matching relationship between each of multiple device identifiers and at least one target service.

[0066] In some embodiments of this application, the registration information is used to determine the interface address through which the target service receives structured data. The target service can receive the structured data through this interface address, and the interface address of each target service is unique.

[0067] In some embodiments of this application, the target service may be an event push service or a task push service.

[0068] In the case where the target service is a task-push type service, the task-push type service generates an analysis task based on the received structured data. This analysis task is used to further analyze the structured data to generate analysis results for the scenario corresponding to the target service. This analysis task often requires an analysis server for the scenario corresponding to the target service to complete. Therefore, the registration information may include the network address and port information corresponding to the target service, that is, the network address and port information corresponding to the analysis server. The task-push type service includes, but is not limited to, at least one of the following: security deployment, security record keeping, security pedestrian database, commercial customer flow analysis, security snapshot push, commercial preview image push, and commercial self-registration.

[0069] When the target service is an event-push type service, it directly generates an event task based on the received structured data, saves the event task to a message queue, and pushes the event task to at least one subscriber that has subscribed to the event task through the message queue. Therefore, the registration information can be the subscription topic corresponding to the target service. This event-push type service includes, but is not limited to, at least one of the following: security snapshot image push and commercial preview image push.

[0070] In some embodiments of this application, the correspondence between device identifiers and target services can be one device identifier corresponding to at least one target service, or multiple device identifiers corresponding to one target service.

[0071] In step 303, structured data is pushed to each target service according to the registration information of each target service.

[0072] In some embodiments of this application, based on the registration information of each target service corresponding to the device identifier, since the registration information is used to determine the interface address of the target service to receive the structured data, the structured data can be pushed to each target service respectively through each registration information.

[0073] Through the embodiments of this application, for Figure 3As can be seen from the above exemplary implementation, the embodiments of this application receive structured data sent by all network cameras through a forwarding layer, enabling target services corresponding to different scenarios to share the forwarding layer to acquire structured data, thereby reducing the development and maintenance costs of the system. At the same time, since the device identifier corresponding to each structured data is obtained, the registration information of at least one target service corresponding to each structured data can be determined based on the device identifier to complete the correct routing of each structured data. This achieves the correct transmission of structured data when all network cameras share the same forwarding layer and service routing module, which not only reduces development and maintenance costs but also supports different business scenarios, expanding the application scope of the data routing method of this application.

[0074] In some embodiments of this application, see Figure 4 , Figure 4 This is an optional flowchart illustrating the data routing method provided in an embodiment of this application, based on... Figure 3 , Figure 3 The illustrated step 302 can be updated to steps 401 to 403, combining Figure 4 The steps shown are explained.

[0075] In step 401, at least one task type is determined in the task database based on the device identifier.

[0076] In some embodiments of this application, the task database may be located in the server; the task database may also be located in a storage layer used for storing data, and the storage layer may be implemented by at least one storage database.

[0077] In some embodiments of this application, for all network cameras connected to the forwarding layer, the task database sets a task type corresponding to the device identifier of each network camera. Specifically, a network camera's device identifier may correspond to at least one task type.

[0078] For example, this task type can include seven categories: security deployment, security record keeping, security pedestrian database, commercial customer flow analysis, security snapshot push, commercial preview image push, and commercial self-registration. For a network camera's device identifier X1, X1 can correspond to a unique task type, or it can correspond to two or more task types. For example, X1 can correspond to security deployment; X1 can also correspond to both commercial preview image push and commercial self-registration simultaneously.

[0079] In step 402, at least one target service corresponding to at least one task type is determined according to the preset mapping relationship between task type and service type; each task type corresponds to at least one target service of service type.

[0080] In some embodiments of this application, for each task type in the task database, each task type may correspond to at least one service type. That is, when the service types include both event push type and task push type, a task type may correspond only to the event push type, only to the task push type, or simultaneously to both. Accordingly, the at least one target service may include the target service corresponding to each task type.

[0081] For example, based on the above examples, when the task type can include security deployment, security filing, security pedestrian database, commercial customer flow analysis, security snapshot push, commercial preview image push, and commercial self-registration, then security deployment, security filing, security pedestrian database, commercial customer flow analysis, and commercial self-registration can each correspond to only one service type (task push type), while security snapshot push and commercial preview image push can each correspond to two service types simultaneously. If device identifier X1 can also simultaneously correspond to commercial preview image push and commercial self-registration, the target service corresponding to device identifier X1 can include a target service with a task type of commercial preview image push and a service type of event push, a target service with a task type of commercial preview image push and a service type of task push, and a target service with a task type of commercial self-registration push and a service type of task push.

[0082] In step 403, the registration information of each target service is queried in the task database.

[0083] In some embodiments of this application, after determining at least one target service corresponding to the device identifier, the registration information corresponding to the service identifier can be obtained from the task database based on the service identifier corresponding to each target service, so as to determine the registration information of each target service.

[0084] Through the embodiments of this application, for Figure 4 As can be seen from the above exemplary implementation, this application embodiment, by setting a mapping relationship between task types and service types in the task database, can further determine at least one target service corresponding to the device identifier after obtaining at least one task type corresponding to the device identifier, thus realizing different service types. The sharing of structured data sent by a network camera by target services of different task types improves adaptability to complex application scenarios; furthermore, by storing the registration information of each target service in the task database, a data foundation can be provided for the correct routing of subsequent structured data.

[0085] In some embodiments of this application, see Figure 5 , Figure 5 This is an optional flowchart illustrating the data routing method provided in an embodiment of this application, based on... Figure 4 , Figure 4 The step 303 shown can be updated to steps 501 to 503, which will be combined Figure 5 The steps shown are explained.

[0086] In step 501, if the service type of the target service is event push, the subscription topic corresponding to the target service is obtained based on the registration information of the target service.

[0087] In some embodiments of this application, when the service type of the target service is event push, the registration information corresponding to the target service is the subscription topic corresponding to the target service. The subscription topic corresponding to each target service is preset by the administrator.

[0088] In step 502, push events are generated based on the subscribed topics and structured data.

[0089] In some embodiments of this application, for the target service of this event push type, the target service simply pushes the raw structured data as an event message to the subscribers who subscribe to the target service. Therefore, the server does not need to process the structured data further, but only needs to generate a push event based on the subscription topic corresponding to the target service and the structured data.

[0090] In step 503, the push event is persisted to a message queue, and the push event is pushed to the subscription service corresponding to the subscribed topic through the message queue.

[0091] In some embodiments of this application, the message queue is used to push events in the queue to the subscription service corresponding to the subscription topic carried by the event. The subscription service corresponding to the subscription topic is one that pushes events to at least one subscriber that has subscribed to the subscription topic. This message queue can be implemented using a Kafka cluster.

[0092] For example, if the subscription topic corresponding to the target service is topicA, the server generates a corresponding push event based on topicA and the structured data, and saves the push event to the message queue in the Kafka cluster. During the process of pushing the push event, the message queue can determine at least one subscriber to topicA according to the preset push rules, and push the push event to the at least one subscriber.

[0093] Through the embodiments of this application, for Figure 5As can be seen from the above exemplary implementation, the embodiments of this application obtain the subscription topic of the target service of the event push type, generate a push event based on the subscription topic and structured data, and push the push event to at least one subscriber who subscribes to the subscription topic through a preset message queue, thereby increasing the data push form of the data routing method of this application. Since the event push method is adopted, the push efficiency of structured data can be improved.

[0094] In some embodiments of this application, see Figure 6 , Figure 6 This is an optional flowchart illustrating the data routing method provided in an embodiment of this application, based on... Figure 4 , Figure 4 The step 303 shown can be updated to steps 601 to 603, which will be combined with Figure 6 The steps shown are explained.

[0095] In step 601, if the service type of the target service is task push, the address information of the target service is obtained based on the registration information of the target service; the address information includes the network address and port information of the target service.

[0096] In some embodiments of this application, when the service type of the target service is task push, the registration information includes the network address and port information corresponding to the target service. This registration information can be obtained by the server through a service registration request sent by the target service during the registration process.

[0097] In step 602, structured data is pushed to the target service based on the network address and port information of the target service.

[0098] In some embodiments of this application, each target service corresponds to a network address and port information. The target service can receive the structured data corresponding to the target service through the network address and port information, and further analyze and process the structured data to obtain the analysis results.

[0099] Through the embodiments of this application, for Figure 6 As can be seen from the above exemplary implementation, the embodiments of this application obtain the network address and port information of the target service of the task push type, and push the structured data to the target service based on the network address and port information of the target service, thereby increasing the data push form of the data routing method of this application. Since the task push method is adopted, the target service of the task push type can easily obtain accurate structured data and generate corresponding intelligent analysis results, thereby improving the push efficiency of structured data.

[0100] In some embodiments of this application, see Figure 7, Figure 7 This is an optional flowchart illustrating the data routing method provided in an embodiment of this application, based on... Figure 4 , Figure 4 The step 303 shown can be updated to steps 701 to 703, which will be combined with Figure 7 The steps shown are explained.

[0101] In step 701, if the service type of the target service is task push, the address information and parameter information of the target service are obtained based on the registration information of the target service; the parameter information includes service parameters and data format; the address information includes the network address and port information of the target service.

[0102] In some embodiments of this application, the registration information can be obtained by the server through a service registration request sent by the target service during the registration process between the target service and the server. Specifically, the registration information is used to determine the transmission path of the structured data, and the parameter information is used to determine the processing method for the structured data.

[0103] It should be noted that the original structured data may include all the analysis data corresponding to the original camera data. However, for the target service in a specific scenario, not all the analysis data or the original structured data is required. Therefore, before transmitting the structured data to the target service, the original structured data can be filtered, reorganized, and encapsulated based on this parameter information.

[0104] In step 702, service parameters are extracted from the structured data; the service parameters are encapsulated according to the data format to obtain encapsulated data; and the encapsulated data is pushed to the target service based on the network address and port information of the target service.

[0105] In some embodiments of this application, based on the service parameter, the parameters required by the target service are determined, and other parameters other than the service parameter are removed from the structured data, leaving only the service parameter, in order to complete the extraction of the service parameter.

[0106] In some embodiments of this application, the extracted service parameters are encapsulated according to this data format to obtain corresponding encapsulated data. The encapsulated data is then pushed to the target service using the target service's network address and port information. This data format can be a data encapsulation method, encryption method, etc. This data format allows for further encapsulation of the service parameters, generating encapsulated data that only the target service can recognize, thereby improving the security of service parameter transmission.

[0107] For example, if there is original structured data including pedestrian analysis data, road analysis data, and vehicle analysis data, and the target service is a security pedestrian database type, the service parameter corresponding to the target service is pedestrian analysis data. Therefore, based on this service parameter, the original structured data can be processed to remove unnecessary road analysis data and vehicle analysis data, and the pedestrian analysis data can be encapsulated according to the data format corresponding to the target service to obtain encapsulated data that only includes pedestrian analysis data.

[0108] Through the embodiments of this application, for Figure 7 As can be seen from the above exemplary implementation, by obtaining the service parameters of the target service for each task push type, the original structured data can be processed to remove invalid data that is not needed by the target service and only the service parameters required by the target service can be transmitted. This can save the amount of data transmitted over the network, save bandwidth, and improve routing efficiency. At the same time, by obtaining the data format of the target service for each task push type and further encapsulating the service parameters of each target service according to the data format, this can not only meet the data format requirements of the target service, but also improve the security of data transmission.

[0109] In some embodiments of this application, see Figure 8 , Figure 8 This is an optional flowchart illustrating the data routing method provided in an embodiment of this application, based on... Figure 3 As with the above embodiments, steps 801 and 802 may be included between any steps to... Figure 3 Taking step 303 in the example, we will combine... Figure 8 The steps shown are explained.

[0110] In step 801, a registration request corresponding to the service to be registered is received.

[0111] In some embodiments of this application, the server may further include a service registrar, which is an extensible registrar plugin in the server. If the registrar plugin is installed in the server, the registration function of the service to be registered can be supported.

[0112] In step 802, the task type and registration information of the service to be registered carried in the registration request are stored to determine the service to be registered as a registered service.

[0113] In some embodiments of this application, step 802 can be implemented as follows: In step 8021, if the service type of the service to be registered is a task push type, the task type and registration information of the service to be registered carried in the registration request are obtained; the registration information includes address information and parameter information; the task type, address information and parameter information of the service to be registered are stored in the task database to determine the service to be registered as a registered service.

[0114] In some embodiments of this application, step 802 can be implemented as follows: In step 8022, if the service type of the service to be registered is an event push type, the task type and event topic of the service to be registered carried in the registration request are obtained; according to the preset mapping relationship between task type and service type, it is determined whether the registration request is valid; if the registration request is valid, the task type and event topic of the service to be registered are stored to determine the service to be registered as a registered service.

[0115] Through the embodiments of this application, for Figure 8 As can be seen from the above exemplary implementation, the embodiments of this application realize the scalability of the data routing method of this application by receiving the registration request of the service to be registered and implementing the registration process of the service to be registered according to the task type and registration information in the registration request. When a new service is needed, there is no need to re-develop the customized service. It is only necessary to save the task type and registration information of the service to be registered carried in the registration request to complete the registration process of the new service, thereby reducing the registration cost and improving the service registration efficiency.

[0116] In some embodiments of this application, see Figure 9 , Figure 9 This is an optional flowchart illustrating the data routing method provided in an embodiment of this application, based on... Figure 3 As with the above embodiments, steps 901 and 902 may be included between any steps to... Figure 3 Taking step 303 in the example, we will combine... Figure 9 The steps shown are explained.

[0117] In step 901, a registration request corresponding to the service to be registered is received.

[0118] In step 902, the task type and registration information of the service to be registered carried in the registration request are stored to determine the service to be registered as a registered service.

[0119] In some embodiments of this application, when the service type of the service to be registered is a task push type, the task type and registration information of the service to be registered carried in the registration request are obtained; the registration information includes address information and parameter information; the task type, address information and parameter information of the service to be registered are stored in the task database to determine the service to be registered as a registered service.

[0120] In some embodiments of this application, when the service type of the service to be registered is an event push type, the task type and event topic of the service to be registered carried in the registration request are obtained; the validity of the registration request is determined according to the preset mapping relationship between task type and service type; if the registration request is valid, the task type and event topic of the service to be registered are stored to determine the service to be registered as a registered service.

[0121] In step 903, monitor registration information change events for registered services.

[0122] In some embodiments of this application, changes to the registration information can be monitored using a service discovery mechanism. After a registered service completes its registration, it needs to periodically report heartbeat messages to the server, which can then determine whether the registered service is still alive based on these heartbeat messages. This service discovery mechanism can be implemented using the ZooKeeper component.

[0123] In step 904, in response to the registration information change event, the new registration information of the registered services in the registration information change event is extracted.

[0124] In some embodiments of this application, the server can monitor a registered service by subscribing to its registration information change events. Specifically, when the registration information of a registered service changes, it reports a registration information change event carrying the new registration information through a service discovery mechanism. The server, as a service consumer subscribing to this event, can obtain the new registration information through the registration information change event. Accordingly, the registered service is the service provider.

[0125] In step 905, the new registration information is stored to complete the update of the registered services.

[0126] In some embodiments of this application, while storing new registration information, the previously stored historical registration information of the registered service is deleted. In subsequent routing and forwarding processes, the structured data is routed according to the new registration information.

[0127] Through the embodiments of this application, for Figure 9As can be seen from the above exemplary implementation, by monitoring the registration information change events of each registered service, the embodiments of this application can update the registered service in the server in real time when the registered service undergoes data changes, network address changes, or disconnection changes, so as to facilitate the correct routing of subsequent structured data.

[0128] The following will describe an exemplary application of the embodiments of this application in a real-world application scenario.

[0129] In recent years, big data, cloud computing, and next-generation information technologies have become standard features in the operation of advanced businesses. Smart commerce has emerged as a new development trend, with many businesses actively developing their business intelligence strategies. Among these, artificial intelligence (AI) is being widely used in an increasing number of business sectors. Businesses leverage AI's powerful data collection and analysis capabilities, such as automatically identifying members, statistically analyzing customer attributes including age and gender, and analyzing customer flow heatmaps to see where users linger the longest. This allows for more personalized recommendations to users, leading to better profitability and optimized customer experience.

[0130] Over the past 20 years of rapid development, the security industry has undergone a transformation from analog to digital, and from digital to high-definition. 2017 marked the "Year Zero of AI in Security." Although the overall level of artificial intelligence is still in its early stages, this has not prevented its widespread application and significant success in specific fields (such as security). The implementation of artificial intelligence in smart commerce and smart security relies on the development of intelligent IPCs, which are next-generation network cameras. The core of intelligent IPCs is image recognition technology. Through various intelligent video analysis technologies, the problem of traditional video analysis relying on manual video viewing is solved, enabling the structured extraction of effective information. This allows users of video analysis to truly say goodbye to manual security and retail, and enter a new era of intelligent security and smart retail.

[0131] Currently, applications of intelligent IPCs, such as smart retail and smart security, are implemented with a separate system for each individual scenario. These systems involve numerous upstream and downstream links; for example, data uploading from intelligent IPCs and forwarding to downstream intelligent services are customized for each scenario. However, the difference between smart retail and smart security lies only in the application scenarios themselves. Specifically, only the downstream intelligent services (including security deployment, business self-registration, and customer flow statistics) differ, while the data uploading and forwarding of intelligent IPCs remain the same across different scenarios. This lack of reusability of upstream and downstream services across different scenarios leads to significant additional overhead.

[0132] Existing solutions are generally based on a specific application scenario, such as smart commerce, with customized development from data uploading by intelligent IPCs to forwarding by relay services. This approach results in as many customized development sets as there are application scenarios, significantly increasing maintenance and development costs, and also increasing the implementation costs of smart commerce and smart security scenarios.

[0133] In response to the aforementioned problems and the shortcomings of existing solutions, the applicant has proposed a data routing method and a data routing system after conducting research.

[0134] Please see Figure 10 The diagram shows an architecture of a data routing system, wherein the data routing system A10 includes an access forwarding layer A11, a service routing module A12, a task management module A13, and a service layer A14.

[0135] The service routing module A12 is a bus-type intelligent data routing module for IPC video streams. As a bus-type intelligent data routing module, it can provide routing for IPC video streams for all intelligent services in two major scenarios: commercial and security. The bus-type intelligent routing module includes the push of commercial / security events and bus-type data routing for intelligent services in different scenarios (commercial and security). In this embodiment, the service routing module can support data routing for various types of tasks, including: security deployment, security documentation, security pedestrian database, commercial customer flow analysis, security snapshot push, commercial preview image push, and commercial self-registration.

[0136] The upstream of the service routing module A12 is the access forwarding layer A11, which is used to receive smart camera data sent by at least one network camera. The smart camera data can be video stream data, image data, text data, etc.

[0137] Downstream of the service routing module A12 is the service layer A14, which can include task push services and event push services. The task push services are intelligent services with AI algorithm capabilities, such as facial recognition and automatic file creation.

[0138] The service routing module A12 can also be connected to the task management module A13. The task management module A13 is used to write task data into the storage layer A15, so that the service routing module A12 can query real-time tasks in the storage layer A15. The task management module A13 is also used to send real-time tasks to the access forwarding layer A11, so that the access forwarding layer A11 can obtain the smart camera data corresponding to the real-time task.

[0139] in, Figure 10Automatic service discovery is applied in two places in this embodiment: 1) the access forwarding layer can discover the intelligent service scheduling module and obtain its IP address; 2) the intelligent service scheduling module interacts with downstream intelligent services. This can be implemented using a ZooKeeper component.

[0140] The distributed service framework leverages ZooKeeper for service registration and dynamic discovery based on service names, with ZooKeeper acting as the service registry. The logic is as follows: service providers register their services with ZooKeeper and periodically send heartbeat messages to the registry to prove they are alive. Service consumers, or clients, retrieve the service registration information upon startup and subscribe to data and node changes at a specific path. Thus, if a service provider changes, ZooKeeper notifies the service consumer, which then updates its locally cached downstream service address information.

[0141] In this process, the access forwarding layer sends data to the intelligent service scheduling module, which can be understood as the intelligent service scheduling module being the service provider, and the upstream access forwarding layer being the service consumer. Similarly, the intelligent service scheduling module sends data to the downstream intelligent service module, which can also be understood as the downstream intelligent service being the service provider, and the upstream intelligent service scheduling module being the service consumer.

[0142] In some embodiments of this application, the access forwarding layer A11 receives JSON data from the network camera, and the JSON data from the access forwarding layer A11 is the raw data of the IPC video stream. This smart camera data may include device identification data (“did” field) and structured data (“payload” field). The “did” field represents a unique device identifier (IPC device id) for the smart camera, i.e., device information; the “payload” field contains all the smart data carried by the smart camera data.

[0143] The JSON data here has only undergone formatting by the access forwarding layer A11, including device identification data and structured data. Each JSON data piece corresponds to both device identification data and structured data. The structured data consists of attribute data corresponding to the object identified in the smart camera's data. For example, if the object is a pedestrian, the corresponding attribute data could be age, gender, height, clothing, etc.

[0144] In some embodiments of this application, the service routing module A12 receives JSON data from the upstream access forwarding layer A11, obtains the "did" information from the JSON data, and interacts with the task management module A13 through the storage layer A15 based on the "did" information to query real-time tasks. The storage layer A15 can be implemented using a Redis database. During the database query process, the "did" information can be used as a matching condition (key) to query specific "action" information. Each "action" represents a different intelligent service, as shown in Figure A141, which exemplarily displays intelligent services such as "file creation," "self-registration," and "business analysis." When a specific intelligent service task to be executed is found, the service routing module A12 processes the "payload" information in the JSON data. Specifically, it can filter, reorganize, and encapsulate the obtained "payload" information according to the registration information of each intelligent service to the intelligent service routing module, so as to route the intelligent service A141 in the service layer A14 according to the agreed data format.

[0145] The database in storage layer A15 contains at least one task, and each task includes a mapping between a service and multiple devices; that is, each task includes a mapping between a service and multiple device identifiers. Service routing module A12 can forward received JSON data to the target service corresponding to the device identifier based on the mapping in the database.

[0146] In some embodiments of this application, besides the intelligent service A141, data received from the intelligent camera at the access forwarding layer A11 may not be processed by the service routing module A12. For example, commercial screenshots and security snapshots may not be processed by the service routing module A12; instead, the service routing module A12 directly pushes the events. The events can be persisted to the message queue of the Kafka cluster A142.

[0147] As can be seen from the above embodiments, the service routing module A12 has a similar function to the "data bus", providing routing services for upstream smart camera data and downstream various types of smart services A141 or message queues in the Kafka cluster A142.

[0148] In some embodiments of this application, the data routing system A10 may further include a smart service registrar, which is an extensible registrar plugin in the service routing module A12. This plugin supports the registration of other custom routing tasks, thereby enabling the scalability of the service routing module. As a plugin, the smart service registrar allows registration to be completed by modifying a configuration file. When a new smart service A141 registers with the service routing module A12, it needs to provide its path information. This allows the service routing module A12 to obtain the address information of the smart service, which includes the port and IP address.

[0149] Please see Figure 11 The diagram illustrates the principle of the smart service registrar. The smart service registrar B11 can receive registration requests from service provider B12. During the registration process, service provider B12 needs to send a registration request carrying registration information to the registrar B11. This registration information includes the service parameters and data format of the smart service corresponding to service provider B12. In the actual routing process, service consumer B13 can be the service routing module in the above embodiment. Service consumer B13 can process the obtained smart camera data according to the registration information. Specifically, it can filter and reorganize the smart camera data according to the service parameters, encapsulate the filtered and reorganized smart camera data according to the data format, and finally send the encapsulated data to service provider B12.

[0150] In some embodiments of this application, the service routing module A12 serves as the hub and center for data transmission, supporting data relay throughout the system. Due to the high performance requirements, the applicant has conducted extensive research and implemented numerous performance optimizations and high-availability designs. Specifically, the data routing system provided in this application employs an asynchronous communication mode, introduces a thread pool, and adds a thread-safe LRU caching mechanism, enabling it to handle forwarding requests for over 4000 smart camera data per second, thus completing the routing of data from over 4000 smart cameras. Furthermore, high-availability optimizations such as Kafka cluster mode, Redis sentinel mode, automatic reconnection after disconnection using the zkclient C++ SDK, and probe mode service status monitoring enhance the stability of the data routing system and enable automatic disaster recovery.

[0151] The data routing method and system provided in the above embodiments can cover various typical intelligent service data routing and event push routing in both commercial and security scenarios. Simultaneously, an intelligent service registrar is provided. Since this intelligent service registrar is an extensible registrar plugin, it can support the registration of other custom services, thereby achieving the scalability of the service routing module. Due to the adoption of a generalized module design, it not only supports different business scenarios but also eliminates the need for customized development, saving development and maintenance costs.

[0152] The following description continues to illustrate the exemplary structure of the data routing device 555 provided in the embodiments of this application as a software module. In some embodiments of this application, such as... Figure 2 As shown, the software module stored in the data routing device 555 of the memory 550 may include:

[0153] The service routing module 5551 is used to receive structured data sent by the forwarding layer; the forwarding layer is used to receive the structured data sent by at least one network camera; the structured data includes the device identifier of the network camera that sent the structured data;

[0154] Task management module 5552 is used to obtain registration information of at least one target service corresponding to the structured data based on the device identifier;

[0155] The service routing module 5551 is further configured to push the structured data to each of the target services in the service layer according to the registration information of each target service.

[0156] In some embodiments of this application, the task management module 5552 is further configured to determine at least one task type in the task database based on the device identifier; determine at least one target service corresponding to at least one task type based on a preset mapping relationship between task types and service types; each task type corresponds to at least one target service of a service type; and query the registration information of each target service in the task database.

[0157] In some embodiments of this application, the service routing module 5551 is further configured to, when the service type of the target service is event push type, obtain the subscription topic corresponding to the target service based on the registration information of the target service; generate a push event based on the subscription topic and structured data; persist the push event to a message queue; and push the push event to the subscription service corresponding to the subscription topic through the message queue.

[0158] In some embodiments of this application, the service routing module 5551 is further configured to, when the service type of the target service is task push type, obtain the address information of the target service based on the registration information of the target service; the address information includes the network address and port information of the target service; and push structured data to the target service based on the network address and port information of the target service.

[0159] In some embodiments of this application, the service routing module 5551 is further configured to obtain parameter information of the target service based on the registration information of the target service; the parameter information includes service parameters and data format; extract service parameters from structured data; encapsulate the service parameters according to the data format to obtain encapsulated data; and push the encapsulated data to the target service based on the network address and port information of the target service.

[0160] In some embodiments of this application, the data routing device 555 further includes a registration module 5553.

[0161] The registration module 5553 is used to receive the registration request corresponding to the service to be registered; and to store the task type and registration information of the service to be registered carried in the registration request, so as to determine the service to be registered as a registered service.

[0162] In some embodiments of this application, the registration module 5553 is further configured to, when the service type of the service to be registered is a task push type, obtain the task type and registration information of the service to be registered carried in the registration request; the registration information includes address information and parameter information; and store the task type, address information and parameter information of the service to be registered in the task database to determine the service to be registered as a registered service.

[0163] In some embodiments of this application, the registration module 5553 is further configured to, when the service type of the service to be registered is an event push type, obtain the task type and event topic of the service to be registered carried in the registration request; determine whether the registration request is valid according to the preset mapping relationship between task type and service type; and, if the registration request is valid, store the task type and event topic of the service to be registered to determine the service to be registered as a registered service.

[0164] In some embodiments of this application, the registration module 5553 is further configured to monitor registration information change events of registered services; in response to registration information change events, extract new registration information of registered services from the registration information change events; and store the new registration information to complete the update of registered services.

[0165] This disclosure provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the data routing method described in the embodiments of this application.

[0166] This disclosure provides a computer-readable storage medium storing executable instructions. When these executable instructions are executed by a processor, they cause the processor to execute the data routing method provided in this application, for example... Figures 3 to 9 The method shown.

[0167] In some embodiments of this application, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a device that includes one or any combination of the above-mentioned memories.

[0168] In some embodiments of this application, executable instructions may take the form of programs, software, software modules, scripts, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including being deployed as a standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.

[0169] As an example, executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple collaborating files (e.g., a file that stores one or more modules, subroutines, or code sections).

[0170] As an example, executable instructions can be deployed to execute on a single computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network.

[0171] In summary, the following technical effects can be achieved through the embodiments of this application:

[0172] (1) In this embodiment, the structured data sent by all network cameras is received through the forwarding layer, so that target services corresponding to different scenarios can share the forwarding layer to obtain structured data, thereby reducing the development and maintenance costs of the system. At the same time, since the device identifier corresponding to each structured data is obtained, the registration information of at least one target service corresponding to each structured data can be determined based on the device identifier to complete the correct routing of each structured data. This realizes the correct transmission of structured data when all network cameras share the same forwarding layer and service routing module. This not only reduces development and maintenance costs, but also supports different business scenarios and expands the application scope of the data routing method of this application.

[0173] (2) In this embodiment of the application, by setting a mapping relationship between task types and service types in the task database, after obtaining at least one task type corresponding to the device identifier, at least one target service corresponding to the device identifier can be further determined, thus realizing different service types. The sharing of structured data sent by a network camera by target services of different task types improves the adaptability to complex application scenarios; and, based on the registration information of each target service stored in the task database, a data foundation can be provided for the correct routing of subsequent structured data.

[0174] (3) In this embodiment of the application, the subscription topic of the target service of the event push type is obtained, and a push event is generated based on the subscription topic and structured data. The push event is pushed to at least one subscriber who subscribes to the subscription topic through a preset message queue, which increases the data push form of the data routing method of this application. Since the event push method is adopted, the push efficiency of structured data can be improved.

[0175] (4) In this embodiment of the application, the network address and port information of the target service of the task push type are obtained, and the structured data is pushed to the target service based on the network address and port information of the target service. This increases the data push form of the data routing method of this application. Since the task push method is adopted, the target service of the task push type can obtain accurate structured data and generate corresponding intelligent analysis results, thereby improving the push efficiency of structured data.

[0176] (5) By obtaining the service parameters of the target service for each task push type, the original structured data can be processed to remove invalid data that is not needed by the target service and only the service parameters required by the target service can be transmitted. This can save the amount of data transmitted over the network, save bandwidth, and improve routing efficiency. At the same time, by obtaining the data format of the target service for each task push type, the service parameters of each target service can be further encapsulated according to the data format. This can not only meet the data format requirements of the target service, but also improve the security of data transmission.

[0177] (6) This application embodiment receives the registration request of the service to be registered and implements the registration process of the service to be registered according to the task type and registration information in the registration request. This realizes the scalability of the data routing method of this application. When a new service is needed, there is no need to re-develop the new service. Just save the task type and registration information of the service to be registered carried in the registration request to complete the registration process of the new service. This reduces the registration cost and improves the service registration efficiency.

[0178] (7) By monitoring the registration information change events of each registered service, this application embodiment can update the registered service in the server in real time when the registered service changes data, network address or disconnection, so as to facilitate the correct routing of subsequent structured data.

[0179] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.

Claims

1. A data routing method, characterized by, include: Receive structured data sent by the forwarding layer; The forwarding layer is used to receive the structured data sent by at least one network camera; The structured data includes the device identifier of the network camera that sent the structured data; At least one task type is determined in the task database based on the device identifier; Based on the preset mapping relationship between task types and service types, determine the at least one target service corresponding to the at least one task type; Query the registration information of each target service in the task database; If the service type of the target service is event push, obtain the subscription topic corresponding to the target service based on the registration information of the target service; The push event generated based on the subscribed topic and the structured data is persisted to a message queue, and the push event is pushed to the subscription service corresponding to the subscribed topic through the message queue.

2. The method of claim 1, wherein, Each of the aforementioned task types corresponds to at least one target service of a service type.

3. The method of claim 2, wherein, The method further includes: If the service type of the target service is task push, the address information of the target service is obtained based on the registration information of the target service; the address information includes the network address and port information of the target service. Based on the network address and port information of the target service, the structured data is pushed to the target service.

4. The method according to claim 3, characterized in that, The method further includes: Based on the registration information of the target service, obtain the parameter information of the target service; the parameter information includes service parameters and data format. The step of pushing the structured data to the target service based on the network address and port information of the target service includes: Extract the service parameters from the structured data; The service parameters are encapsulated according to the data format to obtain encapsulated data; Based on the network address and port information of the target service, the encapsulated data is pushed to the target service.

5. The method of claim 1, wherein, The method further includes: Receive registration requests for services to be registered; The task type and registration information of the service to be registered, carried in the registration request, are stored to determine the service to be registered as a registered service.

6. The method according to claim 5, characterized in that, The step of storing the task type and registration information of the service to be registered carried in the registration request, in order to determine the service to be registered as a registered service, includes: If the service type of the service to be registered is a task push type, obtain the task type and registration information of the service to be registered carried in the registration request; the registration information includes address information and parameter information. The task type, address information, and parameter information of the service to be registered are stored in the task database to identify the service to be registered as the registered service.

7. A data routing device, characterized by include: The service routing module is used to receive structured data sent by the forwarding layer; The forwarding layer is used to receive the structured data sent by at least one network camera; The structured data includes the device identifier of the network camera that sent the structured data; The task management module is used to determine at least one task type in the task database based on the device identifier; determine at least one target service corresponding to the at least one task type according to a preset mapping relationship between task types and service types; and query the registration information of each target service in the task database. The service routing module is also used to obtain the subscription topic corresponding to the target service based on the registration information of the target service when the service type of the target service is event push type; The push event generated based on the subscribed topic and the structured data is persisted to a message queue, and the push event is pushed to the subscription service corresponding to the subscribed topic through the message queue.

8. The apparatus according to claim 7, characterized in that, The service routing module is further configured to, when the service type of the target service is task push type, obtain the address information of the target service based on the registration information of the target service; the address information includes the network address and port information of the target service; Based on the network address and port information of the target service, the structured data is pushed to the target service.

9. The apparatus according to claim 8, characterized in that, The service routing module is further configured to obtain parameter information of the target service based on the registration information of the target service; the parameter information includes service parameters and data format; and extract the service parameters from the structured data. The service parameters are encapsulated according to the data format to obtain encapsulated data; Based on the network address and port information of the target service, the encapsulated data is pushed to the target service.

10. A data routing device, characterized in that, include: Memory, used to store executable instructions; A processor, when executing executable instructions stored in the memory, implements the method according to any one of claims 1 to 6.

11. A computer readable storage medium, characterized in that, It stores executable instructions for implementing the method of any one of claims 1 to 6 when executed by a processor.

12. A computer program product comprising computer-executable instructions or a computer program, characterized in that, When the computer-executable instructions or computer program are executed by a processor, they implement the method according to any one of claims 1 to 6.