Route forwarding method and device, storage medium and route forwarding gateway

By introducing the route forwarding gateway in the video surveillance system, the efficient and stable communication between video surveillance equipment and video surveillance services is realized, and the problem of low data interaction and continuity in existing technology has been solved, and the accuracy of data is improved. And the stable operation of video surveillance services.

CN119363838AActive Publication Date: 2025-01-24E SURFING VISION TECHNOLOGY CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411476838.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-22
Publication Date
2025-01-24
Estimated Expiration
2044-10-22

AI Technical Summary

Technical Problem

In the prior art, the data interaction consistency and continuity between video surveillance equipment and video surveillance services are low, resulting in a decrease in data accuracy and unstable operation of video surveillance services.

Method used

Introduce the route forwarding gateway as the middle layer, and the forwarding module, the corresponding relationship record module, the address query module and the data interactive request forwarding module through the equipment registration request, the address query module, and the data interactive request for the reposting module to realize the efficient and stable communication between video surveillance equipment and video surveillance services. Query forwarding the corresponding relationship for the same source routing.

Benefits of technology

The consistency and continuity of the data interaction between video surveillance equipment and video surveillance services has been improved, and the accuracy of the data is improved and video surveillance services are stable.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119363838A_ABST
    Figure CN119363838A_ABST
Patent Text Reader

Abstract

The invention provides a routing forwarding method and device, a storage medium and a routing forwarding gateway. According to the technical scheme, the routing forwarding gateway is introduced to serve as the middle layer, efficient and stable communication between the video monitoring equipment and the video monitoring service can be achieved, and then compatibility with an existing communication protocol can be kept without changing the communication interaction mode of the video monitoring equipment end and the video monitoring service end. On the basis, according to the recorded forwarding corresponding relationship, homologous routing forwarding of the data interaction request can be realized, so that the request sent by the same video monitoring equipment is forwarded to the same video monitoring service instance as far as possible for processing. Therefore, the consistency and continuity of data interaction can be improved, the accuracy of data can be improved, and the normal operation of video monitoring service can be influenced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of video surveillance technology, and in particular to a routing forwarding method, device, storage medium and routing forwarding gateway. Background Art

[0002] In the field of video surveillance, video surveillance devices need to interact with video surveillance services to implement functions such as registration, control, alarm, and video streaming of video surveillance devices. In order to enable video surveillance devices to communicate with corresponding video surveillance services, video surveillance devices are configured with a service address and multiple ports (such as HTTP port, RTSP port, etc.). At the same time, in the front-end proxy service, the video surveillance devices are bound to a video surveillance service instance respectively through manual binding. In this way, requests sent by the same video surveillance device through different ports can be uniformly forwarded to the same video surveillance service instance, ensuring that after the video surveillance device is registered with the video surveillance service, the same video surveillance service instance can communicate with the video surveillance device.

[0003] However, as more and more video surveillance devices are put into use, the load capacity of a single video surveillance service instance may reach its upper limit, so more video surveillance service instances need to be deployed to share the load. In this case, a set of service addresses and ports can be set for each video surveillance service instance, and the specified service addresses and ports can be configured on the video surveillance devices. However, this method makes the management of service instances, service addresses, and ports complicated and prone to errors, especially the need to manually configure the specified service addresses and ports for each video surveillance device, which is prone to single point server failure risks and network security risks.

[0004] In order to cope with the above situation, the existing technology usually adopts load balancing technology to meet the expansion requirements of large-scale video surveillance systems. However, the load balancer generally randomly distributes the requests sent by the video surveillance device to the video surveillance service instance. If the video surveillance device is successfully registered and not disconnected, the load balancer may forward the request sent by the same video surveillance device to different video surveillance service instances for processing. This affects the consistency and continuity of data interaction, which in turn easily reduces the accuracy of the data and affects the normal operation of the video surveillance service. Summary of the invention

[0005] The purpose of this application is to solve at least one of the above-mentioned technical defects, especially the technical defects of low consistency and continuity of data interaction in the prior art.

[0006] In a first aspect, the present application provides a routing forwarding method, which is applied to a routing forwarding gateway, and the method includes:

[0007] In response to the received device registration request, determine a first target service in at least one registered service, and forward the device registration request to the first target service; wherein the registered service is a video surveillance service registered with the routing forwarding gateway;

[0008] If a first registration success message returned by the first target service in response to the device registration request is received, then a forwarding correspondence between a service address corresponding to the first target service and a device identifier of a registered monitoring device is recorded; wherein the registered monitoring device is a video monitoring device that sends the device registration request;

[0009] In response to the received data interaction request, query each of the forwarding correspondences according to the interaction device identifier, and obtain an address query result; wherein the interaction device identifier is a device identifier of an interaction monitoring device, and the interaction monitoring device is a video monitoring device that sends the data interaction request;

[0010] If the address query result is a service address, the data interaction request is forwarded to a second target service; wherein the second target service is a registered service corresponding to the address query result.

