Gateway access method and device supporting camera, and related components

By creating device agents through registration servers and national standard servers, and adapting media adapters and control adapters to camera protocols from different manufacturers, the problem of device compatibility and wake-up operation complexity of AOV/AOR cameras in security monitoring and IoT is solved, realizing unified national standard operation and efficient management of cross-vendor devices.

CN121151379APending Publication Date: 2025-12-16E SURFING IOT CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511607660.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-05
Publication Date
2025-12-16

AI Technical Summary

Technical Problem

AOV/AOR cameras suffer from a lack of unified standards for media transmission and incompatibility with device control protocols in the fields of security monitoring and IoT, making it difficult to connect to the same management system. Furthermore, their low power consumption increases the complexity of device wake-up operations, making them unable to directly adapt to the GB/T28181 standard.

Method used

The registration server generates device registration information, the national standard server creates device agents, media adapters and control adapters adapt to streaming media and control protocols from different manufacturers, and the media server converts the real-time transmission protocol stream into the national standard format, enabling unified national standard operation across devices from different manufacturers.

Benefits of technology

It achieves unified national standard operation for devices from multiple manufacturers, improves system compatibility and management efficiency, meets the real-time preview and control needs in low-power scenarios, and avoids equipment modification costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121151379A_ABST
    Figure CN121151379A_ABST
Patent Text Reader

Abstract

The invention discloses a gateway access method and device supporting a camera and a related component. The method comprises the following steps: receiving a registration request of equipment through a registration server and generating equipment registration information; creating a national standard device agent for the device through a national standard server based on the device registration information; receiving an operation request from a national standard client through the national standard server; when the operation request is video playing, selecting a streaming media software development kit of a target manufacturer through a media adapter according to a manufacturer and an equipment type corresponding to the equipment serial number to carry out stream pulling operation on the equipment, and converting a pulled video stream into a real-time transmission protocol stream in a national standard format through a media server; and when the operation request is equipment control, the equipment operation software development kit of the target manufacturer is selected through the control adapter according to the manufacturer and the equipment type corresponding to the equipment serial number to perform instruction issuing on the equipment. Unified national standard operation is realized, and equipment compatibility and system management efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of cameras, in particular to a method and device for supporting camera access gateway and related components. BACKGROUND

[0002] In the fields of security monitoring and Internet of Things, cameras as core sensing devices, their running efficiency and compatibility directly affect the application effect of the overall system. Compared with traditional 24-hour uninterrupted recording of normal power cameras, AOV / AOR cameras are widely concerned due to their low power consumption characteristics. In a non-event state, such cameras usually operate in a sleep mode and record at a low frame rate (such as 1 second / frame), which can significantly save network bandwidth and storage space. At the same time, the built-in AI algorithm (such as human and vehicle recognition) can automatically switch to normal frame rate recording when detecting target activity, balancing monitoring needs and resource optimization.

[0003] However, the current application of AOV / AOR cameras has significant technical bottlenecks. On the one hand, there is a lack of unified standards for media transmission methods, and different manufacturers use different video stream transmission protocols such as Web RTC, RTMP, and RTSP, and the device control protocols are also incompatible, making it difficult for multiple brands of AOV / AOR cameras to access the same management system, increasing the difficulty of overall management of cross-vendor devices. On the other hand, the low power consumption characteristics of AOV / AOR cameras bring special operation requirements. In a non-event state, the device is in a low power consumption mode. If real-time preview or device control is required, the camera must be awakened first, otherwise the related functions cannot be completed. The existing GB / T28181 standard is mainly for regular normal power cameras, which do not need to be awakened for preview and operation, resulting in a natural adaptation fault in the GB / T28181 standard system for AOV / AOR cameras.

[0004] Furthermore, most AOV / AOR cameras do not integrate GB / T28181 protocol access capabilities, and cannot be directly registered to the GB / T28181 national standard platform. If the camera hardware or firmware is modified to support the protocol, not only will it change the original low power consumption mode, but also will increase the cost of device development and maintenance, making it difficult to meet the economic and practical needs in actual applications. SUMMARY

[0005] The purpose of the present application is to provide a method and device for supporting camera access gateway and related components to address the lack of unified standards in the current media transmission method of AOV / AOR cameras.

[0006] In a first aspect, the present application provides a method for supporting camera access gateway, comprising: The registration request of the device is received by a registration server, and device registration information is generated, the device including an AOV camera or an AOR camera; the device registration information including a device serial number; Based on the device registration information, a national standard device agent is created for the device by a national standard server; An operation request from a national standard client is received by the national standard server; When the operation request is to play a video, a target manufacturer's streaming media software development kit is selected according to a manufacturer and a device type corresponding to the device serial number, a stream pulling operation is performed on the device by a media adapter, and a video stream pulled is converted into a real-time transport protocol stream in a national standard format by a media server; When the operation request is device control, a target manufacturer's device operation software development kit is selected according to a manufacturer and a device type corresponding to the device serial number, and an instruction is issued to the device by a control adapter.

