Data transmission method, device, equipment and storage medium

By using the target security protocol and software development toolkit SDK interface in the hardware device management system, the problem of poor data transmission security between warehouse hardware devices is solved, and the compatibility and security of multiple devices are improved.

CN117675964BActive Publication Date: 2024-09-17BEIJING HANGXING YONGZHI TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311361697.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-19
Publication Date
2024-09-17
Estimated Expiration
2043-10-19

AI Technical Summary

Technical Problem

In the existing technology, data transmission between warehouse hardware devices has poor security due to different protocols and interface standards provided by various manufacturers, and it is difficult to be compatible with multiple hardware devices.

Method used

The target security protocol is used to establish a long connection in the hardware device management system, and data is transmitted through the interface provided by the software development tool kit SDK. The control device is compatible with various types of electronic devices, and data analysis is performed before and after transmission to ensure security. .

Benefits of technology

It improves the security of data transmission between hardware devices and servers, achieves efficient compatibility with a variety of hardware devices, and enhances the security and reliability of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117675964B
    Figure CN117675964B
Patent Text Reader

Abstract

The present invention relates to the field of data processing, and provides a data transmission method, device, equipment and storage medium. The method is applied to a hardware device management system, and the hardware device management system includes multiple electronic devices, a server and a control device. The method includes: in an uplink path, for any electronic device, the electronic device uses a target security protocol to establish a long connection with a server; the electronic device uses a first interface corresponding to the electronic device to upload first target data to the control device; the control device is a device compatible with multiple types of electronic devices, and the first interface is provided based on a software development kit SDK; the control device uploads the first target data to the server. The method provided in this embodiment can efficiently be compatible with multiple hardware devices, and improves the security of data transmission between the hardware device and the server.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing, and in particular to a data transmission method, device, equipment and storage medium. Background Art

[0002] With the improvement of national modernization and scientific and technological level, the application of Internet of Things in warehouse hardware equipment management scenarios is becoming more and more extensive.

[0003] In the prior art, the types of hardware equipment in the warehouse are gradually increasing, such as filing cabinets, temperature sensors, humidity sensors, etc. However, since manufacturers of various types of hardware equipment provide different data transmission protocols and functional interface standards, data transmission between hardware equipment and servers is performed based on different data transmission protocols and functional interface standards, resulting in poor security of data transmission. Summary of the invention

[0004] The present invention provides a data transmission method, device, equipment and storage medium to solve the defect of poor security of data transmission in the prior art, which can be efficiently compatible with multiple hardware devices and improve the security of data transmission between hardware devices and servers.

[0005] In a first aspect, the present invention provides a data transmission method, which is applied to a hardware device management system, wherein the hardware device management system includes a plurality of electronic devices, a server and a control device, and the method includes:

[0006] In the uplink path, for any of the electronic devices, the electronic device establishes a long connection with the server using a target security protocol;

[0007] The electronic device uploads the first target data to the control device using the first interface corresponding to the electronic device; the control device is a device compatible with multiple types of electronic devices; the first interface is provided based on a software development kit SDK;

[0008] The control device uploads the first target data to the server.

[0009] Optionally, the control device includes a plurality of adapters and a second interface, and the electronic device uploads the target data to the control device using the first interface corresponding to the electronic device, including:

[0010] The electronic device sends first target data to the second interface of the control device using the first interface; the first target data is obtained after configuration based on the target security protocol, and the first target data includes identification information of the electronic device.

[0011] Optionally, before the control device uploads the first target data to the server, the control device further includes:

[0012] The second interface of the control device determines the adapter corresponding to the electronic device according to the identification information of the electronic device in the first target data;

[0013] The second interface of the control device uses the adapter corresponding to the electronic device to parse the first target data according to the message type and message flag corresponding to the first target data to obtain the parsed first target data;

[0014] Correspondingly, the control device uploads the first target data to the server, including:

[0015] The second interface of the control device uploads the parsed first target data to the server.

[0016] Optionally, when the connection between the electronic device and the control device is a wired connection, the method further includes:

[0017] The electronic device establishes a connection with the docking station using a target security protocol;

[0018] The electronic device establishes a connection with the control device using the expansion dock.

[0019] Optionally, the electronic device includes at least one of the following: a filing cabinet, a temperature sensor, a humidity sensor, and a water immersion device sensor.

