Data transmission method and device, equipment and medium
By exchanging protocol version information and negotiating detection parameters between monitoring equipment and data processing terminals, a logically layered detection data structure is generated, which solves the problems of version compatibility and data redundancy in network video surveillance and achieves efficient data transmission and bandwidth optimization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TP-LINK INT SHENZHEN CO LTD
- Filing Date
- 2025-12-29
- Publication Date
- 2026-04-14
AI Technical Summary
In network video surveillance, the data interaction between monitoring equipment and data processing terminals suffers from poor compatibility between old and new versions and high redundancy in transmitted detection data, resulting in excessive bandwidth consumption.
By exchanging protocol version information and negotiating detection parameters between the monitoring device and the data processing terminal, a logically layered detection data structure is generated, including shared basic information and extended attribute information. The shared basic information is encapsulated only once, while the extended attribute information is mounted on demand, dynamically adapting to firmware or algorithm iteration changes to achieve compatibility and bandwidth optimization.
It achieves good compatibility between different versions of devices and terminals, eliminates structural redundancy in data packets, and significantly saves network bandwidth resources.
Smart Images

Figure CN121864883A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of communication technology, and in particular relates to a data transmission method, apparatus, device and medium. Background Technology
[0002] In network video surveillance applications, monitoring devices such as network cameras (Internet Protocol Cameras, IPCs) typically not only capture video but also possess intelligent analysis capabilities, enabling them to detect and identify targets in the footage (e.g., face detection, vehicle detection, pedestrian attribute analysis, etc.). These intelligent detection data need to be transmitted in real-time to a data processing terminal for further storage, statistical analysis, or alarm processing. Most IPCs inherently possess deep learning inference capabilities, so to reduce the burden on the data processing center, the transmitted detection data is often the result of inference, including target detection (e.g., pedestrian detection, vehicle detection), pedestrian attributes (e.g., gender, age, clothing color), vehicle attributes (color, model), and so on.
[0003] However, in related technologies, the interaction method between monitoring equipment and data processing terminal is usually relatively fixed. When the algorithm version or parameters of the monitoring equipment are updated, the data processing terminal often has difficulty dynamically sensing and adapting to these changes, resulting in poor compatibility between the old and new versions. Furthermore, the data redundancy of the transmitted detection data is high, which consumes valuable bandwidth resources. Summary of the Invention
[0004] This application provides an implementation scheme different from related technologies to solve the technical problems in related technologies, such as poor compatibility between old and new versions and high redundancy of transmitted detection data consuming bandwidth resources when monitoring devices and data processing terminals interact with each other.
[0005] In a first aspect, this application provides a data transmission method applied to a monitoring device, comprising: Send the first version protocol information of the monitoring device to the data processing terminal, and receive the second version protocol information returned by the data processing terminal; In response to receiving a task execution request initiated by the data processing terminal, the system returns detection parameters to the data processing terminal that correspond to the detection task type indicated by the task execution request; Based on the target communication protocol version determined by the first version protocol information and the second version protocol information, and the detection parameters, detection data is generated and sent to the data processing terminal. The target communication protocol version is used to specify the field structure of the detection data, the detection parameters are used to specify the field content of the detection data, the detection data includes at least one detection target data for at least one detection target, the detection target data is configured as a hierarchical structure formed by logical partitioning, including shared basic information and at least zero extended attribute information, the at least zero extended attribute information in the hierarchical structure of the detection target data are all subordinate to the shared basic information, such that the shared basic information is encapsulated only once in the detection target data.
[0006] Secondly, this application provides a data transmission device for use in monitoring equipment, comprising: The information exchange unit is used to send the first version protocol information of the monitoring device to the data processing terminal and receive the second version protocol information returned by the data processing terminal. The parameter sending unit is used to respond to receiving a task execution request initiated by the data processing terminal and return detection parameters corresponding to the detection task type indicated by the task execution request to the data processing terminal. The data sending unit is configured to generate detection data and send it to the data processing terminal based on the target communication protocol version determined by the first version protocol information and the second version protocol information, and the detection parameters. The target communication protocol version is used to specify the field structure of the detection data, the detection parameters are used to specify the field content of the detection data, the detection data includes at least one detection target data for at least one detection target, the detection target data is configured as a hierarchical structure formed by logical partitioning, including shared basic information and at least zero extended attribute information, the at least zero extended attribute information in the hierarchical structure of the detection target data are all subordinate to the shared basic information, such that the shared basic information is encapsulated only once in the detection target data.
[0007] Thirdly, this application provides an electronic device, comprising: Processor; and Memory for storing the executable instructions of the processor; The processor is configured to execute the first aspect, or any method in any possible implementation of the first aspect, by executing the executable instructions.
[0008] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the first aspect, or any method in any possible implementation of the first aspect.
[0009] This application provides a method for sending first version protocol information of a monitoring device to a data processing terminal and receiving second version protocol information returned by the data processing terminal; responding to a task execution request initiated by the data processing terminal, returning detection parameters corresponding to the detection task type indicated by the task execution request to the data processing terminal; generating detection data and sending it to the data processing terminal based on the target communication protocol version determined by the first version protocol information and the second version protocol information and the detection parameters; wherein, the target communication protocol version is used to specify the field structure of the detection data, the detection parameters are used to specify the field content of the detection data, the detection data includes at least one detection target data for at least one detection target, and the detection target data is configured as a hierarchical structure formed by logical partitioning, including shared basic information and at least zero extended attribute information. In this scheme, at least zero extended attribute information belongs to the shared basic information in the hierarchical structure of the target data, ensuring that the shared basic information is encapsulated only once in the target data. This can be achieved by negotiating the target communication protocol through the exchange of protocol version information and by a mechanism for dynamically interacting with detection parameters based on task requests. This allows both communicating parties to dynamically adapt to iterative changes in firmware or algorithms, eliminating parsing barriers caused by version differences. Furthermore, by utilizing the logical hierarchical structure of shared basic information and extended attribute information in the target data, when transmitting multi-dimensional attributes for the same target, it is only necessary to reference the same basic information without repeatedly encapsulating the basic data. This achieves the technical effect of effectively eliminating structural redundancy in data packets while ensuring good compatibility between different versions of devices and terminals, and significantly saving network bandwidth resources. Attached Figure Description
[0010] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings: Figure 1 A schematic flowchart illustrating a data transmission method provided in an embodiment of this application; Figure 2 This is a schematic diagram of the structure of detection data provided in an embodiment of this application; Figure 3 This is a schematic diagram of the structure of a data transmission device provided in an embodiment of this application; Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0011] Embodiments of this application are described in detail below, with examples of these embodiments illustrated in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting it.
[0012] The terms "first" and "second," etc., used in the specification, claims, and drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the solution can be implemented in a different order than that illustrated or described in this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0013] In related technologies, the data transmission methods used by monitoring devices to transmit intelligent detection data to data processing terminals have shortcomings. First, intelligent detection data is typically transmitted at a high frequency (e.g., at the frame level) and contains a large amount of repetitive basic information (such as target ID and location coordinates). Existing transmission protocols lack effective data structure optimization, resulting in network bandwidth being consumed by a large amount of redundant data. Second, the algorithm models and firmware versions of monitoring devices iterate rapidly. When the algorithm parameters on the device side (such as confidence thresholds and detection range) change, if the communication protocol lacks a dynamic handshake and parameter negotiation mechanism, different versions of data processing terminals often become incompatible, leading to data parsing failures.
[0014] To address the aforementioned technical problems, this application provides a data transmission method, apparatus, device, and medium. This method aims to achieve efficient and compatible data transmission between monitoring equipment and data processing terminals through an optimized protocol interaction mechanism. It addresses the technical problems in related technologies, such as poor compatibility between old and new versions and high redundancy of transmitted detection data consuming bandwidth resources during data interaction between monitoring equipment and data processing terminals.
[0015] The technical solution of this application and how it solves the above-mentioned technical problems will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.
[0016] Figure 1 This is a schematic flowchart illustrating a data transmission method provided for an exemplary embodiment of this application. The method can be applied to monitoring devices and includes at least the following steps: Step 110: Send the first version protocol information of the monitoring device to the data processing terminal, and receive the second version protocol information returned by the data processing terminal.
[0017] Specifically, after the monitoring device connects to the network and completes the underlying network connection (such as a TCP / IP connection) with the data processing terminal, the monitoring device sends its first version protocol information to the data processing terminal and receives the second version protocol information returned by the data processing terminal. Step 110 can be regarded as the "handshake phase" between the monitoring device and the data processing terminal before the formal transmission of business data.
[0018] The monitoring equipment can specifically be electronic devices with video acquisition and intelligent analysis capabilities, such as network cameras (Internet Protocol Cameras, IPCs) and intelligent PTZ cameras.
[0019] Data processing terminals can be electronic devices that can receive, process, and store video monitoring data, such as computer equipment running IPC management software, network video recorders (NVRs), back-end servers, or cloud data processing platforms.
[0020] The first version of the protocol information refers to the set of communication protocol versions or the highest protocol version number supported by the current firmware of the monitoring device. For example, the monitoring device may support multiple versions of the protocol specification such as V1.0, V1.5, and V2.0.
[0021] The second version protocol information refers to the protocol version number that the data processing terminal sends back to the monitoring device after receiving the handshake request, based on its own software version and processing capabilities. For example, the second version protocol information can be a protocol version compatible with the first version protocol information.
[0022] In some embodiments, the monitoring device sends the first version protocol information of the monitoring device to the data processing terminal, including: the monitoring device sending a handshake message to the data processing terminal, the handshake message including the first version protocol information of the monitoring device.
[0023] In some embodiments, to standardize the communication format, the protocol messages sent by the monitoring device (including handshake messages and subsequent parameter acquisition messages and data transmission messages) all adopt a unified header structure. In some embodiments, this header structure can be transmitted in binary format to ensure efficient parsing.
[0024] In some embodiments, the specific field definitions of the header structure of the protocol message are shown in the following table:
[0025] The protocol type is used to identify the type of protocol interaction the current message belongs to, such as whether it is a handshake protocol, parameter retrieval protocol, or data transmission protocol. In step 110, this field will be identified as a handshake protocol; the total message length indicates the total byte length of the message, making it easier for the receiving end to accurately extract the complete message data; the protocol version number is the first version protocol information mentioned above, indicating the version of the protocol, making it easier for the receiving end to select the corresponding parsing logic; the reserved field is used for subsequent expansion of protocol functions, enhancing the protocol's scalability.
[0026] In some embodiments, the header structure can be transmitted in binary format to ensure efficient parsing.
[0027] In some embodiments, the method further includes: Send the hardware parameter information of the monitoring equipment to the data processing terminal; The system receives processing capability parameters returned by the data processing terminal. These parameters are used to configure the encoding strategy for the detected data to match the decoding capability of the data processing terminal.
[0028] In this embodiment, after establishing a communication connection with the data processing terminal, the handshake phase, in addition to version negotiation, is also used to exchange fixed attribute information between the two communicating parties, namely the hardware parameter information of the monitoring device and the processing capability parameters of the data processing terminal.
[0029] The specific interaction process is as follows: When establishing a connection, the monitoring device first sends a handshake message. The body of the handshake message carries its own hardware parameter information so that the data processing terminal can understand and process the detection data collected by the monitoring device based on the hardware parameter information. After receiving the handshake message, the data processing terminal replies with its own processing capability parameters in accordance with the handshake protocol.
[0030] In some embodiments, hardware parameter information of the monitoring device is sent to the data processing terminal in JSON string format. Although the transmission efficiency of JSON is slightly lower than that of binary, its impact on overall bandwidth is minimal, given that the handshake message is only transmitted once when the connection is established, while providing greater development convenience and version compatibility.
[0031] In some embodiments, the hardware parameter information includes the optical imaging capability and / or image sensor specifications of the monitoring device. The optical imaging capability primarily describes the optical characteristics of the lens assembly of the monitoring device, while the image sensor specifications primarily describe the physical and pixel attributes of the photosensitive elements within the monitoring device.
[0032] In some embodiments, optical imaging capabilities include, but are not limited to, the following parameter fields: focal length indicating the physical focal length value of the monitoring device lens, and field of view indicating the range of spatial angles that the monitoring device can observe.
[0033] Focal length determines the size of the image and the depth of the field of view, and is a key parameter for perspective transformation and distance estimation. The field of view angle combined with focal length can help the data processing terminal determine the coverage area of the video image.
[0034] In some embodiments, the image sensor specifications include, but are not limited to, the following parameter fields: sensor physical size parameters and sensor resolution parameters.
[0035] The physical size parameters of the sensor can include the sensor width and sensor height, which are used to characterize the actual size of the photosensitive element in the physical world.
[0036] Sensor resolution parameters can include sensor vertical resolution and sensor horizontal resolution, which are used to characterize the effective number of pixels of the photosensitive element during imaging.
[0037] In some embodiments, the processing capability parameters include the image decoding types and maximum bitrate supported by the data processing terminal.
[0038] In this embodiment, the data processing terminal implements reverse control of the data output strategy of the monitoring device by feeding back its own processing capability parameters, ensuring that the transmitted data stream does not exceed the receiving or processing load of the data processing terminal.
[0039] The supported image decoding type indicates the type of decoder currently installed on the data processing terminal or the supported compression standard. Upon receiving this parameter, the monitoring device should ensure that the image encoding format subsequently encapsulated in the detection data falls within this range to prevent the data processing terminal from being unable to reconstruct the image due to a lack of a corresponding decoder.
[0040] The maximum bitrate is used to indicate the maximum network bandwidth or decoding throughput that the data processing terminal can withstand (e.g., the maximum supported bitrate). When generating detection data, the monitoring device should dynamically adjust the image compression rate or transmission frequency according to this maximum bitrate to avoid network congestion or terminal processing buffer overflow due to excessive sudden data volume.
[0041] Step 120: In response to receiving a task execution request initiated by the data processing terminal, return the detection parameters corresponding to the detection task type indicated by the task execution request to the data processing terminal.
[0042] Specifically, in response to a task execution request initiated by a data processing terminal, the monitoring device returns detection parameters to the data processing terminal that correspond to the detection task type indicated in the task execution request.
[0043] Through step 120, the data processing terminal can dynamically obtain the algorithm parameters that the monitoring device is currently actually running, thereby ensuring that the terminal can correctly understand the subsequently received detection data, or accurately display the current algorithm configuration status to the user on the terminal interface, thus achieving algorithm compatibility.
[0044] In some embodiments, in response to a task execution request initiated by a data processing terminal, returning detection parameters corresponding to the detection task type indicated by the task execution request to the data processing terminal includes: in response to a task execution request initiated by a data processing terminal, returning a parameter acquisition message to the data processing terminal, wherein the parameter acquisition message includes detection parameters corresponding to the detection task type indicated by the task execution request.
[0045] In some embodiments, the detection parameters are encapsulated and transmitted in JSON string format in the body of the parameter acquisition message.
[0046] In some embodiments, in response to a task execution request initiated by a data processing terminal, detection parameters corresponding to the detection task type indicated by the task execution request are returned to the data processing terminal, including the following steps 1201 to 1203: Step 1201: parse the task execution request and determine the target detection algorithm requested to be activated by the data processing terminal.
[0047] Specifically, the monitoring equipment receives and parses the task execution request and determines the target detection algorithm to be activated by the data processing terminal.
[0048] The body of a task execution request typically includes a data type field, which indicates the type of business data the data processing terminal expects to acquire, i.e., the detection task type. For example, this detection task type may include pedestrian detection tasks, pedestrian attribute analysis tasks (such as gender and age), vehicle attribute recognition tasks, or passenger flow statistics tasks.
[0049] Step 1202: If the monitoring device supports the target detection algorithm, then determine the algorithm configuration parameters corresponding to the target detection algorithm.
[0050] Based on the parsed detection task type, the monitoring equipment determines whether its current hardware computing power and algorithm library support the target detection algorithm.
[0051] If not supported, the monitoring device can return an unsupported response message to inform the data processing terminal that the task cannot be performed.
[0052] If the monitoring device supports a target detection algorithm, it can read the algorithm configuration parameters that match the algorithm from its own configuration storage area or algorithm engine. The algorithm configuration parameters are the baseline data for algorithm operation and are used to determine the logic for generating detection data.
[0053] Step 1203: Return the algorithm configuration parameters as detection parameters to the data processing terminal.
[0054] The monitoring equipment encapsulates the algorithm configuration parameters it reads in a response message and returns it to the data processing terminal as detection parameters.
[0055] In this embodiment, the specific algorithm configuration parameters depend on the type of detection task being performed. Taking passenger flow statistics or object detection tasks as examples, the algorithm configuration parameters may include, but are not limited to, the following fields: Confidence threshold: This defines the lower probability limit for the algorithm to determine the validity of a detection result. The monitoring device informs the data processing terminal of this parameter, allowing the terminal to know the current filtering criteria. For example, if the confidence threshold is 0.6, it means that all detection results with a confidence level below 0.6 have been filtered by the monitoring device and will not be uploaded.
[0056] Minimum detection pixel width: Defines the size limit of the smallest target that the algorithm can recognize. This parameter helps the data processing terminal understand why some small targets in the distance in the image are not detected (i.e., because their pixel width is less than the minimum detection pixel threshold).
[0057] Maximum detection range: Used to define the region of interest or maximum effective distance for the algorithm.
[0058] By synchronizing the aforementioned detection parameters, the data processing terminal can establish contextual awareness of the monitoring device's algorithm logic. This allows it to perform secondary verification or status display based on these parameters during subsequent processing of the detection data, ensuring the consistency of end-to-end business logic.
[0059] Step 130: Based on the target communication protocol version determined by the first version protocol information and the second version protocol information, and the detection parameters, generate detection data and send it to the data processing terminal.
[0060] Step 130 is the formal transmission stage of intelligent detection data. The monitoring device generates detection data and sends it to the data processing terminal based on the target communication protocol version determined by the first version protocol information and the second version protocol information, as well as the detection parameters.
[0061] The target communication protocol version is used to specify the field structure of the detection data.
[0062] The target communication protocol version can be the lower version number between the first and second version protocol information to ensure compatibility in storage and parsing. The target communication protocol version is used to specify the field structure of the detection data, such as the binary encapsulation format of the data packets, the length of the shared basic information (fixed length), byte order, and packet segmentation logic.
[0063] In this embodiment, the detection parameters are used to specify the field content of the detection data.
[0064] Please see Figure 2 , Figure 2 This is a schematic diagram of the structure of detection data provided in an embodiment of this application.
[0065] The detection data includes at least one detection target data for at least one detection target. The detection target data is configured as a hierarchical structure formed by logical partitioning, including shared basic information and at least zero extended attribute information. The at least zero extended attribute information are all subordinate to the shared basic information in the hierarchical structure of the detection target data, such that the shared basic information is encapsulated only once in the detection target data.
[0066] In this embodiment, for the same detected target (e.g., the same pedestrian), regardless of how many specific analysis tasks are subsequently initiated (e.g., analyzing both clothing color and facial features), the target's shared basic information is encapsulated only once in the entire data packet. All subsequent extended attribute information (i.e., there may be no extended attributes or multiple attributes) is logically associated with the same shared basic information, eliminating the need to repeatedly encapsulate basic data such as IDs and bounding boxes in each attribute block. This design significantly reduces data packet size and improves transmission efficiency.
[0067] In some embodiments, the shared basic information is a fixed-length data structure, which includes a target identifier header and target attributes. The target identifier header is used to indicate the unique identifier information of the detected target, and the target attributes include position information of the detected target in the video image coordinate system.
[0068] In this application embodiment, shared basic information constitutes the core framework of the target detection data. Regardless of how many complex intelligent analysis tasks (such as facial recognition, vehicle feature analysis, etc.) are initiated for the target, the target's basic identity information and spatial location information are always necessary and unique. Therefore, this application defines this part of the data as shared, that is, it is shared by all upper-layer extended attributes.
[0069] The shared basic information uses a fixed-length data structure, as specified by the target communication protocol version. This design allows the data processing terminal to quickly read the detected target data according to a predetermined offset without performing complex boundary searches when parsing the data stream, greatly improving parsing efficiency.
[0070] In some embodiments, the target identifier header includes a target identifier field `obj_id`, a target category field `type`, and a total data length field `obj_length`. The target identifier field uniquely identifies the same detection target, the target category field indicates the category of the detection target, and the total data length field indicates the total length of the detected target data. Specifically, the definitions of the specific fields included in the target identifier header are shown in the table below:
[0071] The total length of the detected target data, obj_length, is crucial to the hierarchical structure of this application. Since the data length of subsequent extended attribute information is variable (it may have zero or more attributes), the data processing terminal relies on this obj_length field to determine where the data packet of the current detected target ends, thereby accurately jumping to the starting position of the detected target data of the next detected target and preventing parsing misalignment.
[0072] In some embodiments, the target attributes include the coordinates of the top left corner of the detection box of the detected target (including the horizontal coordinate bbox_tl_x and the vertical coordinate bbox_tl_y), the width of the detection box bbox_w, and the height of the detection box bbox_h. The target attributes may also include a confidence parameter used to indicate the confidence level of the target detection data.
[0073] In some embodiments, the specific field definitions of the target attribute are shown in the following table:
[0074] In some embodiments, the extended attribute information is a variable-length data structure, which includes an extended attribute header and extended attribute data. The extended attribute header is a fixed-length data structure, which includes an attribute type field rec_attr_type and an attribute data length field rec_attr_length. The attribute type field is used to indicate the semantic type of the extended attribute data, and the attribute data length field is used to indicate the data length of the extended attribute data. The extended attribute data includes feature description information generated for the detection target based on the detection task type.
[0075] In this embodiment, extended attribute information constitutes a variable part of the detected target data. Unlike shared basic information, extended attribute information is not required for every detected target, but is dynamically generated based on the specific task request initiated by the data processing terminal and the actual algorithm detection results of the monitoring device.
[0076] This variable-length data structure design gives the communication protocol extremely high flexibility and backward compatibility: Assembled on demand: A target detection data packet can contain zero or one or more extended attribute information blocks. For example, for an ordinary pedestrian, it may only contain shared basic information; for a pedestrian in a key monitoring area, it may simultaneously include two extended blocks: pedestrian spatial location attribute and pedestrian attribute.
[0077] Compatible parsing: Since each extended attribute information is guided by a standard extended attribute header, even if the receiving end encounters an unsupported attribute type, it can skip the attribute block based on the length field in the extended attribute header and continue parsing subsequent data without causing the entire data packet parsing to fail.
[0078] Specifically, the extended attribute header serves as a bridge connecting shared basic information and specific business data. It is fixed-length data, the length of which is defined in the handshake protocol. The specific fields it contains are defined in the table below:
[0079] In this application embodiment, various extended attribute data formats are defined according to different detection task types, including but not limited to the following: (1) Pedestrian spatial location attributes In some embodiments, the extended attribute data includes pedestrian spatial location attributes, and the specific field definitions of the pedestrian spatial location attributes are shown in the table below:
[0080] (2) Pedestrian attributes
[0081] Specifically, regarding color attributes (such as upbody_color and lowbody_color), to address the uncertainty in color recognition caused by changes in lighting in real-world scenarios, this embodiment does not use a single enumerated value, but instead employs a probability distribution structure to describe color. The format of the color data is shown in the table below:
[0082] In practical use, the data processing terminal can make decisions based on probability distribution: if the probability of mixed colors is lower than a preset threshold, the single color with the highest probability is selected as the current color; when the probability of mixed colors is greater than the threshold, it is determined to be a mixed color. In addition, the structure also includes an invalid value state; if the probability value is invalid, it indicates that the current color recognition is invalid.
[0083] (3) Vehicle attributes In some embodiments, the extended attribute data includes vehicle attributes. Vehicle attributes describe the characteristic information of the vehicle. Their specific field definitions are shown in the table below:
[0084] The vehicle type also employs a probability distribution structure to address the issue of ambiguous appearance characteristics for certain vehicle models (e.g., some models resemble both SUVs and minivans). Its structure is shown in the table below:
[0085] Optionally, vehicle models with a probability greater than a threshold can be selected as the current vehicle model. Similar to the color attribute, the vehicle model field also includes an invalid value. When the probability is invalid, it indicates that the current vehicle model data is invalid and unavailable.
[0086] (3) Facial attributes In some embodiments, the extended attribute data includes facial attributes. These attributes focus on describing facial features and are commonly used in face recognition or retrieval applications. The specific field definitions are shown in the table below:
[0087] As can be seen from the description of the above embodiments, the extended attribute mechanism provided by this application not only covers information such as the spatial location, color, and shape of the detected target, but also supports probabilistic fuzzy expressions (such as the probability distribution of color and vehicle type), greatly improving the objectivity and accuracy of data description. At the same time, this layered and scalable structure enables the monitoring equipment to flexibly respond to any new detection tasks that may be added in the future without needing to reconstruct the underlying communication architecture.
[0088] In some embodiments, the detection data further includes device status information, which is used to indicate the device status when the monitoring device generates the detection target data.
[0089] In this embodiment, in order to further enhance the accuracy and context awareness of the data processing terminal in processing the target data, the monitoring device also transmits the device status information when generating the target data at the same time as transmitting the target data.
[0090] Specifically, device status information is usually encapsulated in the header of the transmission protocol body and is fixed-length data.
[0091] Unlike related technologies that only focus on detection results (such as "a person was detected"), this application introduces device status information to solve the problem of blind processing. For example, the reliability of the same detection result is different during the day (full-color mode) and at night (infrared black and white mode). By uploading device status information, the data processing terminal can perform targeted weighting, filtering, or calibration of the detected target data according to the current physical conditions.
[0092] In some embodiments, the device status information includes at least one of a timestamp field (time_stamp), a device orientation field, and a light source status field. The timestamp field is used to indicate the generation time of the detection data, the device orientation field is used to indicate the spatial orientation of the monitoring device, and the light source status field is used to indicate the working status of the supplementary lighting device of the monitoring device.
[0093] In some embodiments, the fields of the device status information are shown in the following table:
[0094] The timestamp field (time_stamp) is used to address audio-video synchronization and event retracing issues. Due to network transmission jitter, the time when the detected data is received often differs from the time the data was generated. By carrying a UTC timestamp, the data processing terminal can accurately reconstruct the moment the event occurred, which is crucial for evidence preservation.
[0095] The device attitude fields (ptz_pan, ptz_tilt, ptz_zoom) are mainly applicable to monitoring devices (such as PTZ cameras) that support pan-tilt-zoom (PTZ) control.
[0096] Specifically, when the monitoring equipment rotates, the field of view of the image changes accordingly. If the current PTZ angle is not transmitted, the data processing terminal will not be able to know which location in the real world the current image corresponds to.
[0097] The light source status fields (ir_status, wl_status) are used to indicate the supplementary lighting mode of the monitoring device, which is directly related to image quality and algorithm confidence.
[0098] For example, when ir_status indicates that the infrared light is on, the monitoring device is typically in black-and-white night vision mode. In infrared images, due to the lack of color information and relatively high noise, the accuracy of target detection algorithms is usually slightly lower than in full-color images. Upon learning of this status, the data processing terminal can automatically switch processing strategies, such as increasing the alarm filtering threshold or hiding color-related attributes when displaying properties (because color recognition is unreliable in black-and-white mode), thereby effectively reducing the false alarm rate and improving the user experience.
[0099] This application also provides a dynamic task deregistration mechanism between the monitoring device and the data processing terminal. This mechanism grants the data processing terminal fine-grained control over the transmission stream, enabling it to immediately shut down unnecessary detection data streams based on current business needs or system load. By dynamically removing unnecessary extended attribute data, the monitoring device can significantly reduce the size of individual detection target data packets, ensuring that valuable bandwidth resources are used only to transmit core data that is truly relevant to the current business.
[0100] Specifically, when the data processing terminal no longer needs to obtain a certain intelligent analysis result (for example, turning off "passenger flow statistics" during off-peak hours to save storage space, or turning off the "facial attribute" stream in scenarios where facial recognition is not required), it will proactively send a task stop command to the monitoring device. After receiving and executing the command, the monitoring device will achieve "slimming down" of the data stream.
[0101] In some embodiments, the method further includes steps 140 to 160: Step 140: Receive the task stop command sent by the data processing terminal.
[0102] Specifically, the monitoring equipment receives control messages from the data processing terminal via a communication interface. This task stop instruction includes an identifier for the service type the data processing terminal wishes to terminate. For example, the instruction might contain the field {"task_type": "face_recognition", "enable": false}, indicating that the data processing terminal wishes to stop receiving face recognition-related data. The task stop instruction can also be transmitted as a JSON string.
[0103] Step 150: Analyze the detection task type to be stopped as indicated in the task stop instruction.
[0104] After receiving the above task stop command, the monitoring equipment extracts the type of detection task to be stopped by parsing the task stop command.
[0105] Step 160: Stop encapsulating extended attribute information corresponding to the detection task type to be stopped in the subsequently generated detection target data.
[0106] After determining the type of detection task to be stopped, for the same detection target, the monitoring device normally encapsulates and sends the shared basic information of the detection target, and then the monitoring device will skip the extended attribute information corresponding to the type of detection task to be stopped.
[0107] For example, when the vehicle attribute task is stopped, subsequent transmitted vehicle target data will only retain the vehicle ID and vehicle location frame, and will no longer carry redundant data such as vehicle color and model probability. This approach ensures the continuity of basic monitoring services while maximizing on-demand transmission at the protocol level and saving bandwidth.
[0108] This application provides a method for establishing a communication connection with a data processing terminal, sending first version protocol information of the monitoring device to the data processing terminal, and receiving second version protocol information returned by the data processing terminal; responding to a task execution request initiated by the data processing terminal, returning detection parameters corresponding to the detection task type indicated by the task execution request to the data processing terminal; generating detection data and sending it to the data processing terminal based on the target communication protocol version determined by the first version protocol information and the second version protocol information, and the detection parameters; wherein, the target communication protocol version is used to specify the field structure of the detection data, the detection parameters are used to specify the field content of the detection data, the detection data includes at least one detection target data for at least one detection target, and the detection target data is configured as a hierarchical structure formed by logical partitioning, including shared basic information and at least A scheme that ensures zero extended attribute information, or at least zero extended attribute information, all belong to shared basic information within the hierarchical structure of the target data, allowing the shared basic information to be encapsulated only once in the target data, can determine the target communication protocol through protocol version information exchange and negotiation, and utilize a mechanism for dynamically interacting with detection parameters based on task requests. This enables both communicating parties to dynamically adapt to firmware or algorithm iterations, eliminating parsing barriers caused by version differences. Furthermore, by leveraging the logical hierarchical structure of shared basic information and extended attribute information within the target data, when transmitting multi-dimensional attributes for the same target, it is only necessary to reference the same basic information without repeatedly encapsulating the basic data. This achieves the technical effect of effectively eliminating structural redundancy in data packets while ensuring good compatibility between different versions of devices and terminals, and significantly saving network bandwidth resources.
[0109] Figure 3 A schematic diagram of a data transmission device provided for an exemplary embodiment of this application; applied to a monitoring device, wherein the device includes: The information exchange unit 31 is used to send the first version protocol information of the monitoring device to the data processing terminal and to receive the second version protocol information returned by the data processing terminal. The parameter sending unit 32 is used to respond to receiving a task execution request initiated by the data processing terminal and return the detection parameters corresponding to the detection task type indicated by the task execution request to the data processing terminal. The data sending unit 33 is used to generate detection data and send it to the data processing terminal based on the target communication protocol version determined by the first version protocol information and the second version protocol information, and the detection parameters. The target communication protocol version is used to specify the field structure of the detection data, the detection parameters are used to specify the field content of the detection data, and the detection data includes at least one detection target data for at least one detection target. The detection target data is configured as a hierarchical structure formed by logical partitioning, including shared basic information and at least zero extended attribute information. The at least zero extended attribute information belongs to the shared basic information in the hierarchical structure of the detection target data, so that the shared basic information is encapsulated only once in the detection target data.
[0110] In some embodiments, the detection data further includes device status information, which is used to indicate the device status when the monitoring device generates the detection target data.
[0111] In some embodiments, the device status information includes at least one of a timestamp field, a device orientation field, and a light source status field. The timestamp field is used to indicate the generation time of the detection data, the device orientation field is used to indicate the spatial orientation of the monitoring device, and the light source status field is used to indicate the working status of the supplementary lighting device of the monitoring device.
[0112] In some embodiments, the device is further configured to: Send the hardware parameter information of the monitoring equipment to the data processing terminal; The system receives processing capability parameters returned by the data processing terminal. These parameters are used to configure the encoding strategy for the detected data to match the decoding capability of the data processing terminal.
[0113] In some embodiments, hardware parameter information includes the optical imaging capabilities and / or image sensor specifications of the monitoring device.
[0114] In some embodiments, the processing capability parameters include the image decoding types and maximum bitrate supported by the data processing terminal.
[0115] In some embodiments, when the device returns detection parameters corresponding to the detection task type indicated by the task execution request to the data processing terminal in response to a task execution request initiated by the data processing terminal, it is specifically used for: Analyze the task execution request to determine the target detection algorithm activated by the data processing terminal; If the monitoring equipment supports target detection algorithms, then determine the algorithm configuration parameters corresponding to the target detection algorithm; The algorithm configuration parameters are returned to the data processing terminal as detection parameters.
[0116] In some embodiments, the shared basic information is a fixed-length data structure, which includes a target identifier header and target attributes. The target identifier header is used to indicate the unique identifier information of the detected target, and the target attributes include position information of the detected target in the video image coordinate system.
[0117] In some embodiments, the target identifier header includes a target identifier field, a target category field, and a total data length field. The target identifier field is used to uniquely identify the same detection target, the target category field is used to indicate the category of the detection target, and the total data length field is used to indicate the total data length of the detected target data.
[0118] In some embodiments, the extended attribute information is a variable-length data structure, which includes an extended attribute header and extended attribute data. The extended attribute header is a fixed-length data structure, which includes an attribute type field and an attribute data length field. The attribute type field is used to indicate the semantic type of the extended attribute data, and the attribute data length field is used to indicate the data length of the extended attribute data. The extended attribute data includes feature description information generated for the detection target based on the detection task type.
[0119] In some embodiments, the device is further configured to: Receive a task stop command sent by the data processing terminal; Analyze the type of detection task to be stopped indicated in the task stop command; Stop encapsulating extended attribute information corresponding to the detection task type to be stopped in the subsequently generated detection target data.
[0120] It should be understood that the device embodiments and method embodiments can correspond to each other, and similar descriptions can be referred to the method embodiments. To avoid repetition, they will not be repeated here. Specifically, the device can execute the above method embodiments, and the foregoing and other operations and / or functions of each module in the device correspond to the corresponding processes in the various methods in the above method embodiments, which will not be repeated here for the sake of brevity.
[0121] The apparatus of this application embodiment has been described above from the perspective of functional modules in conjunction with the accompanying drawings. It should be understood that this functional module can be implemented in hardware, in software instructions, or in a combination of hardware and software modules. Specifically, the steps of the method embodiments in this application can be completed by integrated logic circuits in the processor's hardware and / or by software instructions. The steps of the method disclosed in this application embodiment can be directly embodied as being executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. Optionally, the software module can reside in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps in the above method embodiments.
[0122] Figure 4 This is a schematic block diagram of an electronic device provided in an embodiment of this application. The electronic device may include: The system includes a memory 401 and a processor 402. The memory 401 stores computer programs and transfers the program code to the processor 402. In other words, the processor 402 can retrieve and run the computer programs from the memory 401 to implement the methods described in the embodiments of this application.
[0123] For example, the processor 402 can be used to execute the above-described method embodiments according to instructions in the computer program.
[0124] In some embodiments of this application, the processor 402 may include, but is not limited to: General-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0125] In some embodiments of this application, the memory 401 includes, but is not limited to: Volatile memory and / or non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).
[0126] In some embodiments of this application, the computer program may be divided into one or more modules, which are stored in the memory 401 and executed by the processor 402 to perform the method provided in this application. The one or more modules may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the electronic device.
[0127] like Figure 4 As shown, the electronic device may also include: Transceiver 403, which can be connected to processor 402 or memory 401.
[0128] The processor 402 can control the transceiver 403 to communicate with other devices; specifically, it can send information or data to other devices or receive information or data sent by other devices. The transceiver 403 may include a transmitter and a receiver. The transceiver 403 may further include antennas, and the number of antennas may be one or more.
[0129] It should be understood that the various components in the electronic device are connected through a bus system, which includes a data bus, a power bus, a control bus, and a status signal bus.
[0130] This application also provides a computer storage medium storing a computer program thereon, which, when executed by a computer, enables the computer to perform the methods of the above-described method embodiments. Alternatively, embodiments of this application also provide a computer program product containing instructions that, when executed by a computer, cause the computer to perform the methods of the above-described method embodiments.
[0131] When implemented using software, it can be implemented entirely or partially as a computer program product. This computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital video disc (DVD)), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0132] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0133] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.
[0134] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. For example, the functional modules in the various embodiments of this application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0135] In the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0136] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A data transmission method, characterized in that, Applied to monitoring equipment, including: Send the first version protocol information of the monitoring device to the data processing terminal, and receive the second version protocol information returned by the data processing terminal; In response to receiving a task execution request initiated by the data processing terminal, the system returns detection parameters to the data processing terminal that correspond to the detection task type indicated by the task execution request; Based on the target communication protocol version determined by the first version protocol information and the second version protocol information, and the detection parameters, detection data is generated and sent to the data processing terminal. The target communication protocol version is used to specify the field structure of the detection data, the detection parameters are used to specify the field content of the detection data, the detection data includes at least one detection target data for at least one detection target, the detection target data is configured as a hierarchical structure formed by logical partitioning, including shared basic information and at least zero extended attribute information, the at least zero extended attribute information in the hierarchical structure of the detection target data are all subordinate to the shared basic information, and the shared basic information is encapsulated only once in the detection target data.
2. The method according to claim 1, characterized in that, The detection data also includes device status information, which is used to indicate the device status when the monitoring device generates the detection target data.
3. The method according to claim 2, characterized in that, The device status information includes at least one of a timestamp field, a device attitude field, and a light source status field. The timestamp field is used to indicate the generation time of the detection data, the device attitude field is used to indicate the spatial attitude of the monitoring device, and the light source status field is used to indicate the working status of the supplementary lighting device of the monitoring device.
4. The method according to claim 1, characterized in that, The method further includes: Send the hardware parameter information of the monitoring device to the data processing terminal; The system receives processing capability parameters returned by the data processing terminal, wherein the processing capability parameters are used to configure the encoding strategy for the detected data to adapt to the decoding capability of the data processing terminal.
5. The method according to claim 4, characterized in that, The hardware parameter information includes the optical imaging capabilities and / or image sensor specifications of the monitoring device.
6. The method according to claim 4, characterized in that, The processing capability parameters include the image decoding types and maximum bitrate supported by the data processing terminal.
7. The method according to claim 1, characterized in that, In response to a task execution request initiated by the data processing terminal, the method of returning detection parameters corresponding to the detection task type indicated by the task execution request to the data processing terminal includes: Analyze the task execution request to determine the target detection algorithm that the data processing terminal requests to activate; If the monitoring device supports the target detection algorithm, then determine the algorithm configuration parameters corresponding to the target detection algorithm; The algorithm configuration parameters are returned to the data processing terminal as the detection parameters.
8. The method according to claim 1, characterized in that, The shared basic information is a fixed-length data structure, which includes a target identifier header and target attributes. The target identifier header is used to indicate the unique identifier information of the detected target, and the target attributes include position information of the detected target in the video image coordinate system.
9. The method according to claim 8, characterized in that, The target identifier header includes a target identifier field, a target category field, and a total data length field. The target identifier field is used to uniquely identify the same detection target, the target category field is used to indicate the category of the detection target, and the total data length field is used to indicate the total data length of the detected target data.
10. The method according to claim 1, characterized in that, The extended attribute information is a variable-length data structure, which includes an extended attribute header and extended attribute data. The extended attribute header is a fixed-length data structure, which includes an attribute type field and an attribute data length field. The attribute type field is used to indicate the semantic type of the extended attribute data, and the attribute data length field is used to indicate the data length of the extended attribute data. The extended attribute data includes feature description information generated for the detection target based on the detection task type.
11. The method according to claim 1, characterized in that, The method further includes: Receive the task stop command sent by the data processing terminal; Analyze the type of detection task to be stopped indicated in the task stop command; Stop encapsulating extended attribute information corresponding to the detection task type to be stopped in the subsequently generated detection target data.
12. A data transmission device, characterized in that, Applied to monitoring equipment, including: The information exchange unit is used to send the first version protocol information of the monitoring device to the data processing terminal and receive the second version protocol information returned by the data processing terminal. The parameter sending unit is used to respond to receiving a task execution request initiated by the data processing terminal and return detection parameters corresponding to the detection task type indicated by the task execution request to the data processing terminal. The data sending unit is configured to generate detection data and send it to the data processing terminal based on the target communication protocol version determined by the first version protocol information and the second version protocol information, and the detection parameters. The target communication protocol version is used to specify the field structure of the detection data, the detection parameters are used to specify the field content of the detection data, the detection data includes at least one detection target data for at least one detection target, the detection target data is configured as a hierarchical structure formed by logical partitioning, including shared basic information and at least zero extended attribute information, the at least zero extended attribute information in the hierarchical structure of the detection target data are all subordinate to the shared basic information, such that the shared basic information is encapsulated only once in the detection target data.
13. An electronic device, characterized in that, include: processor; as well as Memory for storing the executable instructions of the processor; The processor is configured to execute the method of any one of claims 1-11 by executing the executable instructions.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1-11.