[0007] In a second aspect, an embodiment of the present application provides an access gateway device supporting a camera, including: A registration server is configured to receive a registration request of a device and generate device registration information, the device including an AOV camera or an AOR camera; the device registration information including a device serial number; A national standard server is configured to create a national standard device agent for the device based on the device registration information; The national standard server is configured to receive an operation request from a national standard client; A media adapter is configured to, when the operation request is to play a video, select a target manufacturer's streaming media software development kit according to a manufacturer and a device type corresponding to the device serial number, perform a stream pulling operation on the device, and convert a pulled video stream into a real-time transport protocol stream in a national standard format by a media server; A control adapter is configured to, when the operation request is device control, select a target manufacturer's device operation software development kit according to a manufacturer and a device type corresponding to the device serial number, and issue an instruction to the device.

[0008] In a third aspect, an embodiment of the present application further provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor implementing the support camera access gateway method of the first aspect when executing the computer program.

[0009] In a fourth aspect, an embodiment of the present application further provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, the computer program implementing the support camera access gateway method of the first aspect when executed by a processor.

[0010] This invention discloses an access gateway method, device, and related components supporting cameras. The method includes: receiving a device registration request and generating device registration information through a registration server; the device includes an AOV camera or an AOR camera; the device registration information includes a device serial number; based on the device registration information, creating a national standard device agent for the device through a national standard server; receiving an operation request from a national standard client through the national standard server; when the operation request is to play video, using a media adapter to select a target manufacturer's streaming media software development kit according to the manufacturer and device type corresponding to the device serial number to pull the video stream from the device, and using a media server to convert the pulled video stream into a national standard format real-time transmission protocol stream; when the operation request is to control the device, using a control adapter to select a target manufacturer's device operation software development kit according to the manufacturer and device type corresponding to the device serial number to issue commands to the device. This invention registers device serial numbers, manufacturers, and other information through a registration server. A national standard server creates a national standard device agent for each device to perform national standard operations. Then, a media adapter adapts to different video transmission protocols such as Web RTC and RTMP and performs device wake-up. Next, a control adapter unifies the control protocols of various manufacturers, and the media server converts the video stream into a national standard RTP stream. Throughout the process, the original working mode of the AOV / AOR camera remains unchanged, achieving unified national standard operation for devices from multiple manufacturers. This significantly improves system compatibility and management efficiency, avoids equipment modification costs, and meets the real-time preview and control requirements in low-power scenarios. This invention also provides an access gateway device supporting cameras, a computer-readable storage medium, and a computer device, all with the aforementioned beneficial effects, which will not be elaborated further here. Attached Figure Description

[0011] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 A flowchart illustrating the method for supporting camera access gateways; Figure 2 Another flowchart illustrating the method for supporting camera access gateways; Figure 3 A schematic diagram of the first sub-process of the gateway method to support camera access; Figure 4 A schematic diagram of the second sub-process of the method to support camera access gateway; Figure 5A schematic block diagram of a gateway device to support camera access. Detailed Implementation

[0013] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0014] It should be understood that, when used in this specification and the appended claims, the terms “comprising” and “including” indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more of its features, integrals, steps, operations, elements, components and / or collections thereof.

[0015] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0016] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0017] Please see Figures 1-4 This embodiment provides an access gateway method that supports cameras, including: S101: Receive a device registration request through the registration server and generate device registration information. The device includes an AOV camera or an AOR camera. The device registration information includes a device serial number. In this embodiment, the Register Server is used for AOV / AOR camera device registration. All devices connected to the gateway platform must register their serial numbers, manufacturers, and models. Specifically, upon receiving a device registration request from an AOV or AOR camera, the Register Server parses the received request data, extracting the device serial number and device type fields. Based on the parsed serial number and type, the Register Server generates device registration information containing the serial number. This generated registration information is stored in the device registry in JSON format, establishing a mapping between the serial number and device type. The Register Server then returns a registration success response to the device that sent the registration request, completing the device registration process.

[0018] S102: Based on the device registration information, create a national standard device agent for the device through the national standard server; In this embodiment, creating a national standard device agent for the device through the national standard server based on the device registration information includes: Based on the device registration information, the device registration request is accepted through the national standard server; Verify that the device has been successfully registered on the registration server; If the device fails to register successfully on the registration server, a device not registered message will be returned. If the device is successfully registered on the registration server, a corresponding national standard device agent will be created for the device.

[0019] This embodiment verifies whether the device has been successfully registered on the registration server, which can filter out AOV / AOR cameras that have not completed compliant registration, prevent illegal or unauthorized devices from accessing the GB / T28181 system, reduce the risk of the system being maliciously accessed or interfered with by abnormal devices, and ensure that all accessed devices are traceable and manageable compliant devices.