[0011] In one embodiment, the routing forwarding gateway records the number of device registrations corresponding to the registered service;

[0012] The determining of a first target service in at least one registered service comprises:

[0013] The first target service is determined in each of the registered services according to the number of device registrations corresponding to each of the registered services and a preset load balancing rule.

[0014] In one embodiment, the method further comprises:

[0015] If a first registration success message returned by the first target service in response to the device registration request is received, returning the first registration success message to the registration monitoring device to instruct the registration monitoring device to periodically send a device keep-alive request to the routing forwarding gateway;

[0016] Determining whether the registered monitoring device is offline according to the reception of the device keep-alive request;

[0017] If the registered monitoring device is offline, the forwarding correspondence corresponding to the registered monitoring device is deleted, and the number of device registrations corresponding to the first target service is updated.

[0018] In one embodiment, the method further comprises:

[0019] If the address query result reflects that the routing forwarding gateway does not record the forwarding correspondence corresponding to the interactive device identifier, a request failure message is returned to the interactive monitoring device;

[0020] The request failure message is used to instruct the interactive monitoring device to re-initiate a device registration request to the routing forwarding gateway.

[0021] In one embodiment, the step of registering the registered service in the routing forwarding gateway includes:

[0022] In response to the received service registration request, perform a registration check on the target registered service, and if the registration check passes, record a service address corresponding to the target registered service, and send a second registration success message to the target registered service;

[0023] The target registered service is the video surveillance service that sends the service registration request; and the second registration success message is used to instruct the target registered service to periodically send a service keep-alive request to the routing forwarding gateway.

[0024] In one embodiment, the method further comprises:

[0025] Determining whether the target registered service fails according to the reception of the service keep-alive request;

[0026] If the target registered service fails, the forwarding correspondence corresponding to the target registered service and the registration information of the target registered service in the routing forwarding gateway are deleted.

[0027] In a second aspect, an embodiment of the present application provides a routing forwarding device, which is applied to a routing forwarding gateway, and the device includes:

[0028] A device registration request forwarding module, configured to determine a first target service in at least one registered service in response to a received device registration request, and forward the device registration request to the first target service; wherein the registered service is a video surveillance service registered with the routing forwarding gateway;

[0029] a correspondence recording module, configured to record a forwarding correspondence between a service address corresponding to the first target service and a device identifier of a registered monitoring device if a first registration success message returned by the first target service in response to the device registration request is received; wherein the registered monitoring device is a video monitoring device that sends the device registration request;

[0030] An address query module, used to query each forwarding correspondence according to an interactive device identifier in response to a received data interaction request, and obtain an address query result; wherein the interactive device identifier is a device identifier of an interactive monitoring device, and the interactive monitoring device is a video monitoring device that sends the data interaction request;

[0031] A data interaction request forwarding module is used to forward the data interaction request to a second target service if the address query result is a service address; wherein the second target service is a registered service corresponding to the address query result.

[0032] In a third aspect, an embodiment of the present application provides a storage medium, which stores computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the routing forwarding method described in any of the above embodiments.

[0033] In a fourth aspect, an embodiment of the present application provides a routing forwarding gateway, the routing forwarding gateway comprising: one or more processors, and a memory;

[0034] The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the one or more processors, the steps of the routing and forwarding method described in any of the above embodiments are executed.

[0035] In a fifth aspect, an embodiment of the present application provides a video surveillance system, including:

[0036] The routing forwarding gateway of any of the above embodiments;

[0037] The video surveillance device is configured with the gateway address and port information corresponding to the routing forwarding gateway, and is communicatively connected to the routing forwarding gateway;

[0038] The video monitoring server is communicatively connected to the routing forwarding gateway and is used to provide video monitoring services.

[0039] In the routing forwarding method and related devices provided in the present application, the routing forwarding gateway can receive a device registration request sent by a video surveillance device, and forward the request to the corresponding video surveillance service, so that the video surveillance device can be registered at the corresponding video surveillance service. In the case of successful registration, the routing forwarding gateway can generate and record the forwarding correspondence between the device identification of the video surveillance device and the corresponding service address, and forward the data interaction request accordingly.

[0040] In this way, by introducing a routing forwarding gateway as an intermediate layer, efficient and stable communication between video surveillance equipment and video surveillance services can be achieved, and then the communication interaction mode between the video surveillance equipment and the video surveillance service can be maintained without changing the communication interaction mode between the video surveillance equipment and the video surveillance service, while maintaining compatibility with existing communication protocols. On this basis, this application can implement homologous routing forwarding of data interaction requests based on the recorded forwarding correspondence, so as to forward the requests sent by the same video surveillance device to the same video surveillance service instance for processing as much as possible. In this way, the consistency and continuity of data interaction can be improved, and then the accuracy of the data can be improved and the normal operation of the video surveillance service can be affected. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0042] Figure 1 A system structure diagram of a video surveillance system in one embodiment;