[0020] Optionally, the method further comprises:

[0021] In the downlink path, the server sends second target data to the control device; the second target data includes identification information of the electronic device;

[0022] The second interface of the control device sends the second target data to the first interface corresponding to the electronic device using the target security protocol according to the identification information of the electronic device; the first interface is provided based on the software development kit SDK; the control device is a device compatible with multiple types of electronic devices.

[0023] Optionally, before the second interface of the control device sends the second target data to the first interface corresponding to the electronic device using the target security protocol according to the identification information of the electronic device, the control device further includes:

[0024] The second interface of the control device determines the adapter corresponding to the second target data according to the identification information of the target device in the second target data;

[0025] The second interface of the control device uses the adapter corresponding to the second target data to parse the second target data according to the message type and message flag corresponding to the second target data to obtain the parsed second target data;

[0026] Correspondingly, the second interface of the control device sends the second target data to the first interface corresponding to the electronic device using the target security protocol according to the identification information of the electronic device, including:

[0027] The second interface of the control device sends the parsed second target data to the first interface corresponding to the electronic device using a target security protocol.

[0028] In a second aspect, the present invention further provides a data transmission device, the device comprising:

[0029] A connection module, used for establishing a long connection between any electronic device and the server end by using a target security protocol in an uplink path;

[0030] An upload module is used for the electronic device to upload the first target data to the control device using the first interface corresponding to the electronic device; the control device is a device compatible with multiple types of electronic devices; the first interface is provided based on the software development kit SDK; the control device uploads the first target data to the server.

[0031] In a third aspect, the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the data transmission method described above is implemented.

[0032] In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the data transmission methods described above.

[0033] In a fifth aspect, the present invention further provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned data transmission methods.

[0034] The data transmission method, device, equipment and storage medium provided by the present invention are applied to a hardware device management system, and the hardware device management system includes multiple electronic devices, servers and control devices. The method includes: in the uplink path, for any electronic device, the electronic device uses the target security protocol to establish a long connection with the server; then, the electronic device uses the first interface corresponding to the electronic device to upload the first target data to the control device, wherein the control device is a device compatible with multiple types of electronic devices, and the first interface is provided based on the software development kit SDK; further, the control device uploads the first target data to the server. In the method provided in this embodiment, the electronic device uses the target security protocol to establish a long connection with the server, and sends the first target data to the control device through the first interface, and the control device sends the first target data to the server. Because the control device is a device compatible with multiple types of electronic devices, and the first interface is a unified interface provided based on the SDK, it can efficiently be compatible with multiple hardware devices, thereby improving the security of data transmission between the hardware device and the server. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0036] Figure 1 It is a flow chart of the data transmission method provided by the present invention;

[0037] Figure 2 It is a structural diagram of the hardware device management system provided by the present invention;

[0038] Figure 3 It is a structural schematic diagram of the data transmission device provided by the present invention;

[0039] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0040] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0041] The terms "first", "second", etc. in the specification and claims of the present invention are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable where appropriate, so that the embodiments of the present disclosure can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first" and "second" are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0042] Combine the following Figure 1-Figure 4 The data transmission method provided by the present invention is described.

[0043] Figure 1 is a flow chart of a data transmission method provided by the present invention, which is applied to a hardware device management system, which includes multiple electronic devices, servers and control devices, such as Figure 1 As shown, the method includes:

[0044] Step 101: In an uplink path, for any electronic device, the electronic device establishes a long connection with a server using a target security protocol;

[0045] Specifically, the method provided in the embodiment of the present invention can be applied to a hardware device management system. Figure 2 It is a structural diagram of the hardware device management system provided by the present invention, such as Figure 2 As shown, the hardware device management system includes multiple electronic devices, servers and control devices. Among them, the electronic devices include at least one of the following: filing cabinets, temperature sensors, humidity sensors and water immersion device sensors. Other hardware devices can also be applied to the method provided in this embodiment. This embodiment does not limit the type of hardware devices;

[0046] The control device is, for example, a Union Model Device Platform (UMDP); optionally, multiple standards may be integrated into the control device, such as the serial communication protocol Modbus, the transmission control protocol TCP, the open platform communications data access protocol (OPC DA), the open platform communications unified architecture (OPC UA), the programmable logic controller (PLC), a wireless module, etc.