[0020] The GB / T28181 Server supports the standard GB / T28181 protocol for AOV / AOR camera GB / T28181 standard access services. After a device registers with the Register Server, it can register with the GB / T28181 Server if it needs to access the national standard platform. Upon successful registration, a virtual client, the GB / T28181 Device Proxy, is automatically created to act as an agent for the device in performing national standard operations. The GB / T28181 Device Proxy is used to perform national standard operations on behalf of the AOV / AOR device; essentially, the client's national standard operations on the device are performed by the GB / T28181 Device Proxy on behalf of the device itself.

[0021] Furthermore, based on device registration information, creating a national standard device agent for a device through a national standard server also includes: Create a virtual device instance on the national standard server based on the device serial number and assign a unique national standard device ID; The session and signaling interaction with the national standard client are maintained through virtual device instances.

[0022] This embodiment creates virtual device instances and assigns unique national standard device IDs based on device serial numbers (unique identifiers). This ensures that each AOV / AOR camera has a unique and standardized identity in the GB / T28181 system, avoiding management misalignment caused by chaotic device information. It also facilitates the national standard server's rapid device location and data link tracing, improving the system's overall management accuracy across multiple devices. Furthermore, by maintaining a unified session with the national standard client and processing signaling interactions (such as device control commands and status feedback signals) through virtual device instances, problems such as incompatible signaling formats and session interruptions that may occur when devices interact directly with the client are avoided. Additionally, virtual device instances can conform to the GB / T28181 standard for signaling transmission processes, ensuring the timing and accuracy of command issuance and response feedback, thus improving interaction stability.

[0023] Specifically, the GB / T 28181 server extracts the device serial number from the received device registration information. Based on this serial number, the GB / T 28181 server creates a corresponding virtual device instance in its internal resource pool. During the virtual device instance creation process, the GB / T 28181 server assigns it a unique GB / T 28181 device ID. This GB / T 28181 device ID is mapped to the original serial number of the physical device and persistently stored. After the virtual device instance is initialized, it begins listening on the standard SIP signaling port. The virtual device instance receives SIP registration requests from GB / T 28181 clients, completes authentication, and establishes a signaling connection. During the session, the virtual device instance is responsible for handling all SIP signaling interactions with the GB / T 28181 client, including but not limited to session invitations, media negotiation, and state subscriptions. The virtual device instance maintains the SIP session state with the GB / T 28181 client until the session ends normally or times out.

[0024] In some embodiments, after creating a corresponding national standard equipment agent for the device, the following steps are included: Verify the online status of the equipment; When the device is offline, disconnect the connection between the national standard device agent and the national standard server; Destroy the agent for the disconnected national standard equipment and record the equipment offline event; The system generates and sends notification and alarm information based on device offline events.

[0025] This embodiment verifies the online status of devices, retains only the national standard device agents associated with online devices, and promptly disconnects and destroys the agent connections for offline devices. This avoids invalid agents occupying the computing, memory, and network connection resources of the national standard server for a long time, ensuring that system resources are concentrated on serving normally operating devices and improving overall resource utilization.

[0026] Specifically, after the national standard equipment agent is successfully created, the system initiates the online status verification process for the equipment. The system sends a status query request to the physical equipment through a heartbeat detection mechanism. If no response is received from the equipment within a set time, the equipment is determined to be offline.

[0027] When a device is determined to be offline, the system immediately triggers a connection disconnection operation, terminating the signaling connection between the national standard device agent and the national standard server. After the connection is disconnected, the system resource manager reclaims the resources occupied by the agent and performs a destruction operation on the national standard device agent instance.

[0028] Next, the system event logger synchronously records the device offline event. The event log includes key information such as the device serial number, national standard device ID, and offline timestamp. The event processing module generates standardized alarm information based on the recorded offline event. The alarm information includes the device identifier and event type.

[0029] Then the message distribution service pushes the generated alarm information to a preset message queue, which is received by the alarm processing system and executes the subsequent notification distribution process, completing the complete processing loop from device status detection to alarm notification.

[0030] In some embodiments, it also includes: Detect the online status of the device and create a corresponding agent instance for the device; When a device is detected to be offline, determine whether the device belongs to a preset set of high-frequency online / offline devices; If it belongs to a set of devices that frequently go online or offline, the proxy instance will be put into a dormant state, and the latest status information of the proxy instance will be cached in the preset storage unit; When a device is detected to be back online, the latest status information is read from the preset storage unit and the dormant agent instance is activated based on the status information. After the proxy instance is activated, update the device's online status indicator and keep the proxy instance active until the device is detected to be offline again.