[0043] Figure 2 One of the flowcharts of the routing forwarding method in one embodiment;

[0044] Figure 3 This is a second flow chart of a routing forwarding method in an embodiment;

[0045] Figure 4 A schematic diagram of the structure of a routing and forwarding device in one embodiment;

[0046] Figure 5 FIG. 4 is an internal structure diagram of a routing forwarding gateway in one embodiment. DETAILED DESCRIPTION

[0047] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0048] The terms involved in this application are explained below.

[0049] Load balancing: A method of distributing traffic to multiple servers for processing, which can reduce request waiting time, thereby increasing the system's response speed and effectively improving the system's availability and performance.

[0050] HTTP (Hypertext Transfer Protocol): a request-response protocol;

[0051] RTSP (Real Time Streaming Protocol): an application layer protocol in the TCP / IP protocol system.

[0052] TCP (Transmission Control Protocol): a connection-oriented, reliable, byte-stream-based transport layer communication protocol;

[0053] IP (Internet Protocol): Network layer protocol in the TCP / IP system.

[0054] Video surveillance service: Provides video surveillance equipment with services such as device registration, signaling control, media forwarding, and other corresponding business functions.

[0055] It should be noted that the image / video acquisition, storage, use, processing, transmission, provision and disclosure involved in this application are in compliance with relevant laws and regulations and do not violate public order and good morals.

[0056] In one embodiment, Figure 1 As shown, the present application provides a video surveillance system, including: a routing and forwarding gateway 102, a video surveillance device 104 and at least one video surveillance server 106. The routing and forwarding gateway 102 is respectively connected to each video surveillance device 104 and each video surveillance server 106 for communication, and is used as an intermediate layer between the video surveillance device 104 and the video surveillance server 106.

[0057] The video surveillance server 106 is used to provide video surveillance services for the video surveillance device 104, including but not limited to any one or any combination of services such as registration, control, alarm, and cloud storage of video streams of the video surveillance device 104. It can be understood that the number of the video surveillance server 106 can be one or more, and the specific number can be determined according to the total number of video surveillance devices 104 in the video surveillance system and the data flow, which is not specifically limited herein.

[0058] The video monitoring device 104 refers to a device for collecting video image information to realize the monitoring function. For example, the video monitoring device 104 can be a camera. In the video monitoring system provided in the present application, the video monitoring device 104 is configured with the gateway address and port information corresponding to the routing forwarding gateway 102. For example, the routing forwarding gateway 102 can provide a unified public network server IP address and port information, and each video monitoring device 104 in the system can be configured with the public network server IP address and port information.

[0059] Specifically, since the video surveillance device 104 is configured with the gateway address and port information corresponding to the routing forwarding gateway 102, the video surveillance device 104 will send a corresponding request to the routing forwarding gateway 102 during the device registration and data interaction process. The routing forwarding gateway 102 can forward the request from the video surveillance device 104 to the corresponding video surveillance server 106 based on the routing forwarding method of any of the following embodiments, so as to provide video surveillance services to the video surveillance device 104 through the corresponding video surveillance server 106.

[0060] The routing forwarding method provided by this application is described below.

[0061] In one embodiment, Figure 2 As shown, the present application provides an application Figure 1 The routing forwarding method of the routing forwarding gateway shown specifically includes the following steps:

[0062] S202: In response to the received device registration request, determine a first target service from at least one registered service, and forward the device registration request to the first target service.

[0063] The device registration request is sent by the video surveillance device to request that the video surveillance device be registered in the video surveillance service. After the video surveillance device is registered in the corresponding video surveillance service, the corresponding video surveillance service can provide video surveillance services for the video surveillance device. The registered service refers to the video surveillance service that has been registered with the routing forwarding gateway. The first target service refers to the video surveillance service assigned to the video surveillance device that sent the device registration request.

[0064] In this step, since the video surveillance device is configured with the gateway address and port information corresponding to the routing forwarding gateway, when the video surveillance device needs to register the device, it can send a device registration request to the routing forwarding gateway. When the routing forwarding gateway receives the device registration request, it can determine the first target service from at least one registered service and send the device registration request to the first target service to register the video surveillance device that sent the device registration request (i.e., the registered surveillance device described in detail) to the first target service.

[0065] S204: If a first registration success message returned by the first target service in response to the device registration request is received, a forwarding correspondence between a service address corresponding to the first target service and a device identifier of the registered monitoring device is recorded.

[0066] The registered monitoring device is a video monitoring device that sends a device registration request.

[0067] In this step, after forwarding the device registration request to the first target service, the first target service can perform registration verification based on the received device registration request, and if the registration verification passes, register the registration monitoring device to this service and return the first registration success message to the routing forwarding gateway.

[0068] When the routing forwarding gateway receives the first registration success message, it can determine that the registered monitoring device has successfully registered with the first target service. In this case, the routing forwarding gateway can record the registered service address corresponding to the registered monitoring device and generate a forwarding correspondence between the service address corresponding to the first target service and the device identifier of the registered monitoring device.