[0047] It can be understood that the uplink path refers to the electronic device uploading device-related data to the server, wherein the device-related data includes, for example, the usage status of the device, the location of the device, the monitoring data of the device, and the like.

[0048] Furthermore, in the uplink path, for any electronic device among the multiple electronic devices, the electronic device first uses the target security protocol to establish a long connection with the server. It can be understood that the target security protocol used by the multiple electronic devices is the same.

[0049] Step 102: The electronic device uploads the first target data to the control device using the first interface corresponding to the electronic device; the control device is a device compatible with multiple types of electronic devices; the first interface is provided based on the software development kit SDK;

[0050] Specifically, after establishing a long connection with the server, the electronic device may further upload the first target data to the server using the first interface of the electronic device.

[0051] First, the first target data is uploaded to the control device using the first interface of the electronic device, wherein the first interface is provided based on a software development kit (SDK). It can be understood that each electronic device has a corresponding first interface, and the first interface can be used to exchange data with the control device, and the control device can be a device that is compatible and adapted to each electronic device. Specifically, the control device can be used to parse the first target data uploaded by each electronic device to obtain the first target data in a universal format (that is, the parsed first target data).

[0052] Among them, the software tool development kit SDK is generally a collection of development tools used by software engineers to build application software for specific software packages, software frameworks, hardware platforms, operating systems, etc., for example, a collection of related documents, examples and tools to assist in the development of a certain type of software.

[0053] Step 103: The control device uploads the first target data to the server.

[0054] Specifically, after receiving the first target data uploaded by the electronic device, the control device may parse the first target data according to the target security protocol to obtain the parsed first target data.

[0055] Furthermore, the first target data (the parsed first target data) may be uploaded to the server.

[0056] Optionally, the server may store the first target data in a business database, so that system users can obtain device-related data at any time.

[0057] It can be understood that by unifying the communication standards of multiple hardware devices, each hardware device can follow the preset SDK to transmit data between the server and the hardware device, thereby achieving an efficient compatible cluster and controlling and monitoring each hardware device through the control device.

[0058] In the method provided in this embodiment, the method is applied to a hardware device management system, and the hardware device management system includes multiple electronic devices, servers and control devices. The method includes: in the uplink path, for any electronic device, the electronic device uses the target security protocol to establish a long connection with the server; then, the electronic device uses the first interface corresponding to the electronic device to upload the first target data to the control device, wherein the control device is a device compatible with multiple types of electronic devices, and the first interface is provided based on the software development kit SDK; further, the control device uploads the first target data to the server. In the method provided in this embodiment, the electronic device uses the target security protocol to establish a long connection with the server, and sends the first target data to the control device through the first interface, and the control device sends the first target data to the server. Because the control device is a device compatible with multiple types of electronic devices, and the first interface is a unified interface provided based on the SDK, it can efficiently be compatible with multiple hardware devices, thereby improving the security of data transmission between the hardware device and the server.

[0059] Optionally, the control device includes a plurality of adapters and a second interface, and the electronic device uploads the target data to the control device using the first interface corresponding to the electronic device, including:

[0060] The electronic device uses the first interface to send first target data to the second interface of the control device; the first target data is obtained after configuration based on the target security protocol, and the first target data includes identification information of the electronic device.

[0061] Specifically, in some embodiments, the control device includes multiple adapters and a second interface, wherein the multiple adapters are respectively compatible with different electronic devices, for example, a temperature adapter is used to be compatible with a temperature sensor, a humidity adapter is used to be compatible with a humidity sensor, and a water adapter is used to be compatible with a water immersion device sensor, and data uploaded by different electronic devices can be parsed. The second interface is a unified interface for the control device to interact with the outside world, and the second interface can be used to realize data transmission and interaction between the control device and various electronic devices.

[0062] Further, step 103 can be implemented by the following steps, which include:

[0063] For any electronic device, the electronic device sends first target data to a second interface of a control device using a first interface corresponding to the electronic device.

[0064] Among them, the first target data sent by the electronic device is obtained after the configuration based on the target security protocol, and the first target data includes the identification information of the electronic device. In other words, the first target data is obtained after the data to be uploaded is configured based on the data interaction format specified in the target security protocol. The target security protocol is, for example, a custom data transmission protocol, and the data transmission protocol at least includes the format of the message, for example, the message includes a message header and a message body, the message header includes the message type, message flag and message body length, etc., and the message body includes the corresponding fields of various types of data, as well as the data type, etc.