[0031] By introducing an intelligent proxy state management mechanism, system resource utilization efficiency and response performance are significantly improved. Its core advantage lies in its ability to intelligently identify devices that frequently go online and offline, and adopt a strategy of hibernating proxy instances instead of immediately destroying them. This effectively avoids the system overhead caused by frequently creating and destroying proxy instances, thereby saving computing resources and memory usage. Simultaneously, by caching the latest state information of proxy instances, devices can be quickly activated and restored to their previous working state when they come back online, significantly reducing the time latency of reinitialization and ensuring the continuity of device services and the smoothness of the user experience. Furthermore, this mechanism enhances adaptability to changes in device state, enabling the system to handle scenarios such as network fluctuations or device instability more flexibly, improving overall stability and maintainability.

[0032] S103: Receive an operation request from the national standard client through the national standard server; Specifically, the GB / T server continuously listens on the standard SIP (Session Initiation Protocol) signaling port. When a GB / T client initiates an operation request, the GB / T server receives the request data packet containing the SIP protocol through its network interface. The GB / T server parses the received SIP request message, extracting the Uniform Resource Identifier (Request-URI) header field and message body content. From the parsing result, it obtains the GB / T device ID of the target device and the type of operation requested, which may be a video playback request or a device control request. The GB / T server encapsulates the parsed operation request parameters into an internally standardized task object. This task object is placed in an asynchronous processing queue, awaiting subsequent processing by the GB / T device agent. For INVITE requests (INVITE is the core signaling method in SIP used to initiate multimedia session requests), the GB / T server will first reply with a response to comply with the transaction processing specifications of the SIP protocol.

[0033] S104: When the operation request is to play video, the media adapter selects the target manufacturer's streaming media software development kit according to the manufacturer and device type corresponding to the device serial number to pull the stream to the device, and the media server converts the pulled video stream into a real-time transmission protocol stream in the national standard format. Specifically, the complete signaling and media stream forwarding process for a GB / T28181 client (national standard client) to initiate a video access request is as follows: The GB / T28181 client sends an INVITE request to the GB / T28181 Server, following the national standard protocol, requesting playback of the video stream from the specified device. Upon receiving the request, the GB / T28181 Server queries and matches the GB / T28181 Device Proxy responsible for managing the target device in its system, and then forwards the playback command to this proxy.

[0034] After receiving the instruction, the agent does not communicate directly with the physical device. Instead, it calls the backend Media Adapter to perform the specific streaming operation. The Media Adapter plays a crucial role in protocol conversion here. Based on the manufacturer and model of the target camera, it selects the corresponding private protocol SDK and initiates a streaming request to the actual camera through the AOV / AOR link.

[0035] The raw video stream generated by the camera is first acquired by the media adapter. Then, this raw video stream is sent to the Media Server. The core function of the media server is to standardize the streaming media format; it converts and encapsulates raw video streams from different manufacturers and with different container formats into RTP streams conforming to the GB / T28181 standard.

[0036] Ultimately, this converted, standardized GB / T28181 video stream is distributed to the GB / T28181 client that initially initiated the request via the GB / T28181 server, thus completing a full cross-protocol video retrieval. The entire process is completed within the gateway, shielding the technical details from both front-end and back-end clients and devices, achieving seamless GB / T28181 access for heterogeneous devices.

[0037] In some embodiments, performing a streaming operation on a device by selecting a target manufacturer's streaming media software development kit based on the manufacturer and device type corresponding to the device serial number via a media adapter includes: Query the video stream protocol type corresponding to the device model from the preset manufacturer protocol mapping table; The streaming operation is completed by calling the software development kit interface that matches the video stream protocol type.

[0038] Specifically, the media adapter receives a streaming request containing the device serial number. Based on the received device serial number, the media adapter queries a pre-defined vendor protocol mapping table. This table stores the correspondence between device models and video streaming protocol types, including RTSP, RTMP, and Web RTC. The media adapter retrieves the video streaming protocol type corresponding to the device model from the query results. Based on the determined video streaming protocol type, the media adapter loads the corresponding target vendor's streaming media software development kit (SDK) dynamic library. The media adapter calls the initialization interface provided by the SSDK to establish a connection channel with the physical device. It then sends a video streaming request command to the target device through the SSDK's streaming interface. The media adapter receives the video streaming data returned by the device, completing the streaming operation.

[0039] Among them, the Media Adapter is a component that adapts to cameras from various manufacturers to pull video streams. The Media Adapter shields the differences in signaling and video stream protocols between different manufacturers, and can automatically select signaling and protocols for devices from different manufacturers to pull video streams from cameras.

[0040] In some embodiments, converting the pulled video stream into a Real-Time Transport Protocol (RTP) stream in GB / T format via a media server includes: Obtain network status parameters of the national standard client and video stream quality parameters of the device; Based on network condition parameters and video stream quality parameters, the target video stream processing mode is determined. The target video stream processing mode includes transcoding mode or transpackaging mode. When the target video stream processing mode is transcoding mode, the video stream is decoded and then re-encoded to generate a bitrate video stream that matches the network conditions of the national standard client. When the target video stream processing mode is transcoding mode, the video stream is converted to a transcoding format to generate a real-time transmission protocol stream that conforms to the national standard format.