[0069] S206: In response to the received data interaction request, query each forwarding correspondence according to the interaction device identifier, and obtain an address query result.

[0070] The data interaction request is sent by the video monitoring device to request data interaction with the video monitoring service. The interactive device identifier is the device identifier of the interactive monitoring device, and the interactive monitoring device is the video monitoring device that sends the data interaction request.

[0071] In this step, when receiving the data interaction request, the routing forwarding gateway can determine the device identification of the video surveillance device that sent the data interaction request and obtain the interaction device identification. For example, the routing forwarding gateway can extract the interaction device identification from the data interaction request.

[0072] After obtaining the interactive device identifier, the routing forwarding gateway can query the recorded forwarding correspondences according to the interactive device identifier to try to query the registration service address corresponding to the interactive monitoring device. It can be understood that if the routing forwarding gateway records the registration service address of the interactive monitoring device, the address query result can be the registration service address. If the routing forwarding gateway does not record the registration service address of the interactive monitoring device, the address query result is not the service address, for example, the address query result can be NULL or the query fails.

[0073] For example, if the routing forwarding gateway records the first forwarding correspondence and the second forwarding correspondence, and the first forwarding correspondence is device identifier 1-service address 1, and the second forwarding correspondence is device identifier 2-service address 2, then when the interactive device identifier is device identifier 1, the address query result is service address 1. Similarly, when the interactive device identifier is device identifier 2, the address query result is service address 2. When the interactive device identifier is device identifier 3, since the routing forwarding gateway does not record the forwarding correspondence corresponding to device identifier 3, the address query result may be NULL or the query fails.

[0074] S208: If the address query result is a service address, forward the data interaction request to the second target service.

[0075] The second target service is a registered service corresponding to the address query result, that is, a video monitoring service to which the interactive monitoring device has been registered.

[0076] In this step, when the address query result is a service address, it indicates that the routing forwarding gateway has recorded the registered service address corresponding to the interactive monitoring device. In this case, the routing forwarding gateway can forward the data interaction request to the corresponding registered service (i.e., the second target service), so that the interactive monitoring device can interact with the second target service.

[0077] It can be understood that, if the forwarding correspondence remains unchanged, the routing forwarding gateway can forward each data interaction request sent by the same video surveillance device to the same registered service, thereby providing homologous address forwarding for data interaction of the video surveillance device, thereby maintaining data consistency and continuity.

[0078] In this application, the routing forwarding gateway can receive a device registration request sent by a video surveillance device and forward the request to the corresponding video surveillance service, so that the video surveillance device can register at the corresponding video surveillance service. If the registration is successful, the routing forwarding gateway can generate and record the forwarding correspondence between the device identification of the video surveillance device and the corresponding service address, and forward the data interaction request accordingly.

[0079] In this way, by introducing a routing forwarding gateway as an intermediate layer, efficient and stable communication between video surveillance equipment and video surveillance services can be achieved, and then the communication interaction mode between the video surveillance equipment and the video surveillance service can be maintained without changing the communication interaction mode between the video surveillance equipment and the video surveillance service, while maintaining compatibility with existing communication protocols. On this basis, this application can implement homologous routing forwarding of data interaction requests based on the recorded forwarding correspondence, so as to forward the requests sent by the same video surveillance device to the same video surveillance service instance for processing as much as possible. In this way, the consistency and continuity of data interaction can be improved, and then the accuracy of the data can be improved and the normal operation of the video surveillance service can be affected.

[0080] In one embodiment, the routing forwarding gateway records the number of device registrations corresponding to the registered service, which refers to the number of video surveillance devices registered to the registered service. For example, when the number of device registrations corresponding to a certain video surveillance service is 10, it indicates that 10 video surveillance devices have successfully registered to the video surveillance service, and the video surveillance service is currently used to provide video surveillance services for the 10 video surveillance devices.

[0081] Determining a first target service in at least one registered service includes: determining the first target service in each registered service according to the number of device registrations corresponding to each registered service and a preset load balancing rule.

[0082] In this embodiment, after receiving the device registration request, the routing forwarding gateway can allocate the backend video monitoring service to the registered monitoring device according to load balancing rules such as the minimum number of connections, so as to realize load balancing function and realize flexible scheduling.

[0083] It is understandable that the specific content of the load balancing rule can be preset according to the actual situation, and this document does not impose specific restrictions on this. For example, when the load balancing rule is to allocate services based on the minimum number of connections, the routing forwarding gateway can determine the minimum number of registrations among the number of device registrations corresponding to each registered service when receiving a device registration request, and use the registered service corresponding to the minimum number of registrations as the first target service. In this way, the load balancing effect can be improved, thereby speeding up the response speed of the video surveillance service.

[0084] In one embodiment, the routing forwarding method provided by the present application further includes the following steps:

[0085] Step A1: if a first registration success message returned by the first target service in response to the device registration request is received, the first registration success message is returned to the registration monitoring device to instruct the registration monitoring device to periodically send a device keep-alive request to the routing forwarding gateway;

[0086] Step A2: judging whether the registered monitoring device is offline according to the reception of the device keep-alive request;

[0087] Step A3: If the registered monitoring device is offline, the forwarding correspondence corresponding to the registered monitoring device is deleted, and the number of device registrations corresponding to the first target service is updated.

[0088] In this embodiment, considering that after a video surveillance device is registered with a video surveillance service, it may be affected by power failure, communication obstruction, etc. and become offline, therefore, in this embodiment, the routing forwarding gateway can regularly monitor the online status of each registered video surveillance device, and when it is confirmed that the video surveillance device is offline, delete the forwarding correspondence corresponding to the video surveillance device and update the corresponding device registration quantity, so as to reduce the service resources occupied by the offline device, thereby improving the utilization of service resources.

[0089] Specifically, when the routing forwarding gateway receives the first registration success message returned by the first target service in response to the device registration request, it can determine that the registration monitoring device has been registered with the first target service. In this case, the routing forwarding gateway can return the first registration success message to the registration monitoring device. After receiving the first registration success message, the registration monitoring device periodically sends a device keep-alive request to the routing forwarding gateway.

[0090] It can be understood that when the registered monitoring device is online, the routing forwarding gateway can receive the device keep-alive request sent by the registered monitoring device at regular intervals. When the registered monitoring device is offline, the registered monitoring device cannot send the device keep-alive request, or the device keep-alive request sent by the registered monitoring device cannot be transmitted to the routing forwarding gateway, resulting in the routing forwarding gateway not receiving the device keep-alive request.

[0091] It can be seen that the routing forwarding gateway can determine whether the registered monitoring device is offline based on the reception of the device keep-alive request. In one example, when the routing forwarding gateway receives the device keep-alive request sent by the registered monitoring device, it can update the online active time corresponding to the registered monitoring device in real time. For example, the online active time can be updated to the latest reception time of the device keep-alive request. In this way, the routing forwarding gateway can determine whether the video monitoring device is offline based on each online active time.

[0092] When it is determined that the registered monitoring device is offline, the routing forwarding gateway can delete the corresponding forwarding correspondence and update the number of device registrations for the first target service corresponding to the registered monitoring device. In this way, the registration information of the offline device in the video monitoring system can be deleted, and the service resources occupied by the offline device can be reallocated.

[0093] In one embodiment, the routing forwarding method provided by the present application further includes the following steps: if the address query result reflects that the routing forwarding gateway does not record the forwarding correspondence corresponding to the interactive device identifier, a request failure message is returned to the interactive monitoring device.

[0094] The request failure message is used to instruct the interactive monitoring device to re-initiate a device registration request to the routing forwarding gateway.

[0095] In this embodiment, if the address query result reflects that the routing forwarding gateway does not record the registration service address corresponding to the interactive monitoring device, the routing forwarding gateway may return a request failure message to the interactive monitoring device. After receiving the request failure message, the interactive monitoring device may initiate a device registration request to the routing forwarding gateway to request that the device be registered in the video monitoring system.

[0096] In one embodiment, the registration step of the registered service in the routing forwarding gateway includes:

[0097] In response to the received service registration request, perform a registration check on the target registered service, and if the registration check passes, record a service address corresponding to the target registered service, and send a second registration success message to the target registered service;

[0098] The target registered service is a video surveillance service that sends a service registration request; and the second registration success message is used to instruct the target registered service to periodically send a service keep-alive request to the routing forwarding gateway.

[0099] In this embodiment, it is considered that after the video surveillance service is registered with the routing forwarding gateway, it may be affected by power failure, communication obstruction, etc., causing the server to be offline, thereby affecting the normal operation of the video surveillance service. Therefore, in this embodiment, the routing forwarding gateway can periodically monitor the service status of each registered service to facilitate scheduling according to the service status of the registered service, thereby ensuring the normal operation of the video surveillance service.

[0100] Specifically, the video surveillance service can send a service registration request to the routing forwarding gateway to request that the video surveillance service be registered in the routing forwarding gateway. When the routing forwarding gateway receives the service registration request, it can perform a registration check on the target registered service that sent the service registration request, and record the service address corresponding to the target registered service if the registration check passes, so as to facilitate the subsequent forwarding of the request sent by the video surveillance device to the target registered service.

[0101] When the target registered service registration verification passes, the routing forwarding gateway may also send a second registration success message to the target registered service. After receiving the second registration success message, the target registered service may periodically send a service keep-alive request to the routing forwarding gateway.

[0102] It can be understood that when the target registered service is in normal working state, the routing forwarding gateway can receive the service keep-alive request sent by the target registered service at regular intervals. When the target registered service is in a faulty state, the target registered service cannot send the service keep-alive request, or the service keep-alive request sent by the target registered service cannot be transmitted to the routing forwarding gateway, resulting in the routing forwarding gateway not receiving the service keep-alive request.