[0065] For example, the following is a definition of a message header in a target security protocol. The definition of a message header is shown in Table 1 below:

[0066] Table 1:

[0067]

[0068] Furthermore, the following is the definition of message types in the target security protocol, as shown in Table 2 below, and the message types are enumerated as follows:

[0069] Table 2:

[0070]

[0071] Furthermore, the following is a definition of message flags in the target security protocol, as shown in Table 3 below. An example of the definition of message flags is as follows:

[0072] Table 3:

[0073]

[0074] The message flag byte also indicates whether each field in the message body exists. Further, the following is the definition of the message body in the target security protocol, as shown in Table 4 below: (1) CONNECT-connection request:

[0075] Table 4:

[0076] Fields describe Data Types deviceId Device ID String userName username String password password String

[0077] (2) CONNACK-connection message confirmation, as shown in Table 5 below:

[0078] Table 5:

[0079] Fields describe Data Types deviceId Device ID String resultCode Result Code Integer

[0080] (3) DISCONNECT-disconnection notification, as shown in Table 6 below:

[0081] Table 6:

[0082] Fields describe Data Types disconnectReasonCode Disconnect reason code Integer

[0083] (4) PINGREQ-PING request, as shown in Table 7 below:

[0084] Table 7:

[0085] Fields describe Data Types deviceId Device ID String

[0086] (5) PINGREST-PING response, as shown in Table 8 below:

[0087] Table 8:

[0088] Fields describe Data Types deviceId Device ID String

[0089] (6) COLLECT-collection message, as shown in Table 9 below:

[0090] Table 9:

[0091] Fields describe Data Types deviceId Device ID String messageId Message ID String temperature temperature String humidity humidity String

[0092] (7) COLACK-Collection confirmation, as shown in Table 10 below:

[0093] Table 10:

[0094] Fields describe Data Types deviceId Device ID String messageId Message ID String resultCode Result Code Integer

[0095] (8) CONTROL-control message, as shown in Table 11 below:

[0096] Table 11:

[0097]

[0098] (9) CTRLACK - Control confirmation, as shown in Table 12 below:

[0099] Table 12:

[0100]

[0101]

[0102] (10) Result code definition, as shown in Table 13 below:

[0103] Table 13:

[0104] Result Code describe 0 success 1 Unknown error 2 Wrong password

[0105] (11) The definition of the disconnection reason code is shown in Table 14 below:

[0106] Table 14:

[0107] Disconnect reason code describe 0 Normal disconnection 1 Unknown error 2 New connection established 3 Heartbeat timeout

[0108] In the method provided in this embodiment, the control device includes multiple adapters and a second interface, and the electronic device uses the first interface to send first target data to the second interface of the control device; the first target data is obtained after the target security protocol is configured, and the first target data contains identification information of the electronic device. Then, the control device can parse the first target data, and the result obtained by the analysis is more accurate and the efficiency of data transmission is higher.

[0109] Optionally, before the control device uploads the first target data to the server, the process further includes:

[0110] The second interface of the control device determines the adapter corresponding to the electronic device according to the identification information of the electronic device in the first target data;

[0111] The second interface of the control device uses the adapter corresponding to the electronic device to parse the first target data according to the message type and message flag corresponding to the first target data to obtain the parsed first target data;

[0112] Correspondingly, the control device uploads the first target data to the server, including:

[0113] The second interface of the control device uploads the parsed first target data to the server.

[0114] Specifically, after receiving the first target data uploaded by the first device, the control device may also parse the first target data based on the target security protocol to obtain the parsed first target data. An example of the process of parsing data is as follows:

[0115] First, the second interface of the control device determines the adapter corresponding to the electronic device based on the identification information of the electronic device in the first target data. Since the first target data contains the identification information of the electronic device, such as the identification ID of the electronic device, the control device can first determine which electronic device the first target data is from based on the identification ID of the electronic device, thereby determining the adapter that matches the electronic device.

