Raw data interface encapsulation method and system based on webcam sdk
Patent Information
- Application Number
- CN202211573056.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-08
- Publication Date
- 2026-10-20
- Estimated Expiration
- 2042-12-08
AI Technical Summary
[0003]本发明提供了基于网络摄像头sdk的原始数据接口封装方法和系统,用以解决络摄像头的延迟的问题:
[0035]本发明提出的基于网络摄像头sdk的原始数据接口封装方法和系统的封装使用类库,可以集成开发和api调用,由于实时获取原始视频流,自处理流程可控,延迟可调整,对于工业物联网智能应用提供低延时服务,有效降低延时时长,进而提高用户的网络摄像头使用体验感。
Smart Images

Figure CN116827918B_ABST
Abstract
Description
Technical Field
[0001] This invention proposes a method and system for encapsulating the raw data interface based on a network camera SDK, belonging to the field of interface encapsulation technology. Background Technology
[0002] In the context of intelligent industrial IoT, computer vision's image recognition, object detection, and image semantic segmentation rely heavily on real-time cameras. Non-network cameras have significant limitations, and the latency of network cameras greatly diminishes the user experience. Currently, the mainstream approach is to use the network camera's built-in application to obtain streaming data via protocols such as RTSP and RTMP. Therefore, the latency of network cameras leads to a poor user experience. Summary of the Invention
[0003] This invention provides a method and system for encapsulating the raw data interface based on a network camera SDK, in order to solve the latency problem of network cameras:
[0004] A method for encapsulating the raw data interface based on a network camera SDK, the method comprising:
[0005] Based on the encapsulation request signal sent by the network camera SDK, obtain the target encapsulation file;
[0006] An interface calling function is established for the target encapsulation file, and the original data interface of the network camera SDK is encapsulated based on the calling function and the target encapsulation file;
[0007] It monitors in real time whether all network camera SDKs included are fully packaged, and automatically packages any network camera SDKs that are not fully packaged.
[0008] Further, based on the encapsulation request signal sent by the network camera SDK, the target encapsulation file is obtained, including:
[0009] The network camera SDK is encoded to obtain an encoded network camera SDK; wherein the encoding of the network camera SDK is uniquely associated with the network camera SDK.
[0010] Real-time monitoring and acquisition of encapsulation request signals sent by the network camera SDK; wherein, the encapsulation request signal contains an encoding that uniquely corresponds to the network camera SDK;
[0011] After receiving the encapsulation request signal sent by the network camera SDK, the target encapsulation file corresponding to the original data interface of the network camera SDK is obtained.
[0012] Furthermore, it monitors in real time whether all included network camera SDKs have been fully packaged, and automatically packages any incompletely packaged network camera SDKs, including:
[0013] By comparing the serial numbers of the completed and uncompleted network camera SDKs, it can be determined whether there is an uncompleted network camera SDK.
[0014] When an incompletely packaged network camera SDK exists, extract the ID of the incompletely packaged network camera SDK and record the ID;
[0015] The target encapsulation file is automatically configured for the network camera SDK, an interface call function is established for the target encapsulation file, and the raw data interface of the network camera SDK is encapsulated according to the call function and the target encapsulation file.
[0016] Furthermore, by comparing the serial numbers of the fully packaged network camera SDK and the incompletely packaged network camera SDK, it is determined whether there is an incompletely packaged network camera SDK, including:
[0017] Extract the IDs of all network camera SDKs and the corresponding IDs of the fully packaged network camera SDKs;
[0018] The meaning of the serial numbers of all the network camera SDKs is compared with the serial numbers of the network camera SDKs that have been fully packaged, and the network camera SDKs that have not been fully packaged are obtained.
[0019] A raw data interface encapsulation system based on a network camera SDK, the raw data interface encapsulation system comprising:
[0020] The file acquisition module is used to acquire the target encapsulation file based on the encapsulation request signal sent by the network camera SDK;
[0021] An interface encapsulation module is used to create an interface call function for the target encapsulation file, and encapsulate the raw data interface of the network camera SDK according to the call function and the target encapsulation file;
[0022] The self-encapsulation module is used to monitor in real time whether all network camera SDKs included have been fully encapsulated, and to self-encapsulate network camera SDKs that have not been fully encapsulated.
[0023] Furthermore, the file acquisition module includes:
[0024] The SDK acquisition module is used to encode the network camera SDK to obtain an encoded network camera SDK; wherein the encoding of the network camera SDK is uniquely associated with the network camera SDK.
[0025] The real-time monitoring module is used to monitor and acquire the encapsulation request signal sent by the network camera SDK in real time; wherein, the encapsulation request signal contains an encoding that uniquely corresponds to the network camera SDK;
[0026] The encapsulation file acquisition module is used to acquire the target encapsulation file corresponding to the original data interface of the network camera SDK after receiving the encapsulation request signal sent by the network camera SDK.
[0027] Furthermore, the self-packaging module includes:
[0028] The comparison module is used to determine whether there is an unpackaged network camera SDK by comparing the serial numbers of the packaged network camera SDK and the unpackaged network camera SDK.
[0029] The number recording module is used to extract the number of an incompletely packaged network camera SDK and record the number when an incompletely packaged network camera SDK exists.
[0030] The function call module is used to automatically configure the target encapsulation file for the network camera SDK, establish an interface call function for the target encapsulation file, and encapsulate the raw data interface of the network camera SDK according to the call function and the target encapsulation file.
[0031] Furthermore, the comparison module includes:
[0032] The ID extraction module is used to extract the IDs of all network camera SDKs and the IDs corresponding to the fully packaged network camera SDKs.
[0033] The module for obtaining unpackaged SDKs is used to compare the IDs of all network camera SDKs with the IDs of the network camera SDKs that have been packaged, and to obtain the network camera SDKs that have not been packaged.
[0034] Beneficial effects of this invention:
[0035] The proposed method and system for encapsulating the raw data interface based on the network camera SDK can be integrated for development and API calls. Because it acquires the raw video stream in real time, the self-processing flow is controllable and the latency is adjustable, it provides low-latency services for industrial IoT smart applications, effectively reducing latency and thus improving the user's network camera experience. Attached Figure Description
[0036] Figure 1 This is a flowchart of the method described in this invention;
[0037] Figure 2 This is a system block diagram of the system described in this invention. Detailed Implementation
[0038] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0039] This invention proposes a method for encapsulating the raw data interface based on a network camera SDK, such as... Figure 1 As shown, the raw data interface encapsulation method includes:
[0040] S1. Obtain the target encapsulation file based on the encapsulation request signal sent by the network camera SDK;
[0041] S2. Establish an interface call function for the target encapsulation file, and encapsulate the raw data interface of the network camera SDK according to the call function and the target encapsulation file;
[0042] S3. Real-time monitoring of whether all network camera SDKs included are fully packaged, and automatic packaging of network camera SDKs that are not fully packaged.
[0043] The working principle of the above technical solution is as follows: First, the target encapsulation file is obtained according to the encapsulation request signal sent by the network camera SDK; then, an interface call function is established for the target encapsulation file, and the original data interface of the network camera SDK is encapsulated according to the call function and the target encapsulation file; finally, it monitors in real time whether all network camera SDKs currently included have been encapsulated, and performs autonomous encapsulation on network camera SDKs that have not been encapsulated.
[0044] The effects of the above technical solution are as follows: The encapsulation method of the raw data interface based on the network camera SDK proposed in this embodiment can be integrated with the development and API calls. Since the raw video stream is acquired in real time, the self-processing process is controllable and the latency is adjustable, providing low-latency services for industrial IoT smart applications, effectively reducing latency, and thus improving the user's network camera experience.
[0045] In one embodiment of the present invention, obtaining a target encapsulation file based on an encapsulation request signal sent by the network camera SDK includes:
[0046] S101. Encode the network camera SDK to obtain an encoded network camera SDK; wherein, the encoding of the network camera SDK uniquely corresponds to the network camera SDK.
[0047] S102. Monitor and acquire the encapsulation request signal sent by the network camera SDK in real time; wherein, the encapsulation request signal contains an encoding that uniquely corresponds to the network camera SDK;
[0048] S103. After receiving the encapsulation request signal sent by the network camera SDK, obtain the target encapsulation file corresponding to the original data interface of the network camera SDK.
[0049] The working principle of the above technical solution is as follows: First, the network camera SDK is encoded to obtain an encoded network camera SDK; wherein, the encoding of the network camera SDK uniquely corresponds to the network camera SDK; then, the encapsulation request signal sent by the network camera SDK is monitored and acquired in real time; wherein, the encapsulation request signal contains the encoding uniquely corresponding to the network camera SDK; finally, after receiving the encapsulation request signal sent by the network camera SDK, the target encapsulation file corresponding to the original data interface of the network camera SDK is acquired.
[0050] The above technical solution achieves the following effects: real-time acquisition of raw video streams, controllable self-processing workflow, adjustable latency, providing low-latency services for industrial IoT intelligent applications, effectively reducing latency duration, and thus improving the user experience of network cameras.
[0051] One embodiment of the present invention involves real-time monitoring of whether all currently included network camera SDKs have been fully packaged, and automatically packaging network camera SDKs that have not been fully packaged, including:
[0052] S301. Based on the comparison of the serial numbers of the completed and uncompleted network camera SDKs, determine whether there is an uncompleted network camera SDK.
[0053] S302. When there is an incompletely packaged network camera SDK, extract the number of the incompletely packaged network camera SDK and record the number;
[0054] S303. Automatically configure the target encapsulation file for the network camera SDK, establish an interface call function for the target encapsulation file, and encapsulate the original data interface of the network camera SDK according to the call function and the target encapsulation file.
[0055] The working principle of the above technical solution is as follows: First, by comparing the serial numbers of the completed and uncompleted network camera SDKs, it is determined whether an uncompleted network camera SDK exists. Then, when an uncompleted network camera SDK exists, its serial number is extracted and recorded. Finally, a target packaging file is automatically configured for the network camera SDK, an interface call function is established for the target packaging file, and the original data interface of the network camera SDK is packaged according to the call function and the target packaging file.
[0056] The above technical solution achieves the following effects: real-time acquisition of raw video streams, controllable self-processing workflow, adjustable latency, providing low-latency services for industrial IoT intelligent applications, effectively reducing latency duration, and thus improving the user experience of network cameras.
[0057] In one embodiment of the present invention, determining whether an unpackaged network camera SDK exists is based on a comparison of the serial numbers of a fully packaged network camera SDK and an unpackaged network camera SDK, including:
[0058] S3011. Extract the IDs of all network camera SDKs and the IDs corresponding to the packaged network camera SDKs.
[0059] S3012. Compare the meaning of the IDs of all network camera SDKs with the IDs of the network camera SDKs that have been fully packaged, and obtain the network camera SDKs that have not been fully packaged.
[0060] The working principle of the above technical solution is as follows: First, extract the IDs of all network camera SDKs and the IDs corresponding to the network camera SDKs that have been fully packaged; then, compare the meanings of the IDs of all network camera SDKs and the IDs corresponding to the network camera SDKs that have been fully packaged to obtain the network camera SDKs that have not been fully packaged.
[0061] The above technical solution effectively improves the monitoring efficiency and effectiveness of the completed network camera SDK packaging, and prevents the problem of reduced packaging quality caused by the existence of unpackaged network camera SDKs.
[0062] This invention proposes a raw data interface encapsulation system based on a network camera SDK, such as... Figure 2 As shown, the raw data interface encapsulation system includes:
[0063] The file acquisition module is used to acquire the target encapsulation file based on the encapsulation request signal sent by the network camera SDK;
[0064] An interface encapsulation module is used to create an interface call function for the target encapsulation file, and encapsulate the raw data interface of the network camera SDK according to the call function and the target encapsulation file;
[0065] The self-encapsulation module is used to monitor in real time whether all network camera SDKs included have been fully encapsulated, and to self-encapsulate network camera SDKs that have not been fully encapsulated.
[0066] The working principle of the above technical solution is as follows: First, the file acquisition module obtains the target encapsulation file according to the encapsulation request signal sent by the network camera SDK; then, the interface encapsulation module establishes an interface call function for the target encapsulation file, and encapsulates the original data interface of the network camera SDK according to the call function and the target encapsulation file; finally, the autonomous encapsulation module monitors in real time whether all network camera SDKs currently included have been encapsulated, and autonomously encapsulates the network camera SDKs that have not been encapsulated.
[0067] The effects of the above technical solution are as follows: The encapsulation and use of the class library of the raw data interface encapsulation system based on the network camera SDK proposed in this embodiment can be integrated for development and API calls. Since the raw video stream is acquired in real time, the self-processing process is controllable and the latency is adjustable, providing low-latency services for industrial IoT intelligent applications, effectively reducing latency duration, and thus improving the user's network camera experience.
[0068] In one embodiment of the present invention, the file acquisition module includes:
[0069] The SDK acquisition module is used to encode the network camera SDK to obtain an encoded network camera SDK; wherein the encoding of the network camera SDK is uniquely associated with the network camera SDK.
[0070] The real-time monitoring module is used to monitor and acquire the encapsulation request signal sent by the network camera SDK in real time; wherein, the encapsulation request signal contains an encoding that uniquely corresponds to the network camera SDK;
[0071] The encapsulation file acquisition module is used to acquire the target encapsulation file corresponding to the original data interface of the network camera SDK after receiving the encapsulation request signal sent by the network camera SDK.
[0072] The working principle of the above technical solution is as follows: First, the network camera SDK is encoded by the SDK acquisition module to obtain an encoded network camera SDK; wherein, the encoding of the network camera SDK is uniquely associated with the network camera SDK; then, the real-time monitoring module monitors and acquires the encapsulation request signal sent by the network camera SDK in real time; wherein, the encapsulation request signal contains the encoding uniquely associated with the network camera SDK; finally, after receiving the encapsulation request signal sent by the network camera SDK, the encapsulation file acquisition module acquires the target encapsulation file corresponding to the original data interface of the network camera SDK.
[0073] The above technical solution achieves the following effects: real-time acquisition of raw video streams, controllable self-processing workflow, adjustable latency, providing low-latency services for industrial IoT intelligent applications, effectively reducing latency duration, and thus improving the user experience of network cameras.
[0074] In one embodiment of the present invention, the self-packaging module includes:
[0075] The comparison module is used to determine whether there is an unpackaged network camera SDK by comparing the serial numbers of the packaged network camera SDK and the unpackaged network camera SDK.
[0076] The number recording module is used to extract the number of an incompletely packaged network camera SDK and record the number when an incompletely packaged network camera SDK exists.
[0077] The function call module is used to automatically configure the target encapsulation file for the network camera SDK, establish an interface call function for the target encapsulation file, and encapsulate the raw data interface of the network camera SDK according to the call function and the target encapsulation file.
[0078] The working principle of the above technical solution is as follows: First, the comparison module compares the serial numbers of the completed and uncompleted network camera SDKs to determine whether an uncompleted network camera SDK exists. Then, the serial number recording module extracts and records the serial number of the uncompleted network camera SDK when it exists. Finally, the function call creation module automatically configures the target packaging file for the network camera SDK, creates an interface call function for the target packaging file, and encapsulates the original data interface of the network camera SDK based on the call function and the target packaging file.
[0079] The above technical solution achieves the following effects: real-time acquisition of raw video streams, controllable self-processing workflow, adjustable latency, providing low-latency services for industrial IoT intelligent applications, effectively reducing latency duration, and thus improving the user experience of network cameras.
[0080] In one embodiment of the present invention, the comparison module includes:
[0081] The ID extraction module is used to extract the IDs of all network camera SDKs and the IDs corresponding to the fully packaged network camera SDKs.
[0082] The module for obtaining unpackaged SDKs is used to compare the IDs of all network camera SDKs with the IDs of the network camera SDKs that have been packaged, and to obtain the network camera SDKs that have not been packaged.
[0083] The working principle of the above technical solution is as follows: First, the number of all network camera SDKs and the corresponding number of the network camera SDKs that have been packaged are extracted by the number extraction module; then, the number of the unpackaged SDK is obtained by comparing the meaning of the numbers of all network camera SDKs and the corresponding numbers of the network camera SDKs that have been packaged, and the network camera SDKs that have not been packaged are obtained.
[0084] The above technical solution effectively improves the monitoring efficiency and effectiveness of the completed network camera SDK packaging, and prevents the problem of reduced packaging quality caused by the existence of unpackaged network camera SDKs.
[0085] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A method for encapsulating the raw data interface based on a network camera SDK, characterized in that, The raw data interface encapsulation method includes: According to the encapsulation request signal sent by the network camera SDK, the target encapsulation file is obtained, including: encoding the network camera SDK to obtain an encoded network camera SDK; wherein the encoding of the network camera SDK uniquely corresponds to the network camera SDK; real-time monitoring and acquisition of the encapsulation request signal sent by the network camera SDK; wherein the encapsulation request signal contains an encoding uniquely corresponding to the network camera SDK; after receiving the encapsulation request signal sent by the network camera SDK, the target encapsulation file corresponding to the original data interface of the network camera SDK is obtained; An interface call function is established for the target package file, and the raw data interface of the network camera SDK is packaged according to the call function and the target package file. This includes: extracting the IDs of all network camera SDKs and the IDs corresponding to the packaged network camera SDKs; comparing the IDs of all network camera SDKs with the IDs corresponding to the packaged network camera SDKs one by one to obtain the unpackaged network camera SDKs; extracting the IDs of the unpackaged network camera SDKs and recording them; automatically configuring the target package file for the network camera SDK; establishing an interface call function for the target package file; and packaging the raw data interface of the network camera SDK according to the call function and the target package file. It monitors in real time whether all network camera SDKs included are fully packaged, and automatically packages any network camera SDKs that are not fully packaged.
2. A raw data interface encapsulation system based on a network camera SDK, characterized in that, The raw data interface encapsulation system includes: The file acquisition module is used to acquire the target encapsulation file based on the encapsulation request signal sent by the network camera SDK; An interface encapsulation module is used to create an interface call function for the target encapsulation file, and encapsulate the raw data interface of the network camera SDK according to the call function and the target encapsulation file; The self-encapsulation module is used to monitor in real time whether all network camera SDKs included have been fully encapsulated, and to self-encapsulate network camera SDKs that have not been fully encapsulated. The file acquisition module includes: The SDK acquisition module is used to encode the network camera SDK to obtain an encoded network camera SDK; wherein the encoding of the network camera SDK is uniquely associated with the network camera SDK. The real-time monitoring module is used to monitor and acquire the encapsulation request signal sent by the network camera SDK in real time; wherein, the encapsulation request signal contains an encoding that uniquely corresponds to the network camera SDK; The encapsulation file acquisition module is used to acquire the target encapsulation file corresponding to the original data interface of the network camera SDK after receiving the encapsulation request signal sent by the network camera SDK; The self-packaging module includes: The comparison module is used to determine whether there is an unpackaged network camera SDK by comparing the serial numbers of the packaged network camera SDK and the unpackaged network camera SDK. The number recording module is used to extract the number of an incompletely packaged network camera SDK and record the number when an incompletely packaged network camera SDK exists. The function call module is used to automatically configure the target encapsulation file for the network camera SDK, establish an interface call function for the target encapsulation file, and encapsulate the raw data interface of the network camera SDK according to the call function and the target encapsulation file; The comparison module includes: The ID extraction module is used to extract the IDs of all network camera SDKs and the IDs corresponding to the fully packaged network camera SDKs. The module for obtaining unpackaged SDKs is used to compare the IDs of all network camera SDKs with the IDs of the network camera SDKs that have been packaged, and to obtain the network camera SDKs that have not been packaged.
Citation Information
Patent Citations
SDK interface packaging method and device, storage medium and electronic equipment
CN109857404A