[0103] It can be seen that the routing forwarding gateway can detect the service status of the target registered service according to the reception of the service keep-alive request.

[0104] Furthermore, in one embodiment, the routing forwarding method provided by the present application may also include the following steps:

[0105] According to the reception of the service keep-alive request, determine whether the target registered service is faulty;

[0106] If the target registered service fails, the forwarding correspondence corresponding to the target registered service and the registration information of the target registered service in the routing forwarding gateway are deleted.

[0107] In this embodiment, the routing forwarding gateway can determine whether the target registered service is faulty according to the reception of the service keep-alive request. In one example, when the routing forwarding gateway receives the service keep-alive request sent by the target registered service, it can update the online active time corresponding to the target registered service in real time, for example, the online active time can be updated to the latest reception time of the service keep-alive request. In this way, the routing forwarding gateway can determine whether each registered service is faulty according to each online active time.

[0108] When it is determined that the target registered service fails, the routing forwarding gateway can delete all forwarding correspondences corresponding to the target registered service, as well as the registration information of the target registered service in the routing forwarding gateway. In this way, when the video surveillance device originally registered to the target registered service initiates a data interaction request, the routing forwarding gateway will return a request failure message to it to instruct the video surveillance device to re-initiate the device registration request, so that the routing forwarding gateway can assign the video surveillance to other video surveillance services. In this way, the video surveillance system can have disaster recovery capabilities, and even if some registered services fail, video surveillance services can be provided to the video surveillance devices in the system through other registered services that are not faulty.

[0109] In one embodiment, Figure 3 As shown, the present application provides an application Figure 1 The routing and forwarding method of the video surveillance system shown in the figure specifically includes the following steps:

[0110] S301: The video surveillance service sends a service registration request to the routing forwarding gateway;

[0111] S302: In response to the received service registration request, the routing forwarding gateway performs a registration verification on the video surveillance service, and if the registration verification passes, records the service address corresponding to the video surveillance service;

[0112] S303: When the registration verification passes, the routing forwarding gateway sends a second registration success message to the video surveillance service;

[0113] S304: After receiving the second registration success message, the video surveillance service periodically sends a service keep-alive request to the routing forwarding gateway;

[0114] S305: In response to the received service keep-alive request, the routing forwarding gateway updates the service online active time corresponding to the video surveillance service;

[0115] S306: The routing forwarding gateway sends a service update message to the video surveillance service;

[0116] S307: The video surveillance device sends a device registration request to the routing forwarding gateway each time it is powered on;

[0117] S308: The routing forwarding gateway responds to the received device registration request and allocates a video surveillance service to the video surveillance device according to a preset load balancing rule;

[0118] S309: The routing forwarding gateway forwards the device registration request to the corresponding video surveillance service;

[0119] S310: After receiving the device registration information, the video surveillance service performs a registration verification on the video surveillance device, and generates a first registration success message if the registration verification passes;

[0120] S311: The video surveillance service returns a first registration success message to the routing forwarding gateway;

[0121] S312: In response to the received first registration success message, the routing forwarding gateway records the forwarding correspondence between the device identifier corresponding to the video surveillance device and the service address corresponding to the video surveillance service, updates the number of device registrations corresponding to the video surveillance service, and sets the online active time of the video surveillance device;

[0122] S313: The routing forwarding gateway returns a first registration success message to the video surveillance device;

[0123] S314: The video surveillance device sends a device keep-alive request to the routing forwarding gateway at a fixed time in response to the received first registration success message;

[0124] S315: In response to the received device keep-alive request, the routing forwarding gateway updates the device online active time corresponding to the video surveillance device;

[0125] S316: The routing forwarding gateway sends a device update message to the video surveillance device;

[0126] S317: The video surveillance device sends a data interaction request to the routing forwarding gateway;

[0127] S318: The routing forwarding gateway queries the registration service address according to the interaction device identifier in response to the received data interaction request;

[0128] S319: The routing forwarding gateway forwards the data interaction request to the video surveillance service corresponding to the registered service address;

[0129] S320: The video surveillance service performs service processing in response to the received data interaction request and obtains response data;

[0130] S321: The video surveillance service returns response data to the routing forwarding gateway;

[0131] S322: The routing forwarding gateway returns response data to the video surveillance device;

[0132] S323: When the video surveillance device is offline / the video surveillance service fails, the device online active time / the service online active time times out, and the routing forwarding gateway clears the recorded forwarding correspondences and updates the number of device registrations for the video surveillance service;

[0133] S324: The routing forwarding gateway returns a response message to the video surveillance device / video surveillance service according to the cleanup / update result.