[0116] Furthermore, the second interface of the control device uses the adapter corresponding to the electronic device to parse the first target data according to the message type and message flag corresponding to the first target data to obtain the parsed first target data. Specifically, after determining the adapter that matches the electronic device, the adapter can be further used to parse the first target data. Since the first target data is defined based on the target security protocol, the first target data can be parsed according to the definition of the message type and message flag in the target security protocol. For example, "COLLECT, 0x04, temperature" refers to the temperature information collected by the electronic device and sent to the server.

[0117] Correspondingly, after parsing and obtaining the corresponding first target data, the second interface of the control device can upload the parsed first target data to the server.

[0118] In the method provided in this embodiment, the second interface of the control device determines the adapter corresponding to the electronic device according to the identification information of the electronic device in the first target data, and then the second interface of the control device uses the adapter corresponding to the electronic device to parse the first target data according to the message type and message flag corresponding to the first target data to obtain the parsed first target data; then, the second interface of the control device uploads the parsed first target data to the server. Based on the target security protocol, the control device parses the first target data uploaded by the electronic device to obtain the parsed first target data, so as to facilitate the server to better utilize the first target data.

[0119] Optionally, when the electronic device and the control device are connected by wired connection, the method further includes:

[0120] The electronic device establishes a connection with the docking station using a target security protocol;

[0121] The electronic device establishes a connection with the control device using the docking station.

[0122] Specifically, the connection between the electronic device and the control device may be a wireless connection or a wired connection.

[0123] When the connection mode is a wired connection, the electronic device can establish a connection with the expansion dock using a target security protocol, so that the electronic device establishes a connection with the control device using the expansion dock.

[0124] Among them, the expansion dock, also known as a port replicator, is an external device that can facilitate one-stop connection between the control device and multiple electronic devices by duplicating or even expanding the port of the control device.

[0125] In the method provided in this embodiment, when the electronic device and the control device are connected by wired connection, the expansion dock enables a convenient one-stop connection between the control device and multiple electronic devices.

[0126] Optionally, the electronic device includes at least one of the following: a filing cabinet, a temperature sensor, a humidity sensor, and a water immersion device sensor.

[0127] Specifically, in some embodiments, the electronic device includes, for example, a filing cabinet, a temperature sensor, a humidity sensor, a water immersion device sensor, etc. It is understandable that other types of electronic devices can also use the method provided in this embodiment to perform data transmission, and this embodiment does not specifically limit the type of electronic device.

[0128] In the method provided in this embodiment, the electronic devices may include multiple types, and unified management of the multiple electronic devices can be achieved.

[0129] Optionally, the method further comprises:

[0130] In the downlink path, the server sends second target data to the control device; the second target data includes identification information of the electronic device;

[0131] The second interface of the control device sends the second target data to the first interface corresponding to the electronic device using the target security protocol according to the identification information of the electronic device; the first interface is provided based on the software development kit SDK; the control device is a device compatible with multiple types of electronic devices.

[0132] Specifically, it can be understood that the above embodiment introduces the data transmission in the uplink path, that is, the situation where the electronic device uploads data to the server. The following introduces the specific application of the data transmission method in the downlink path, that is, the situation where the server sends the second target data as follows to send instructions to the electronic device.

[0133] First, in the downlink path, the server sends second target data to the control device. The second target data is, for example, a second instruction, such as a request to collect information. The second target data should include identification information of the electronic device to facilitate the control device to know to which electronic device the second target data is sent.

[0134] Furthermore, after the control device receives the second target data sent by the server, the second interface of the control device can use the target security protocol to send the second target data to the first interface corresponding to the electronic device according to the identification information of the electronic device, wherein it can be understood that the first interface is provided based on the software development kit SDK, and the control device is a device compatible with multiple types of electronic devices. The introduction and application of the first interface, control device, and target security protocol here are similar to those in the uplink path and will not be repeated here.

[0135] In the method provided by this embodiment, in the downlink path, the server sends the second target data to the control device, wherein the second target data includes the identification information of the electronic device; further, the second interface of the control device can send the second target data to the first interface corresponding to the electronic device using the target security protocol according to the identification information of the electronic device, wherein the first interface is provided based on the software development kit SDK, and the control device is a device compatible with multiple types of electronic devices. Based on the method provided by this embodiment, the security of data transmission in the downlink path can be improved.

[0136] Optionally, before the second interface of the control device sends the second target data to the first interface corresponding to the electronic device using the target security protocol according to the identification information of the electronic device, the method further includes:

[0137] The second interface of the control device determines the adapter corresponding to the second target data according to the identification information of the target device in the second target data;

[0138] The second interface of the control device uses the adapter corresponding to the second target data to parse the second target data according to the message type and message flag corresponding to the second target data to obtain the parsed second target data;

[0139] Correspondingly, the second interface of the control device sends the second target data to the first interface corresponding to the electronic device using the target security protocol according to the identification information of the electronic device, including:

[0140] The second interface of the control device uses the target security protocol to send the parsed second target data to the first interface corresponding to the electronic device.

[0141] Specifically, after receiving the second target data sent by the server, the control device may first parse the second target data to obtain the parsed second target data. An example of the process of the second interface of the control device parsing the second target data is as follows:

[0142] First, the second interface of the control device determines the adapter corresponding to the second target data according to the identification information of the target device in the second target data, because different adapters can adapt to different electronic devices.

[0143] Furthermore, after determining the electronic device corresponding to the second target data, the second interface of the control device can use the adapter corresponding to the second target data to parse the second target data. It can be understood that because the second target data is also defined based on a custom security protocol such as the target security protocol, the second target data can be parsed according to the message type and message flag corresponding to the second target data to obtain the parsed second target data, so that the electronic device can perform corresponding operations according to the parsed second target data.

[0144] Furthermore, after parsing, the second interface of the control device uses the target security protocol to send the parsed second target data to the first interface corresponding to the electronic device.

[0145] In the method provided in this embodiment, in the downlink path, the second interface of the control device can determine the adapter corresponding to the second target data according to the identification information of the target device in the second target data sent by the server; then, the second interface of the control device uses the adapter corresponding to the second target data to parse the second target data according to the message type and message flag corresponding to the second target data to obtain the parsed second target data; finally, the second interface of the control device uses the target security protocol to send the parsed second target data to the first interface corresponding to the electronic device. Configuring and parsing data based on the target security protocol allows the electronic device that receives the second target data to quickly and easily obtain the instruction information of the server, and the data transmission efficiency is high.

[0146] The data transmission device provided by the present invention is described below. The data transmission device described below and the data transmission method described above can be referenced to each other.

[0147] Figure 3 is a schematic diagram of the structure of the data transmission device provided by the present invention, such as Figure 3 As shown, the data transmission device 300 includes:

[0148] The connection module 310 is used for establishing a long connection between any electronic device and the server end by using a target security protocol in an uplink path;

[0149] The upload module 320 is used for the electronic device to upload the first target data to the control device using the first interface corresponding to the electronic device; the control device is a device compatible with multiple types of electronic devices; the first interface is provided based on the software development kit SDK; the control device uploads the first target data to the server.

[0150] The device provided in this embodiment is applied in a hardware device management system, which includes multiple electronic devices, servers and control devices. The device includes: a connection module 310, which is used for establishing a long connection between the electronic device and the server end using the target security protocol for any electronic device in the uplink path; then, the upload module 320 is used for the electronic device to upload the first target data to the control device using the first interface corresponding to the electronic device, wherein the control device is a device compatible with multiple types of electronic devices, and the first interface is provided based on the software development kit SDK; further, the control device uploads the first target data to the server. In the method provided in this embodiment, the electronic device uses the target security protocol to establish a long connection with the server end, and sends the first target data to the control device through the first interface, and the control device sends the first target data to the server. Because the control device is a device compatible with multiple types of electronic devices, and the first interface is a unified interface provided based on the SDK, it can efficiently be compatible with multiple hardware devices, thereby improving the security of data transmission between the hardware device and the server.

[0151] Optionally, the control device includes a plurality of adapters and a second interface, and the upload module 320 is specifically used for:

[0152] The electronic device sends first target data to the second interface of the control device using the first interface; the first target data is obtained after configuration based on the target security protocol, and the first target data includes identification information of the electronic device.

[0153] Optionally, the device further comprises a parsing module;

[0154] The parsing module is used to:

[0155] The second interface of the control device determines the adapter corresponding to the electronic device according to the identification information of the electronic device in the first target data;

[0156] The second interface of the control device uses the adapter corresponding to the electronic device to parse the first target data according to the message type and message flag corresponding to the first target data to obtain the parsed first target data;