[0041] This embodiment acquires network status parameters from the national standard client, enabling the system to perceive downstream network bandwidth and latency conditions in real time. Combined with the device's video stream quality parameters, the media server intelligently selects the most suitable processing mode. When network bandwidth is limited, a transcoding mode is used to adjust the video bitrate, avoiding data packet loss and playback stuttering; when network conditions are good, a transcoding mode is used to reduce processing latency and ensure video real-time performance.

[0042] Specifically, the media server obtains network status parameters from the national standard client through the quality detection module, including available bandwidth and transmission latency data. Simultaneously, it receives video stream quality parameters from the media adapter, including the original video bitrate and encoding format information.

[0043] The media server inputs network condition parameters and video stream quality parameters into the decision engine, which analyzes and calculates them using a pre-defined algorithm model. Based on the parameter analysis results, the decision engine outputs the target video stream processing mode, which selects between transcoding mode and transpackaging mode.

[0044] When the target video stream is in transcoding mode, the media server starts the decoder to decode the original video stream, obtaining uncompressed frame data. Then, based on the client's network conditions, the target bitrate is calculated, and the video encoder re-encodes the frame data according to the target bitrate, generating a compressed video stream adapted to the network bandwidth.

[0045] When the target video stream is processed in transcoding mode, the media server parses the encapsulation format of the original video stream and extracts the encoded video data. The encoded video data is then encapsulated into RTP data packets according to the GB / T28181 standard, generating a real-time transport protocol stream that conforms to the national standard format.

[0046] The final generated real-time transmission protocol stream is sent to the target national standard client through the network interface of the media server.

[0047] Among them, the Media Server is used to convert various audio and video protocols into the RTP protocol of GB / T28181.

[0048] In some embodiments, it also includes: Check the current operating status of the media server; When a single point of failure risk is detected in the media server, multiple media servers are deployed to form a redundant node group; The real-time load information of each media server in the redundant node group is obtained through a load balancing algorithm. Based on real-time load information, the streaming operation is distributed to the media server with the lowest load in the redundant node group; The retrieved video stream is converted into a real-time transmission protocol stream in the national standard format using the media server with the lowest load.

[0049] By monitoring the media server status in real time, redundant node groups can be quickly deployed when a single point of failure is detected, preventing video stream processing interruptions due to the failure of a single server and ensuring service continuity. Simultaneously, a load balancing algorithm distributes streaming tasks to the least loaded nodes, balancing resource usage across servers and preventing stuttering or latency due to overload on some nodes, thus improving overall video stream processing efficiency. Furthermore, a dynamically adaptable node scheduling mode can flexibly respond to load fluctuations, ensuring the timeliness and reliability of national standard format conversion and optimizing the user experience of national standard clients.

[0050] Specifically, the system continuously monitors the current operating status of the media server through a health check service. The health check service periodically sends probe requests to the media server and collects performance metrics, including CPU utilization, memory usage, and network throughput.

[0051] When performance metrics exceed preset thresholds, the system determines that the media server has a single point of failure risk. Based on this determination, the container orchestration platform automatically deploys multiple media server instances to form a redundant node group.

[0052] Next, the load balancer obtains real-time load information for each media server in the redundant node group through the monitoring interface. The load information includes key indicators such as the current number of connections, processing queue length, and resource utilization.

[0053] Then, based on the collected real-time load information, the load balancer calculates the load score for each node using the least connections algorithm. Based on the score, the load balancer distributes new streaming requests to the media server with the lowest load in the redundant node group.

[0054] The selected media server then receives the assigned task, performs the video stream retrieval operation, and converts the retrieved video stream into a real-time transport protocol stream conforming to the GB / T28181 standard. The converted video stream is then returned to the requester through a load balancer, completing the high-availability media processing flow.

[0055] S105: When the operation request is for device control, the control adapter selects the target manufacturer's device operation software development kit according to the manufacturer and device type corresponding to the device serial number to issue instructions to the device.

[0056] Specifically, the GB / T client sends an INVITE message to the GB / T server, intending to operate on a specific device. Upon receiving the request, the GB / T server first checks if a corresponding GB / T device agent exists. If the query finds no GB / T device agent, the GB / T server will directly return a message to the client indicating that the device is not registered, and the entire process will terminate. If a GB / T device agent exists, the GB / T server will notify the agent that the GB / T client has initiated an operation request.

[0057] After the GB / T 28181 control agent is activated, it first activates the underlying AOV / AOR device. Upon receiving a successful activation response, the agent invokes the control adapter. The control adapter plays a crucial role in protocol conversion, translating standard GB / T 28181 control commands into specific protocol commands recognizable by the target device and issuing them to the device for execution. After completing the operation, the device returns the result to the control adapter, which then returns the result to the device agent.