[0134] In this example, after the video surveillance service cluster is deployed and launched, it can register the service address information such as the intranet address and port of the service with the routing forwarding gateway, and support the periodic reporting of the service availability status through the status keep-alive function. In addition, after receiving the device registration request, the routing forwarding gateway can forward the request to the backend video surveillance service for registration verification according to the forwarding policy allocation such as the minimum number of connections to realize the scheduling function. In the case of a service failure and the failure to send a status keep-alive request, the online active time of the routing forwarding gateway is detected to have timed out and not updated in time, triggering the routing forwarding gateway to clean up the corresponding device registration backend service address and the device registration data of the backend service in time, so that the video surveillance device can re-initiate the device registration request and have disaster recovery capabilities.

[0135] The routing forwarding device provided in an embodiment of the present application is described below. The routing forwarding device described below and the routing forwarding method described above can be referenced to each other.

[0136] In one embodiment, Figure 4 As shown, the present application provides a routing forwarding device 400 applied to a routing forwarding gateway, including:

[0137] The device registration request forwarding module 402 is used to determine a first target service in at least one registered service in response to the received device registration request, and forward the device registration request to the first target service; wherein the registered service is a video surveillance service registered with the routing forwarding gateway;

[0138] The corresponding relationship recording module 404 is used to record the forwarding corresponding relationship between the service address corresponding to the first target service and the device identifier of the registered monitoring device if a first registration success message returned by the first target service in response to the device registration request is received; wherein the registered monitoring device is the video monitoring device that sends the device registration request;

[0139] The address query module 406 is used to query each forwarding correspondence according to the interactive device identifier in response to the received data interaction request, and obtain the address query result; wherein the interactive device identifier is the device identifier of the interactive monitoring device, and the interactive monitoring device is the video monitoring device that sends the data interaction request;

[0140] The data interaction request forwarding module 408 is configured to forward the data interaction request to a second target service if the address query result is a service address; wherein the second target service is a registered service corresponding to the address query result.

[0141] In one embodiment, the routing forwarding gateway records the number of device registrations corresponding to the registered service. The device registration request forwarding module 402 of the present application includes:

[0142] The load balancing unit is used to determine the first target service in each of the registered services according to the number of device registrations corresponding to each of the registered services and a preset load balancing rule.

[0143] In one embodiment, the routing and forwarding device 400 of the present application further includes:

[0144] A device registration module, configured to return the first registration success message to the registration monitoring device if a first registration success message is received from the first target service in response to the device registration request, so as to instruct the registration monitoring device to periodically send a device keep-alive request to the routing forwarding gateway;

[0145] A disconnection detection module, used to determine whether the registered monitoring device is offline according to the reception of the device keep-alive request;

[0146] The first registration information updating module is used to delete the forwarding correspondence corresponding to the registered monitoring device if the registered monitoring device is offline, and update the number of device registrations corresponding to the first target service.

[0147] In one embodiment, the routing and forwarding device 400 of the present application further includes:

[0148] A request failure module, configured to return a request failure message to the interaction monitoring device if the address query result reflects that the routing forwarding gateway does not record a forwarding correspondence corresponding to the interaction device identifier;

[0149] The request failure message is used to instruct the interactive monitoring device to re-initiate a device registration request to the routing forwarding gateway.

[0150] In one embodiment, the routing and forwarding device 400 of the present application further includes:

[0151] A service registration module, configured to perform a registration verification on a target registered service in response to a received service registration request, and if the registration verification passes, record a service address corresponding to the target registered service, and send a second registration success message to the target registered service;

[0152] The target registered service is the video surveillance service that sends the service registration request; and the second registration success message is used to instruct the target registered service to periodically send a service keep-alive request to the routing forwarding gateway.

[0153] In one embodiment, the routing and forwarding device 400 of the present application further includes:

[0154] A fault detection module, used to determine whether the target registered service is faulty according to the reception of the service keep-alive request;

[0155] The second registration information updating module is used to delete the forwarding correspondence corresponding to the target registered service and the registration information of the target registered service in the routing forwarding gateway if the target registered service fails.

[0156] In one embodiment, the present application further provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the routing forwarding method in any embodiment.

[0157] In one embodiment, the present application also provides a routing forwarding gateway, in which computer-readable instructions are stored. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the routing forwarding method in any embodiment.

[0158] Indicatively, Figure 5A schematic diagram of the internal structure of a routing forwarding gateway provided in an embodiment of the present application. Figure 5 The routing and forwarding gateway 900 includes a processing component 902, which further includes one or more processors, and a memory resource represented by a memory 901, for storing instructions executable by the processing component 902. The processing component 902 is configured to execute instructions to perform the steps of the routing and forwarding method described in any of the above embodiments.

[0159] The routing and forwarding gateway 900 may also include a power component 903 configured to perform power management of the routing and forwarding gateway 900 , a wired or wireless network interface 904 configured to connect the routing and forwarding gateway 900 to a network, and an input and output (I / O) interface 905 .