[0157] Correspondingly, the upload module 320 is used to:

[0158] The second interface of the control device uploads the parsed first target data to the server.

[0159] Optionally, the apparatus further comprises a device expansion module;

[0160] The device expansion module is used to:

[0161] In the case where the connection between the electronic device and the control device is a wired connection, the electronic device establishes a connection with the docking station using a target security protocol;

[0162] The electronic device establishes a connection with the control device using the expansion dock.

[0163] Optionally, the electronic device includes at least one of the following: a filing cabinet, a temperature sensor, a humidity sensor, and a water immersion device sensor.

[0164] Optionally, the device further includes a sending module;

[0165] The sending module is used for:

[0166] In the downlink path, the server sends second target data to the control device; the second target data includes identification information of the electronic device;

[0167] The second interface of the control device sends the second target data to the first interface corresponding to the electronic device using the target security protocol according to the identification information of the electronic device; the first interface is provided based on the software development kit SDK; the control device is a device compatible with multiple types of electronic devices.

[0168] Optionally, the device further comprises a parsing module;

[0169] The parsing module is used to:

[0170] The second interface of the control device determines the adapter corresponding to the second target data according to the identification information of the target device in the second target data;

[0171] The second interface of the control device uses the adapter corresponding to the second target data to parse the second target data according to the message type and message flag corresponding to the second target data to obtain the parsed second target data;

[0172] Correspondingly, the sending module is used to:

[0173] The second interface of the control device sends the parsed second target data to the first interface corresponding to the electronic device using a target security protocol.

[0174] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the data transmission method, which is applied to a hardware device management system, which includes multiple electronic devices, a server and a control device, and the method includes:

[0175] In the uplink path, for any of the electronic devices, the electronic device establishes a long connection with the server using a target security protocol;

[0176] The electronic device uploads the first target data to the control device using the first interface corresponding to the electronic device; the control device is a device compatible with multiple types of electronic devices; the first interface is provided based on a software development kit SDK;

[0177] The control device uploads the first target data to the server.

[0178] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0179] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the data transmission method provided by the above methods, the method is applied to a hardware device management system, the hardware device management system includes multiple electronic devices, a server and a control device, the method includes:

[0180] In the uplink path, for any of the electronic devices, the electronic device establishes a long connection with the server using a target security protocol;

[0181] The electronic device uploads the first target data to the control device using the first interface corresponding to the electronic device; the control device is a device compatible with multiple types of electronic devices; the first interface is provided based on a software development kit SDK;

[0182] The control device uploads the first target data to the server.

[0183] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to execute the data transmission method provided by the above methods, and the method is applied to a hardware device management system, the hardware device management system includes multiple electronic devices, a server and a control device, and the method includes:

[0184] In the uplink path, for any of the electronic devices, the electronic device establishes a long connection with the server using a target security protocol;

[0185] The electronic device uploads the first target data to the control device using the first interface corresponding to the electronic device; the control device is a device compatible with multiple types of electronic devices; the first interface is provided based on a software development kit SDK;

[0186] The control device uploads the first target data to the server.