[0058] Finally, the national standard equipment agent encapsulates the equipment operation results into a standard format and returns them to the client that initially initiated the request via the national standard server, thus completing a complete equipment control loop.

[0059] The Control Adapter is used to operate the adapter components of cameras from various manufacturers. This adapter shields the incompatibility of device control protocols between different manufacturers and provides unified operating instructions and protocols for operating cameras from different manufacturers. It supports operating cameras from different manufacturers through standard national standard protocols.

[0060] In some embodiments, a device behavior profile library is established in the control adapter. By analyzing the device's event trigger records, client access periods, and AI-identified target types, a device activity prediction model is constructed. Before the predicted high-activity period, the system triggers low-power wake-up signals from adjacent devices through a device linkage mechanism, forming a device autonomous collaborative wake-up network, which significantly reduces the communication overhead and latency of platform-initiated wake-up.

[0061] Specifically, it collects multi-dimensional data on event trigger records during device operation, client access periods, and AI-identified target types; Next, based on multi-dimensional data, a device activity prediction model is built using machine learning algorithms. The model outputs the prediction result as the probability of device activity in a future preset period. When the prediction results indicate that the target device is in a period of high activity probability, the set of adjacent devices that have spatial or functional association with the target device is determined according to the preset linkage rules. Then, a collaborative wake-up command is sent to the already woken-up master control device, and the master control device sends a low-power wake-up signal to the set of adjacent devices based on the inter-device communication protocol; Then, it receives wake-up responses from neighboring devices and updates the status of neighboring devices to active status, forming a device autonomous collaborative wake-up network; Then, maintain the communication link of the autonomous collaborative wake-up network within the preset collaboration period until the end of the active period or a change in device status is detected.

[0062] In some embodiments, it also includes: Receive service requests from clients and generate request information containing device identifiers; Based on the requested information, query the device load status and generate load assessment results; Multiple virtual device instances are dynamically created based on the load assessment results to form a virtual device cluster; Service requests are distributed to different instances in the virtual device cluster for processing using a load balancing algorithm; The processing results from each virtual device instance are aggregated to generate a unified response message that is returned to the client.

[0063] By dynamically creating multiple virtual device instances to form a processing cluster, centralized client requests can be automatically distributed to different instances for parallel processing. This architecture effectively overcomes the processing bottleneck of a single device instance, enabling the system to support large-scale concurrent access and significantly improving overall service throughput. Simultaneously, the number of virtual instances is dynamically adjusted based on real-time load assessment results, ensuring a precise match between computing resources and actual load demands. The load balancing algorithm intelligently allocates requests according to the real-time processing capabilities of each instance, avoiding resource waste caused by some instances being overloaded while others remain idle, greatly improving resource utilization.

[0064] Specifically, it receives service requests sent by clients, which include the target device identifier and the operation type; Based on the target device identifier, query the preset device load database to obtain the current device's CPU utilization, memory usage, and network bandwidth utilization. The system calculates a weighted score of the equipment load parameters, generates a load assessment result, and dynamically adjusts the score threshold based on historical load fluctuation data. If the load assessment result exceeds the preset expansion threshold, multiple virtual device instances will be dynamically created based on the target device identifier, and each instance will be assigned an independent session channel and media resource identifier; Service requests are distributed to target instances in the set of virtual device instances using load balancing algorithms such as weighted round-robin or least connections. The target instance performs protocol conversion, media stream processing, and control command response operations to generate interactive data conforming to the GB / T28181 standard. Collect the processing results of each virtual device instance, verify the data integrity, perform format standardization processing, and generate unified response information; The unified response information is encapsulated into a standard message format and returned to the client, and the real-time load status of the target device in the device load database is updated.

[0065] In virtual device clusters, intelligently distributing service requests to target instances using load balancing algorithms is a core element in improving system processing capacity and resource utilization. The following section details the distribution mechanisms of two classic algorithms: weighted round-robin and least connections. I. Weighted Round Robin Algorithm This method distributes virtual devices in a round-robin fashion based on the processing power (weight) of each virtual device instance, ensuring that high-performance instances handle more of the load.

[0066] The implementation process is as follows: Initialize weight configuration: Assign a weight value to each virtual device instance in the cluster. This weight is typically determined based on the instance's hardware configuration (such as the number of CPU cores and memory size) or benchmark performance test results. For example, instance A (weight=3), instance B (weight=2), and instance C (weight=1).

[0067] Next, a request distribution sequence is constructed: a smooth polling sequence is generated based on the weight values. Taking the weights mentioned above as an example, a complete polling cycle may generate the sequence [A,A,A,B,B,C], ensuring that in 6 requests, instance A processes 3 times, B processes 2 times, and C processes 1 time.

[0068] Requests are then distributed sequentially: the load balancer maintains a pointer to the current position in the sequence. When a new service request is received, it is dispatched to the instance currently pointed to by the pointer in the sequence, and then the pointer is moved to the next position in the sequence. When the pointer reaches the end of the sequence, it is automatically reset to the beginning of the sequence, and a new round of looping begins.