[0160] Those skilled in the art will understand that the internal structure of the routing and forwarding gateway shown in the present application is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the routing and forwarding gateway to which the scheme of the present application is applied. The specific routing and forwarding gateway may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0161] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements not only includes those elements, but also includes other elements not clearly listed, or also includes elements inherent to such process, method, article or equipment. In the absence of more restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or equipment including the elements. Herein, "one", "one", "said", "the" and "it" may also include plural forms, unless the context clearly indicates another way. A plurality refers to at least two cases, such as 2, 3, 5 or 8, etc. "And / or" includes any and all combinations of the relevant listed items.

[0162] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can refer to each other.

[0163] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A routing forwarding method, characterized in that: Applied to a routing forwarding gateway, the method comprises: In response to the received device registration request, determine a first target service in at least one registered service, and forward the device registration request to the first target service; wherein the registered service is a video surveillance service registered with the routing forwarding gateway; If a first registration success message returned by the first target service in response to the device registration request is received, then a forwarding correspondence between a service address corresponding to the first target service and a device identifier of a registered monitoring device is recorded; wherein the registered monitoring device is a video monitoring device that sends the device registration request; In response to the received data interaction request, query each of the forwarding correspondences according to the interaction device identifier, and obtain an address query result; wherein the interaction device identifier is a device identifier of an interaction monitoring device, and the interaction monitoring device is a video monitoring device that sends the data interaction request; If the address query result is a service address, the data interaction request is forwarded to a second target service; wherein the second target service is a registered service corresponding to the address query result.

2. The method according to claim 1, characterized in that The routing forwarding gateway records the number of device registrations corresponding to the registered service; The determining of a first target service in at least one registered service comprises: The first target service is determined in each of the registered services according to the number of device registrations corresponding to each of the registered services and a preset load balancing rule.

3. The method according to claim 2, characterized in that The method further comprises: If a first registration success message returned by the first target service in response to the device registration request is received, returning the first registration success message to the registration monitoring device to instruct the registration monitoring device to periodically send a device keep-alive request to the routing forwarding gateway; Determining whether the registered monitoring device is offline according to the reception of the device keep-alive request; If the registered monitoring device is offline, the forwarding correspondence corresponding to the registered monitoring device is deleted, and the number of device registrations corresponding to the first target service is updated.

4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: If the address query result reflects that the routing forwarding gateway does not record the forwarding correspondence corresponding to the interactive device identifier, a request failure message is returned to the interactive monitoring device; The request failure message is used to instruct the interactive monitoring device to re-initiate a device registration request to the routing forwarding gateway.

5. The method according to claim 4, characterized in that The step of registering the registered service in the routing forwarding gateway includes: In response to the received service registration request, perform a registration check on the target registered service, and if the registration check passes, record a service address corresponding to the target registered service, and send a second registration success message to the target registered service; The target registered service is the video surveillance service that sends the service registration request; and the second registration success message is used to instruct the target registered service to periodically send a service keep-alive request to the routing forwarding gateway.

6. The method according to claim 5, characterized in that The method further comprises: Determining whether the target registered service fails according to the reception of the service keep-alive request; If the target registered service fails, the forwarding correspondence corresponding to the target registered service and the registration information of the target registered service in the routing forwarding gateway are deleted.

7. A routing forwarding device, characterized in that: Applied to a routing forwarding gateway, the device comprises: A device registration request forwarding module, configured to determine a first target service in at least one registered service in response to a received device registration request, and forward the device registration request to the first target service; wherein the registered service is a video surveillance service registered with the routing forwarding gateway; a correspondence recording module, configured to record a forwarding correspondence between a service address corresponding to the first target service and a device identifier of a registered monitoring device if a first registration success message returned by the first target service in response to the device registration request is received; wherein the registered monitoring device is a video monitoring device that sends the device registration request; An address query module, used to query each forwarding correspondence according to an interactive device identifier in response to a received data interaction request, and obtain an address query result; wherein the interactive device identifier is a device identifier of an interactive monitoring device, and the interactive monitoring device is a video monitoring device that sends the data interaction request; A data interaction request forwarding module is used to forward the data interaction request to a second target service if the address query result is a service address; wherein the second target service is a registered service corresponding to the address query result.

8. A storage medium, characterized in that: The storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the routing and forwarding method as described in any one of claims 1 to 6.

9. A routing forwarding gateway, characterized in that: include: one or more processors, and memory; The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the one or more processors, the steps of the routing and forwarding method according to any one of claims 1 to 6 are performed.

10. A video surveillance system, characterized in that: include: The routing forwarding gateway as claimed in claim 9; The video surveillance device is configured with the gateway address and port information corresponding to the routing forwarding gateway, and is communicatively connected to the routing forwarding gateway; The video monitoring server is communicatively connected to the routing forwarding gateway and is used to provide video monitoring services.

Citation Information

Patent Citations

  • Video monitoring and processing method and device

    CN106303377A

  • Message routing method, device and system and storage medium

    CN110661836A

  • Service request forwarding method and system

    CN113259492A

  • Monitoring equipment control method and device, and medium

    CN116320316A

  • Routing forwarding method and device, equipment and storage medium

    CN117615021A