[0187] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0188] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0189] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A data transmission method, characterized in that: Applied in a hardware equipment management system, the hardware equipment management system includes electronic equipment, servers and control equipment in multiple warehouses, and the method includes: In the uplink path, for any of the electronic devices, the electronic device uses a target security protocol to establish a long connection with the server; the target security protocol used by each of the electronic devices is the same; the target security protocol is a custom data transmission protocol, the custom data transmission protocol includes a message format, the message format includes a message header and a message body, the message header includes a message type, a message flag and a message body length, and the message body includes various type fields and data types; The electronic device uploads the first target data to the control device using the first interface corresponding to the electronic device; the control device is a device compatible with multiple types of electronic devices; the first interface is provided based on a software development kit SDK; The control device includes a plurality of adapters and a second interface, wherein the plurality of adapters are compatible with and adapt to different electronic devices, the second interface is a unified interface for the control device to interact with the outside world, and the second interface is an interface for the control device to transmit and interact with the electronic devices; the electronic device uploads the first target data to the control device using the first interface corresponding to the electronic device, including: The electronic device sends first target data to the second interface of the control device using the first interface; the first target data is obtained after the target security protocol is configured, and the first target data includes identification information of the electronic device; The control device uploads the first target data to the server; The control device uploading the first target data to the server includes: The second interface of the control device determines the adapter corresponding to the electronic device according to the identification information of the electronic device in the first target data; The second interface of the control device uses the adapter corresponding to the electronic device to parse the first target data according to the message type and message flag corresponding to the first target data to obtain the parsed first target data; The second interface of the control device uploads the parsed first target data to the server; In the downlink path, the server sends second target data to the control device; the second target data includes identification information of the electronic device, and the identification information of the electronic device is used by the control device to determine the electronic device that receives the second target data; the second target data is a second instruction, and the second instruction is a request for collecting information; The second interface of the control device sends the second target data to the first interface corresponding to the electronic device using a target security protocol according to the identification information of the electronic device; The second interface of the control device sends the second target data to the first interface corresponding to the electronic device using a target security protocol according to the identification information of the electronic device, including: The second interface of the control device determines the adapter corresponding to the second target data according to the identification information of the target device in the second target data; The second interface of the control device uses the adapter corresponding to the second target data to parse the second target data according to the message type and message flag corresponding to the second target data to obtain the parsed second target data; The second interface of the control device sends the parsed second target data to the first interface corresponding to the electronic device using a target security protocol.

2. The data transmission method according to claim 1, characterized in that: In the case where the electronic device and the control device are connected by wired connection, the method further includes: The electronic device establishes a connection with the docking station using a target security protocol; The electronic device establishes a connection with the control device using the expansion dock.

3. The data transmission method according to claim 1, characterized in that: The electronic device includes at least one of the following: a filing cabinet, a temperature sensor, a humidity sensor, and a water immersion device sensor.

4. A data transmission device, characterized in that: Applied in a hardware equipment management system, the hardware equipment management system includes electronic equipment, servers and control equipment in multiple warehouses, and the device includes: A connection module, used for establishing a long connection between any electronic device and the server end using a target security protocol in an uplink path; the target security protocol used by each electronic device is the same; the target security protocol is a custom data transmission protocol, the custom data transmission protocol includes a message format, the message format includes a message header and a message body, the message header includes a message type, a message flag and a message body length, and the message body includes various type fields and data types; An upload module is used for the electronic device to upload the first target data to the control device by using the first interface corresponding to the electronic device; the control device is a device compatible with multiple types of electronic devices; the first interface is provided based on the software development kit SDK; the control device includes multiple adapters and a second interface, wherein the multiple adapters are compatible with different electronic devices, the second interface is a unified interface for the control device to interact with the outside world, and the second interface is an interface for the control device to transmit and interact with each electronic device; the electronic device uploads the first target data to the control device by using the first interface corresponding to the electronic device, including: the electronic device uses the first interface to upload to the second interface of the control device The control device sends first target data through a second interface; the first target data is obtained after the target security protocol is configured, and the first target data includes identification information of the electronic device; the control device uploads the first target data to the server; the control device uploads the first target data to the server, including: the second interface of the control device determines the adapter corresponding to the electronic device according to the identification information of the electronic device in the first target data; the second interface of the control device uses the adapter corresponding to the electronic device to parse the first target data according to the message type and message flag corresponding to the first target data to obtain the parsed first target data; the second interface of the control device uploads the parsed first target data to the server; A sending module, used for, in a downlink path, the server sending second target data to the control device; the second target data includes identification information of an electronic device, and the identification information of the electronic device is used for the control device to determine the electronic device that receives the second target data; the second target data is a second instruction, and the second instruction is a request for collecting information; the second interface of the control device sends the second target data to the first interface corresponding to the electronic device using a target security protocol according to the identification information of the electronic device; the second interface of the control device sends the second target data to the first interface corresponding to the electronic device using a target security protocol according to the identification information of the electronic device, including: the second interface of the control device determines the adapter corresponding to the second target data according to the identification information of the target device in the second target data; the second interface of the control device uses the adapter corresponding to the second target data to parse the second target data according to the message type and message flag corresponding to the second target data to obtain the parsed second target data; the second interface of the control device sends the parsed second target data to the first interface corresponding to the electronic device using the target security protocol.

5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the data transmission method according to any one of claims 1 to 3 is implemented.

6. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the data transmission method according to any one of claims 1 to 3 is implemented.