[0069] Dynamic weight adjustment (optional advanced feature): The system can monitor the real-time health status of each instance (such as response time and error rate). If a performance degradation of an instance is detected, its weight can be dynamically reduced, temporarily decreasing the number of requests allocated to it until its performance recovers.

[0070] The advantage of this algorithm is that it is simple to implement and can strictly allocate requests according to the preset performance ratio, thus avoiding idle high-performance instance resources.

[0071] II. Least Connections Algorithm This method dynamically distributes new requests to the instance with the fewest currently active connections, aiming to achieve real-time load balancing across all instances.

[0072] The implementation process is as follows: Establish a connection count statistics mechanism: The load balancer maintains a lightweight heartbeat or status reporting channel with each virtual device instance. Each instance periodically (e.g., every second) reports the number of active service request connections it is currently processing to the load balancer.

[0073] Maintaining a real-time connection count mapping table: The load balancer maintains a mapping table of [instance ID - current connection count] in memory and continuously updates this table based on instance reports.

[0074] Target Instance Selection: When a new service request arrives, the load balancer queries the current connection count mapping table and filters out the set of instances with the minimum number of current connections. If multiple instances have the same minimum number of connections, one can be selected as the target instance using either round-robin or random selection.

[0075] Distribute requests and update status: The request is routed to the selected target instance, and the connection count of that instance in the mapping table is immediately incremented by 1. When the instance finishes processing the request and closes the connection, it notifies the load balancer through a status reporting mechanism, and the load balancer decrements its connection count by 1.

[0076] The advantage of this algorithm lies in its dynamic perception capability, which can automatically direct requests to the most "idle" instance. It is particularly suitable for scenarios where the processing time of each request is uncertain, and can achieve more refined real-time load balancing.

[0077] Please see Figure 5 This embodiment provides an access gateway device 200 that supports cameras, including: Registration server 201 is used to receive device registration requests and generate device registration information. The device includes an AOV camera or an AOR camera; the device registration information includes a device serial number. The national standard server 202 is used to create a national standard device agent for the device based on the device registration information; GB / T server 202 is used to receive operation requests from GB / T clients; Media adapter 203 is used to select the target manufacturer's streaming media software development kit to pull the stream to the device according to the manufacturer and device type corresponding to the device serial number when the operation request is to play video; Media server 204 is used to convert the pulled video stream into a real-time transmission protocol stream in the national standard format; The control adapter 205 is used to send instructions to the device by selecting the target manufacturer's device operation software development kit according to the manufacturer and device type corresponding to the device serial number when the operation request is device control.

[0078] Furthermore, the national standard server 202 is also used for: Based on the device registration information, accept the device registration request; Verify whether the device has been successfully registered with the registration server; If the device fails to register successfully with the registration server, a device not registered message will be returned. If the device is successfully registered on the registration server, a corresponding national standard device agent will be created for the device.

[0079] Furthermore, the national standard server 202 is also used for: Verify the online status of the device; When the device is offline, disconnect the connection between the national standard device agent and the national standard server; Destroy the agent for the disconnected national standard equipment and record the equipment offline event; Based on the device offline event, a notification and alarm message is generated and sent.

[0080] Furthermore, the national standard server 202 is also used for: A virtual device instance is created in the national standard server based on the device serial number, and a unique national standard device ID is assigned. The virtual device instance maintains the session and signaling interaction with the national standard client.

[0081] Furthermore, the media adapter 203 is also used for: Query the video stream protocol type corresponding to the device model from the preset manufacturer protocol mapping table; The streaming operation is completed by calling the software development kit interface that matches the video stream protocol type.

[0082] Furthermore, the media server 204 is used for: Obtain the network status parameters of the national standard client and the video stream quality parameters of the device; Based on the network condition parameters and the video stream quality parameters, a target video stream processing mode is determined, which includes a transcoding mode or a transpackaging mode. When the target video stream processing mode is transcoding mode, a decoding and re-encoding operation is performed on the video stream to generate a bitrate video stream that matches the network conditions of the national standard client. When the target video stream processing mode is the trans-encapsulation mode, the encapsulation format conversion operation is performed on the video stream to generate a real-time transmission protocol stream that conforms to the national standard format.

[0083] Furthermore, the media adapter 203 is also used for: Check the current operating status of the media server; When a single point of failure risk is detected in the media server, multiple media servers are deployed to form a redundant node group; The real-time load information of each media server in the redundant node group is obtained through a load balancing algorithm. Based on the real-time load information, the streaming operation is assigned to the media server with the lowest load in the redundant node group; The retrieved video stream is converted into a real-time transmission protocol stream in the national standard format using the media server with the lowest load.

[0084] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described apparatus and unit can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0085] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed, can implement the methods provided in the above embodiments. The storage medium may include various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0086] The present invention also provides a computer device, which may include a memory and a processor. The memory stores a computer program, and when the processor calls the computer program in the memory, it can implement the methods provided in the above embodiments. Of course, the computer device may also include various network interfaces, power supplies, and other components.

[0087] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section. It should be noted that those skilled in the art can make various improvements and modifications to this invention without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this invention.

[0088] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusivity.

[0089] The term "comprises" implies that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprises a..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

Claims

1. A method for accessing a camera via a gateway, characterized in that, include: The registration server receives registration requests from devices and generates device registration information. The devices include AOV cameras or AOR cameras. The device registration information includes the device serial number; Based on the device registration information, a national standard device agent is created for the device through the national standard server; The GB / T server receives operation requests from GB / T clients. When the operation request is to play a video, the media adapter selects the target manufacturer's streaming media software development kit according to the manufacturer and device type corresponding to the device serial number to pull the stream to the device, and the media server converts the pulled video stream into a real-time transmission protocol stream in the national standard format. When the operation request is for device control, the control adapter selects the target manufacturer's device operation software development kit based on the manufacturer and device type corresponding to the device serial number to issue instructions to the device.

2. The access gateway method supporting cameras according to claim 1, characterized in that, The step of creating a national standard device agent for the device through the national standard server based on the device registration information includes: Based on the device registration information, the device registration request is accepted through the national standard server; Verify whether the device has been successfully registered with the registration server; If the device fails to register successfully with the registration server, a device not registered message will be returned. If the device is successfully registered on the registration server, a corresponding national standard device agent will be created for the device.

3. The access gateway method supporting cameras according to claim 2, characterized in that, After creating a corresponding national standard equipment agent for the aforementioned equipment, the following steps are included: Verify the online status of the device; When the device is offline, disconnect the connection between the national standard device agent and the national standard server; Destroy the agent for the disconnected national standard equipment and record the equipment offline event; Based on the device offline event, a notification and alarm message is generated and sent.

4. The access gateway method supporting cameras according to claim 1, characterized in that, The step of creating a national standard device agent for the device through the national standard server based on the device registration information also includes: A virtual device instance is created in the national standard server based on the device serial number, and a unique national standard device ID is assigned. The virtual device instance maintains the session and signaling interaction with the national standard client.

5. The access gateway method supporting cameras according to claim 1, characterized in that, The step of selecting a target manufacturer's streaming media software development kit based on the manufacturer and device type corresponding to the device serial number via a media adapter to perform the streaming operation on the device includes: Query the video stream protocol type corresponding to the device model from the preset manufacturer protocol mapping table; The streaming operation is completed by calling the software development kit interface that matches the video stream protocol type.

6. The access gateway method supporting cameras according to claim 1, characterized in that, The process of converting the retrieved video stream into a real-time transmission protocol stream in the national standard format via a media server includes: Obtain the network status parameters of the national standard client and the video stream quality parameters of the device; Based on the network condition parameters and the video stream quality parameters, a target video stream processing mode is determined, which includes a transcoding mode or a transpackaging mode. When the target video stream processing mode is transcoding mode, a decoding and re-encoding operation is performed on the video stream to generate a bitrate video stream that matches the network conditions of the national standard client. When the target video stream processing mode is the trans-encapsulation mode, the encapsulation format conversion operation is performed on the video stream to generate a real-time transmission protocol stream that conforms to the national standard format.

7. The access gateway method supporting cameras according to claim 1, characterized in that, Also includes: Check the current operating status of the media server; When a single point of failure risk is detected in the media server, multiple media servers are deployed to form a redundant node group; The real-time load information of each media server in the redundant node group is obtained through a load balancing algorithm. Based on the real-time load information, the streaming operation is assigned to the media server with the lowest load in the redundant node group; The retrieved video stream is converted into a real-time transmission protocol stream in the national standard format using the media server with the lowest load.

8. An access gateway device supporting cameras, characterized in that, include: The registration server is used to receive device registration requests and generate device registration information. The devices include AOV cameras or AOR cameras. The device registration information includes the device serial number; The national standard server is used to create a national standard device agent for the device based on the device registration information; The GB / T server is used to receive operation requests from GB / T clients; The media adapter is used to select the target manufacturer's streaming media software development kit to pull the stream to the device when the operation request is to play video, based on the manufacturer and device type corresponding to the device serial number. The media server is used to convert the pulled video stream into a real-time transmission protocol stream in the national standard format; The control adapter is used to send instructions to the device by selecting the target manufacturer's device operation software development kit based on the manufacturer and device type corresponding to the device serial number when the operation request is for device control.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the access gateway method supporting cameras as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to perform the camera-supported access gateway method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Video monitoring system based on video resource safety gateway

    CN104954764A

  • A business processing method and system

    CN108632525B

  • Conversion method and device from ONVIF device to GB28181 device and storage medium

    CN115914411A