Data format conversion method, system and apparatus, and medium and product
By training a neural network model to obtain encoding and decoding strategies, the problem of IoT management platforms having difficulty connecting devices with different communication protocols is solved, enabling data transmission and format adaptation between devices and the platform, and supporting the connection of massive numbers of devices.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- CHINA MOBILE M2M
- Filing Date
- 2025-10-24
- Publication Date
- 2026-05-15
AI Technical Summary
Existing IoT management platforms support a limited number of communication protocols, making it impossible to provide comprehensive access services for IoT devices using different communication protocols, resulting in difficulties in device access.
By training a neural network model, the encoding and decoding strategies corresponding to the communication protocol specifications of IoT devices are obtained, enabling the parsing and format conversion of transmitted messages, and supporting the access of IoT devices with multiple communication protocols to the IoT management platform.
It enables data transmission between IoT devices and the management platform, supports massive device access, reduces system coupling, adapts to different device data formats, and improves the scalability and flexibility of access services.
Smart Images

Figure CN2025129855_15052026_PF_FP_ABST
Abstract
Description
Data format conversion methods, systems, devices, media and products
[0001] Cross-reference to related applications
[0002] This disclosure claims priority based on Chinese Patent Application No. 202411592400.6, filed on November 8, 2024, the entire contents of which are incorporated herein by reference. Technical Field
[0003] This disclosure relates to the field of Internet of Things (IoT) technology, and in particular to a data format conversion method, system, apparatus, medium, and product. Background Technology
[0004] With the development of information technology, IoT devices are involved in multiple industries such as power, hydrology, and environmental protection. IoT management platforms achieve functions such as connection management, device management, application enablement, and business analysis by transmitting data with IoT devices. Communication between IoT devices and the IoT management platform must be based on a certain communication protocol. Popular protocols include Message Queuing Telemetry Transport (MQTT), Narrowband Internet of Things (NB-IoT), and Constrained Application Protocol (CoAP).
[0005] However, due to the large number of IoT device manufacturers, the diverse types of IoT devices, and their sheer quantity, different manufacturers, different device types, and even different batches of IoT devices from the same manufacturer may employ different communication protocols. Besides the more popular communication protocols on the market, some IoT devices may also use less common protocols or user / manufacturer-defined proprietary protocols. However, existing IoT management platforms support a limited number of communication protocols, making it difficult to provide comprehensive access services to IoT devices using different communication protocols (i.e., generic protocols). Summary of the Invention
[0006] This disclosure is made in view of the above-mentioned problems and provides a data format conversion method, system, apparatus, medium and product.
[0007] According to one aspect of this disclosure, a data format conversion method is provided, comprising:
[0008] Based on the transmission message sent by the sending end, obtain the communication protocol specification used by the transmission message;
[0009] Obtain the encoding / decoding strategy corresponding to the communication protocol specification, and based on the encoding / decoding strategy, obtain the target data of the transmission message, wherein the target data is the data required by the receiving end;
[0010] The target data is converted into a format supported by the receiving end, and the converted target data is sent to the receiving end.
[0011] The encoding / decoding strategy is obtained by training a neural network model using the communication protocol specification and sample messages transmitted using the communication protocol specification, wherein the sample messages are pre-labeled according to the communication protocol specification.
[0012] Furthermore, the data format conversion method according to one aspect of this disclosure further includes: obtaining the target data of the transmission message based on the encoding / decoding strategy, including:
[0013] When the sending end is an IoT device, the transmission message is segmented based on the encoding and decoding strategy to obtain the parsed data of the transmission message. The parsed data is used to annotate the transmission message according to the communication protocol specification.
[0014] Obtain the target data of the transmission message from the parsed data.
[0015] Furthermore, according to one aspect of the data format conversion method of this disclosure, it further includes: obtaining the encoding / decoding strategy corresponding to the communication protocol specification, including:
[0016] When the transmitted message is a connection request message, the communication protocol specification is matched with the communication protocol specifications stored in the method library. The method library is used to store various communication protocol specifications and corresponding encoding and decoding strategies. The connection request message is a message sent by the IoT terminal requesting access to the IoT management platform.
[0017] If the communication protocol specification used by the transmitted message is not found in the method library, a sample message transmitted using the communication protocol specification is obtained. Based on the communication protocol specification and the sample message, the neural network model is trained until the neural network model converges, thereby obtaining the encoding and decoding strategy corresponding to the communication protocol specification.
[0018] Furthermore, according to one aspect of the data format conversion method of this disclosure, the method further includes: training a neural network model based on the communication protocol specification and the sample message until the neural network model converges, including:
[0019] The communication protocol specification and the sample message are input into the neural network model to obtain the parsed data of the sample message output by the neural network model. The parsed data is used to annotate the sample message according to the communication protocol specification.
[0020] Based on the parsed data output by the neural network model and the pre-labeled sample messages, the error of the neural network model is calculated, and the model parameters of the neural network model are optimized using the error until the neural network model converges.
[0021] Furthermore, according to one aspect of the data format conversion method of this disclosure, the method further includes: before matching the communication protocol specification with the communication protocol specifications stored in the method library, the method further includes:
[0022] The communication protocol specification is matched with the protocols already installed in the protocol stack, wherein the installed protocols are communication protocol specifications supported by the IoT management platform;
[0023] It was confirmed that there is no communication protocol specification that matches the communication protocol specification in the already implemented protocol.
[0024] Furthermore, according to one aspect of the data format conversion method of this disclosure, the method further includes: obtaining the encoding and decoding strategy corresponding to the communication protocol specification, including: when the transmitted message is a connection request message, matching the communication protocol specification with communication protocol specifications stored in a method library, wherein the method library is used to store various communication protocol specifications and corresponding encoding and decoding strategies, and the connection request message is a message sent by the sending end requesting access to the receiving end; and when the communication protocol specification used by the transmitted message exists in the method library, directly obtaining the communication protocol specification used by the transmitted message and the corresponding encoding and decoding strategy from the method library.
[0025] Furthermore, according to one aspect of the data format conversion method of this disclosure, it further includes: obtaining a more unified communication protocol specification based on the standard specifications used by various communication protocols; training the neural network model to obtain the encoding and decoding strategy; and persistently storing the encoding and decoding strategy of the communication protocol specification obtained by training the neural network model and the protocol features corresponding to the communication protocol specification.
[0026] Furthermore, the data format conversion method according to one aspect of this disclosure further includes: establishing a bidirectional connection channel with the sending end; and data adaptation with the receiving end.
[0027] Furthermore, according to one aspect of the data format conversion method disclosed herein, the sending end is an Internet of Things (IoT) device, and the receiving end is an IoT management platform.
[0028] Furthermore, according to a data format conversion method according to one aspect of this disclosure, the neural network model includes a Generative Adversarial Network (GAN) model and a Memory Model (LSTM).
[0029] According to another aspect of this disclosure, a data format conversion system is provided, comprising:
[0030] The sending end is used to send transmission messages to the access module;
[0031] The access module is used to convert the target data of the transmission message according to the above-mentioned data format conversion method, and send the converted target data to the receiving end.
[0032] The receiving end is used to receive the converted target data sent by the access module.
[0033] According to another aspect of this disclosure, a data format conversion apparatus is provided, comprising:
[0034] The first acquisition module is used to acquire the communication protocol specification used by the transmission message sent by the sending end.
[0035] The second acquisition module is used to acquire the encoding and decoding strategy corresponding to the communication protocol specification, and based on the encoding and decoding strategy, acquire the target data of the transmission message, wherein the target data is the data required by the receiving end; the encoding and decoding strategy is obtained by training a neural network model using the communication protocol specification and sample messages transmitted using the communication protocol specification, wherein the sample messages are pre-labeled according to the communication protocol specification;
[0036] The format conversion module is used to convert the format of the target data into a format supported by the receiving end, and send the converted target data to the receiving end.
[0037] According to another aspect of this disclosure, a data format conversion apparatus is provided, including a memory, a processor, and a computer program stored in the memory, the processor executing the computer program to implement the method of one aspect above.
[0038] According to another aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the method of one aspect above.
[0039] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the method of the above-described aspect. Attached Figure Description
[0040] The above and other objects, features, and advantages of this disclosure will become more apparent from the more detailed description of the embodiments thereof in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of this disclosure and form part of the specification. They are used together with the embodiments of this disclosure to explain the disclosure and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.
[0041] Figure 1 is a flowchart illustrating a data format conversion method according to an embodiment of the present disclosure.
[0042] Figure 2 is a flowchart illustrating another data format conversion method according to an embodiment of the present disclosure.
[0043] Figure 3 is a structural diagram illustrating a data format conversion system according to an embodiment of the present disclosure.
[0044] Figure 4 is a schematic diagram illustrating the structure of a data format conversion device according to an embodiment of the present disclosure.
[0045] Figure 5 is a schematic diagram illustrating the structure of a computer device according to an embodiment of the present disclosure.
[0046] Figure 6 is a schematic diagram illustrating a computer program product according to an embodiment of the present disclosure. Detailed Implementation
[0047] To make the objectives, technical solutions, and advantages of this disclosure more apparent, exemplary embodiments according to this disclosure will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this disclosure, and not all embodiments of this disclosure. It should be understood that this disclosure is not limited to the exemplary embodiments described herein.
[0048] With the development of information technology, IoT devices are involved in multiple industries such as power, hydrology, and environmental protection. IoT management platforms, through data transmission with these devices, enable functions such as connectivity management, device management, application enablement, and business analysis. Communication between IoT devices and the IoT management platform must be based on a specific communication protocol; popular protocols include MQTT, NB-IoT, and CoAP.
[0049] However, due to the large number of IoT device manufacturers, diverse device types, and sheer volume, IoT devices from different manufacturers, of different types, and even different batches from the same manufacturer may employ different communication protocols. Besides the more popular protocols on the market, some IoT devices may also use less common protocols or user / manufacturer-defined proprietary protocols. However, existing IoT management platforms support a limited number of communication protocols and cannot provide access services for IoT devices using different communication protocols (i.e., generic protocols).
[0050] To address this technical issue, existing solutions include extending the access service functionality of the IoT management platform through code development, specifically by adding a custom industry protocol parsing module. However, this module can only parse a single communication protocol, failing to cover the diverse range of communication protocols available on the market, resulting in poor scalability and significant parsing difficulty. Furthermore, while directly acquiring IoT data from the manufacturer's management platform simplifies system architecture and software development, it places heavy reliance on the platform for system performance and security, severely limiting smart applications across various vertical industries in smart cities.
[0051] The above description, with reference to the accompanying drawings, illustrates a data format conversion method, system, apparatus, device, medium, and product according to embodiments of the present disclosure. By employing encoding and decoding strategies corresponding to communication protocol specifications and based on the data required by the receiving end, the target data of the transmission message can be obtained, and then the converted target data can be sent to the receiving end, thereby realizing data transmission between the sending and receiving ends. Applied to IoT devices and IoT management platforms, for IoT devices using different communication protocols (i.e., communication protocol specifications), the corresponding encoding and decoding strategies can be obtained to connect the IoT devices to the IoT management platform and realize data transmission between the two, enabling the IoT management platform to provide access services for more IoT devices.
[0052] Compared with the prior art, the embodiments of this disclosure solve the problem of automatic parsing between the data used by IoT devices and the representation data supported by the IoT management platform from a more fundamental logic level. In other words, it is a protocol encoding and decoding process in a common sense, which can solve the problem that the IoT management platform does not support IoT device access due to communication protocol mismatch.
[0053] This disclosure provides an embodiment that obtains encoding and decoding strategies corresponding to different communication protocol specifications by training on different communication protocol specifications and sample messages. This strategy can replace the original access service function in the IoT management platform (which provides access services for IoT devices using various communication protocols). It uniformly replaces the access module of the data format conversion system in this solution. IoT devices can establish long-term connections with the access module, which can be horizontally expanded to support a massive number of IoT devices. This eliminates the situation where the original IoT management platform connects to different access services based on the communication protocols used by different IoT devices. The access module provided in this disclosure has low coupling with the application functions of the IoT management platform, focusing more on providing access services for IoT devices. It can preserve the original data format of the IoT devices and the original data format of the data received from the IoT management platform. Through the data uplink and data downlink modules, it can interact with different IoT management platforms, adapting to the IoT management platform's access requirements for IoT devices.
[0054] To facilitate understanding of this embodiment, a data format conversion method disclosed in this disclosure will first be described in detail. The execution entity of the data format conversion method provided in this disclosure is generally a computer device with certain computing capabilities. This computer device may include, for example, a terminal device, a server, or other processing devices. The terminal device may be a user equipment (UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (PDA), handheld device, computing device, in-vehicle device, wearable device, etc. In some possible implementations, this data format conversion method can be implemented by a processor calling computer-readable instructions stored in memory.
[0055] Figure 1 shows a flowchart of a data format conversion method provided in an embodiment of this disclosure, the method including steps S101-S103:
[0056] S101: Based on the transmission message sent by the sender, obtain the communication protocol specification used by the transmission message.
[0057] The sending end can be an IoT device or an IoT management platform. The transmitted message can be data sent by the IoT device or a connect message (i.e., a connection request message) to request access to the IoT management platform. Alternatively, the transmitted message can also be an instruction sent by the IoT management platform. The communication protocol specification defines the format and rules for data transmission. Referring to Table 1, which lists the protocol characteristics of the communication protocol specification, taking the JT808 protocol as an example, the communication protocol specification stipulates that the JT808 protocol includes the following protocol characteristics: protocol type, protocol header identifier, protocol header identifier length, message header, message body, checksum length, protocol tail identifier, protocol tail identifier length, and special processing mode. The protocol header identifier is 0x7e, which is represented in binary as 01111110. The message header is 18 bytes long. The message body length varies depending on the length of different data contents in the message header. The checksum length is 1 byte. The special mode is as follows: if the transmitted message contains repeated 0x7d or 0x7e, the repeated 0x7d will be escaped to 0x7d-0x01, and the repeated 0x7e will be escaped to 0x7d-0x02 to avoid repetition.
[0058] Taking the MQTT protocol as an example, the communication protocol specification defines the following protocol features: protocol type, protocol header identifier, protocol header identifier length, message header, and message body. The protocol header identifier is a fixed header, subdivided into an array depending on the message type. For example, the protocol header identifier for a connect message is 0x20, which is 00100000 in binary, and the protocol header identifier for a publish message is 00110100, with a length of 1 byte. The message header consists of the remaining fields in the fixed header and the variable length of the MQTT protocol, with a total length of 3 bytes. The remaining fields constitute the message body, with a length equal to the total message length minus the length of the protocol header identifier and the message header. The communication protocol specifications for other communication protocols follow the same logic, and will not be elaborated upon in this embodiment.
[0059] Table 1 Protocol Characteristics of Communication Protocol Specifications
[0060] S102: Obtain the encoding / decoding strategy corresponding to the communication protocol specification, and obtain the target data of the transmission message based on the encoding / decoding strategy.
[0061] In this context, the target data refers to the data required by the receiving end. Assuming the receiving end is an IoT management platform A, and A requires the message body field of the transmitted message, then the message body field constitutes the target data. The encoding / decoding strategy is obtained by training a neural network model using communication protocol specifications and sample messages transmitted according to those specifications. The sample messages are pre-labeled according to the communication protocol specifications.
[0062] This embodiment takes an IoT device as the transmitting end as an example. S102 includes the following steps 1-3:
[0063] Step 1: When the transmitted message is a connection request message (i.e., a connect message), match the communication protocol specification with the communication protocol specifications stored in the method library.
[0064] The method library stores various communication protocol specifications and their corresponding encoding / decoding strategies. Connection request messages are messages sent by IoT terminals requesting access to the IoT management platform. The neural network models include Generative Adversarial Network (GAN) and Long Short-Term Memory (LSTM) models. Before deployment, both popular and less common communication protocol specifications can be trained to obtain corresponding encoding / decoding strategies. The LSTM model persistently stores the trained model parameters and corresponding communication protocol specifications. In practical applications, the corresponding model can be directly called from the method library for encoding / decoding.
[0065] In some embodiments, before matching the communication protocol specification with the communication protocol specifications stored in the method library, the method further includes:
[0066] The communication protocol specification is matched with the protocols already installed in the protocol stack, which are communication protocol specifications supported by the IoT management platform; it is confirmed that there is no communication protocol specification that matches the aforementioned communication protocol specification among the installed protocols.
[0067] Step 2: If the method library contains the communication protocol specification used for transmitting messages, directly obtain the communication protocol specification and the corresponding encoding / decoding strategy from the method library;
[0068] If the communication protocol specification used for transmitting messages is not available in the method library, sample messages transmitted using the communication protocol specification are obtained. Based on the communication protocol specification and the sample messages, the neural network model is trained until the neural network model converges, and the encoding and decoding strategy corresponding to the communication protocol specification is obtained.
[0069] Specifically, if the method library does not contain the communication protocol specification used for transmitting messages, it may be because the communication protocol specification is a proprietary protocol defined by the user or manufacturer, and the service provider cannot obtain its publicly available communication protocol specification. Therefore, the user or manufacturer needs to provide the corresponding communication protocol specification. The sample message can be data provided by the user or manufacturer, or data generated in advance according to the communication protocol specification for training the neural network model. Training the neural network model specifically includes the following steps:
[0070] The communication protocol specifications and sample messages are input into the neural network model to obtain the parsed data of the sample messages output by the neural network model. Based on the parsed data output by the neural network model and the pre-labeled sample messages, the error of the neural network model is calculated. The model parameters of the neural network model (such as activation function, optimizer, number of layers, number of neurons per layer, and learning rate) are optimized using the error until the neural network model converges.
[0071] The parsed data annotates the sample messages according to the communication protocol specifications. Taking the JT808 protocol as an example, the parsed data annotates the protocol features included in the JT808 protocol.
[0072] Step 3: Based on the encoding and decoding strategy, the transmitted message is segmented to obtain the parsed data of the transmitted message, and the target data of the transmitted message is obtained from the parsed data.
[0073] Specifically, this embodiment uses decoding as an example to describe the encoding and decoding strategy in detail: The decoder method is defined as: public Message decode(byte[] data). This method cuts and assembles the transmission message in sequence according to the length and order of each part of the communication protocol specification to obtain the message body. At this time, the message body is still binary code. Each part of the message body is used to define the meaning of each message in a binary message. By cutting the binary message according to each part and obtaining the corresponding value, the protocol type of the message can be determined, and the message body content of the message protocol can be obtained. The message body content is the data content reported by the IoT device. Assume that the transmission message sent by the IoT device is:
[0074] The sequence number 7E800100093431333035303533303938380001303030393032303000747E is first identified by the protocol header identifier, 0x7E. This indicates that the IoT device is using the JT808 protocol. Then, a special processing mode is used to restore the transmitted message to its original state before special processing. After splitting the protocol header and protocol trailer identifiers, the result is 8001 0009 3431 3330 3530 3533 3039 3838 0001 30303039 30323030 00 74. The message header is then extracted as 8001 0009 3431 3330 3530 3533 3039 3838, with a checksum of 74. The remaining portion is the message body: 30303039 30323030 00. The specified message ID in the header is identified as 8001. According to the 0x8001 protocol specification, the message body contains the response serial number, response message ID, and response result, with byte lengths of 2 bytes, 2 bytes, and 1 byte respectively. Therefore, the message body contains: Response Serial Number = 30303039, Response Message ID = 30323030, and Response Result = 00. Therefore, the parsed data of the transmitted message is as follows: Protocol header identifier = 0x7E, Protocol trailer identifier = 0x7E, Message header = 8001 0009 3431 3330 3530 3533 3039 3838, Checksum = 74, Response serial number = 30303039, Response message ID = 30323030, Response result = 00.
[0075] S103: Convert the target data to a format supported by the receiving end and send the converted target data to the receiving end.
[0076] The target data is mostly in binary format, while the IoT management platform primarily supports JSON format. Assuming the IoT management platform (i.e., the receiving end) requires response serial number, response message ID, and response result, the binary code is converted into a data format recognizable by the IoT management platform using a programming language: Response Serial Number = "0009", Response Message ID = "0200", Response Result = 0. Then, the above data is converted into a JSON string using the data schema supported by the IoT management platform. For example, the code conversion can be as follows:
[0077] Wherein, "id":"123" is a unique identifier generated for the received transmission message; "version":"1.0" is the generated format version number; "params" is used to indicate the content (parameters) included in the message body; and "time" is the time.
[0078] In some embodiments, the encoder method is defined as: public byte[]encode(Message message). According to the data type defined by the IoT management platform, the message body data is first converted into a binary message body, and then processed in a special mode according to the protocol type. Then, a protocol header identifier, message header, checksum, and protocol tail identifier are added. Finally, the binary code that the IoT device can recognize is assembled to complete the interaction process between the IoT device and the IoT cloud platform. This process is the reverse of the decoding process and will not be described in detail in this embodiment.
[0079] Figure 2 shows another flowchart of the data format conversion method provided in this embodiment of the present disclosure, the method including S201-S206:
[0080] S201: Based on the standard specifications used by various communication protocols, a more unified communication protocol specification is obtained.
[0081] For details, please refer to Table 1. Taking the JT808 protocol as an example, the communication protocol specification defines the following protocol features of the JT808 protocol: protocol type, protocol header identifier, protocol header identifier length, message header, message body, checksum length, protocol tail identifier, protocol tail identifier length, and special processing mode. The protocol header identifier is 0x7e, which is represented as 01111110 in binary. The message header is a total of 18 bytes. The length of the message body varies depending on the length of the data content. The checksum length is 1 byte. The special mode is: if the transmitted message contains repeated 0x7d or 0x7e, the repeated 0x7d will be escaped to 0x7d-0x01, and the repeated 0x7e will be escaped to 0x7d-0x02, which can avoid encoding and decoding errors caused by repetition.
[0082] Taking the MQTT protocol as an example, the communication protocol specification defines the following protocol features: protocol type, protocol header identifier, protocol header identifier length, message header, and message body. The protocol header identifier is a fixed header, subdivided into an array depending on the message type. For example, the protocol header identifier for a connect message is 0x20, which is 00100000 in binary, and the protocol header identifier for a publish message is 00110100, with a length of 1 byte. The message header consists of the remaining fields in the fixed header and the variable length of the MQTT protocol, with a total length of 3 bytes. The remaining fields constitute the message body, with a length equal to the total message length minus the length of the protocol header identifier and the message header. The communication protocol specifications for other communication protocols follow the same logic, and will not be elaborated upon in this embodiment.
[0083] S202: Train the neural network model to obtain the encoding and decoding strategy.
[0084] Taking the MQTT protocol as an example, the communication protocol specification corresponding to the MQTT protocol and the corresponding sample messages are input into the GAN (Generative Adversarial Network) model and the LSTM (Long Short-Term Memory) model to determine appropriate hyperparameters: activation function, optimizer, number of layers, number of neurons per layer, and learning rate. When the parsed data output by the GAN model is consistent with the pre-labeled sample messages, the GAN model is confirmed to have converged, thus obtaining the encoding and decoding strategy corresponding to the communication protocol specification. The process of obtaining the encoding and decoding strategies for other communication protocol specifications is similar and will not be elaborated in this embodiment.
[0085] In some embodiments, the encoding / decoding strategy is described in detail using a decoding example: The decoder method is defined as: public Message decode(byte[] data). This method cuts and assembles the transmission message in sequence according to the length and order of each part of the communication protocol specification to obtain the message body. At this time, the message body is still binary code. Each part of the message body is used to specify the meaning of each message in a binary message. By cutting the binary message according to each part and obtaining the corresponding value, the protocol type of the message can be determined, and the message body content of the message protocol can be obtained. The message body content is the data content reported by the IoT device. Assume that the transmission message sent by the IoT device is:
[0086] The sequence number 7E800100093431333035303533303938380001303030393032303000747E is first identified by the protocol header identifier, 0x7E. This indicates that the IoT device is using the JT808 protocol. Then, a special processing mode is used to restore the transmitted message to its original state before special processing. After splitting the protocol header and protocol trailer identifiers, the result is 8001 0009 3431 3330 3530 3533 3039 3838 0001 30303039 30323030 00 74. The message header is then extracted as 8001 0009 3431 3330 3530 3533 3039 3838, with a checksum of 74. The remaining portion is the message body: 30303039 30323030 00. The specified message ID in the header is identified as 8001. According to the 0x8001 protocol specification, the message body contains the response serial number, response message ID, and response result, with byte lengths of 2 bytes, 2 bytes, and 1 byte respectively. Therefore, the message body contains: Response Serial Number = 30303039, Response Message ID = 30323030, and Response Result = 00. Therefore, the parsed data of the transmitted message is as follows: Protocol header identifier = 0x7E, Protocol trailer identifier = 0x7E, Message header = 8001 0009 3431 3330 3530 3533 3039 3838, Checksum = 74, Response serial number = 30303039, Response message ID = 30323030, Response result = 00.
[0087] S203: Persistently store the encoding and decoding strategies of the communication protocol specifications obtained by training the neural network model, as well as the corresponding protocol features of the communication protocol specifications.
[0088] This embodiment supports obtaining encoding and decoding strategies after training a neural network model for subsequent new communication protocol specifications and persistently storing them.
[0089] S204: Connecting to IoT devices.
[0090] The system adaptively matches the connect message sent by the IoT device with the protocols already installed in the protocol stack. If the match is successful, a bidirectional control channel is established for data uplink / downlink interaction. If the match fails, the system can choose to pass the connect message through or prompt the device owner to upload the standard specification and sample message, and process the standard specification to obtain the communication protocol specification.
[0091] S204 includes the following steps 4-7:
[0092] Step 4: Match the communication protocol specification used by the connect message with the communication protocol specifications stored in the method library.
[0093] The method library stores various communication protocol specifications and corresponding encoding / decoding strategies, while the connection request message is a message sent by the IoT terminal requesting access to the IoT management platform.
[0094] Step 5: If the method library contains the communication protocol specification used by the connect message, directly obtain the communication protocol specification and the corresponding encoding / decoding strategy from the method library;
[0095] If the communication protocol specification used by the connect message is not available in the method library, obtain sample messages transmitted using the communication protocol specification. Based on the communication protocol specification and the sample messages, train the neural network model until the neural network model converges and obtain the encoding and decoding strategy corresponding to the communication protocol specification.
[0096] Specifically, if the communication protocol specification used by the connect message is not present in the method library, it may be because the communication protocol specification is a user- or manufacturer-defined private protocol, and the service provider cannot obtain its publicly available communication protocol specification. Therefore, the user or manufacturer needs to provide the corresponding communication protocol specification. The sample message can be data provided by the user or manufacturer, or data generated in advance according to the communication protocol specification for training the neural network model. Training the neural network model specifically includes the following steps:
[0097] The communication protocol specifications and sample messages are input into the neural network model to obtain the parsed data of the sample messages output by the neural network model. Based on the parsed data output by the neural network model and the pre-labeled sample messages, the error of the neural network model is calculated. The model parameters of the neural network model (such as activation function, optimizer, number of layers, number of neurons per layer, and learning rate) are optimized using the error until the neural network model converges.
[0098] The parsed data annotates the sample messages according to the communication protocol specifications. Taking the JT808 protocol as an example, the parsed data annotates the protocol features included in the JT808 protocol.
[0099] Step 6: Based on the encoding and decoding strategy, segment the connect message, obtain the parsed data of the connect message, and extract the target data of the connect message from the parsed data.
[0100] Specifically, this embodiment describes the encoding and decoding strategy in detail using decoding as an example: The decoder method is defined as: public Message decode(byte[] data). This method cuts and assembles the connect message in sequence according to the length and order of each part of the communication protocol specification to obtain the message body. At this time, the message body is still binary code. Each part of the message body is used to define the meaning of each message in a binary message. By cutting the binary message according to each part and obtaining the corresponding value, the protocol type of the message can be determined and the message body content of the message protocol can be obtained. The message body content is the data content reported by the IoT device.
[0101] Step 7: Convert the target data to a format supported by the receiving end and send the converted target data to the receiving end.
[0102] The target data is mostly in binary format, while the IoT management platform mostly supports JSON format. Assuming the IoT management platform (i.e., the receiving end) requires the response serial number, response message ID, and response result, the binary code is converted into a data format recognizable by the IoT management platform using a programming language: Response Serial Number = "0009", Response Message ID = "0200", Response Result = 0. Then, the above data is converted into a JSON string using the data schema supported by the IoT management platform. This can be achieved through code conversion as follows:
[0103] Wherein, "id":"123" is a unique identifier generated for the received transmission message; "version":"1.0" is the generated format version number; "params" is used to indicate the content (parameters) included in the message body; and "time" is the time.
[0104] S205: Establish a two-way connection channel with IoT devices.
[0105] The system receives binary code reported by IoT devices via a bidirectional connection channel, calls a persistent storage encoding / decoding strategy to convert the binary code into a data type that the IoT management platform can recognize, and completes the process of device data reporting.
[0106] S206: Data adaptation with IoT management platform.
[0107] IoT management platforms typically have their own supported IoT standard communication protocols. By configuring the data format of the IoT management platform, the data reported by IoT devices through messages is converted into the corresponding data format. After the data format conversion is successful, the device data is finally transmitted to the IoT management platform to be adapted. Similarly, the data sent from the IoT management platform to the IoT devices is converted into the data format supported by the IoT devices and then sent to the IoT devices.
[0108] For example, the OneNET platform supports communication protocols such as MQTT / COAP / LWM2M / HTTP, and the supported data format is OneJSON. If a non-OneNET standard communication protocol needs to report data to the OneNET platform, simply set the corresponding data format to OneJSON. For instance, if the original device data packet is 0x50 0x6f 0x77 0x65 0x72 0x3d 0x31 0x32 0x33 0x34 0x35 0x2c 0x74 0x65 0x6d 0x70 0x3d 0x32 0x33 0x2e 0x36, after parsing the protocol data, Power = 12345, temp = 23.6.
[0109] The data adaptation schema needs to be configured to convert the original data into OneJSON data. The method is as follows: Create JSON data containing fixed keys: id, version, and params. Here, id is a unique identifier generated at the current time, version is a fixed value of 1.0, and params is also a JSON object representing the content (parameters) of the message body. Place the parameters from the original data into params as keys, use the values as values in the keys, and add the current timestamp as the reporting time. The final data format reported to the OneNET platform is:
[0110] According to another aspect of the present disclosure, a data format conversion system is provided, as shown in FIG3, the system comprising:
[0111] The sending end is used to send transmission messages to the access module.
[0112] The access module is used to convert the target data of the transmission message according to the above data format conversion method, and send the converted target data to the receiving end.
[0113] The receiving end is used to receive the converted target data sent by the access module.
[0114] The data format conversion system is responsible for connecting IoT devices and the IoT management platform. Its main functions include managing IoT device login and logout, device information management, and bidirectional communication between the two platforms—specifically, data reporting from IoT devices and commands from the IoT management platform. The system comprises an automatic device protocol parsing module, a protocol training module, an IoT management platform data adaptation module, and uplink and downlink data modules. Detailed descriptions of each module are as follows:
[0115] The Device Protocol Auto-Resolution Module is a unified IoT device access module that supports all IoT devices in establishing a long-lived TCP bidirectional control channel with it. This module handles both data reporting and transmission to devices, and it supports horizontal scaling, allowing for the access of massive numbers of IoT devices. Furthermore, because this module is completely decoupled from the upper-layer IoT management platform, it can be deployed locally, in the cloud, or on edge networks. The automatic device protocol resolution module resolves the issue of LAN-based devices being unable to directly connect to the IoT management platform. Once the long-lived TCP bidirectional control channel is established, IoT devices can report data packets. When the automatic device protocol resolution module receives these packets, it loads the protocol encoding / decoding strategy from its method library to encode and decode the data. Device-reported data is decoded using the `public Message decode(byte[] data)` method, while platform-downlink data is encoded using the `public byte[] encode(Message message)` method, thus completing the uplink and downlink data communication between the IoT devices and the IoT management platform.
[0116] Protocol Training Module: This module primarily preprocesses the IoT protocol specifications to obtain communication protocol specifications. Based on these specifications and sample messages, it uses GAN and LSTM neural network models to derive segmentation methods (i.e., encoding / decoding strategies) for protocol messages sent by IoT devices. According to this method, binary code data from IoT devices can be converted into a representation data format recognizable by upper-layer applications. Simultaneously, the representation data format recognizable by upper-layer applications can be assembled into a binary code format recognizable by IoT devices. The trained encoding / decoding strategies are then uniquely mapped one-to-one with the communication protocol specifications and stored in the method library.
[0117] The IoT management platform's data adaptation module converts the system-decoded raw data into the corresponding data format based on the user-configured data conversion format schema; or it converts the downlink data received by the system into the raw data format supported by the device protocol. For example, if the OneNET management platform supports OneJSON for data reporting, the data format reported by the IoT device needs to be parsed, and the reported data function points assembled into the OneJSON format for successful reporting. Similarly, the control device commands issued by OneNET are also in OneJSON format. These commands need to be parsed based on the function points contained in the OneJSON, extracting the specific function points and values of the control device and converting them into a data format supported by the IoT device.
[0118] Data Uplink Module: This module outputs the data processed by the IoT management platform's data adaptation module to the corresponding destination according to the configured data output method.
[0119] In some embodiments, the data uplink module can be user-expanded and can implement MQTT transmission mode, HTTP transmission mode, and message queue mode by default. Specifically:
[0120] MQTT Transport Mode: This mode is responsible for the TCP connection of the MQTT protocol for communication between adaptive IoT devices and the IoT management platform, as well as the corresponding session between the adaptive data format conversion system and the IoT management platform. Specifically, MQTT transport mode establishes multiple peer-to-peer TCP connections with the IoT management platform to proxy communication between user devices using non-standard protocols and the IoT management platform.
[0121] HTTP Transmission Mode: This transmission mode is responsible for establishing HTTP protocol connections and data exchange functions between adaptive IoT devices and IoT management platforms, supporting HTTP 1.1, HTTP 2.0, and HTTPS.
[0122] Message queue transmission mode: This transmission mode is responsible for establishing message queue connections and data interaction functions between adaptive IoT devices and IoT management platforms, and supports message queue middleware such as Kafka.
[0123] Downlink Data Module: This module receives command data from the IoT management platform used to control IoT devices. Similar to the uplink data module, it supports user-defined expansion and implements MQTT, HTTP, and message queue modes by default.
[0124] In some embodiments, to ensure the security of IoT devices accessing the IoT management platform, users can implement device login / logout permissions management within the data uplink and data downlink modules. This includes implementing device authentication and access policy control interfaces, and by default, authentication is based on a security token. The token contains fields such as token expiration time, version, signature algorithm, and signature. The advantages of using this token authentication method are:
[0125] The token expiration time is controllable, and users can set a reasonable expiration time according to actual business needs to control device access; different token versions are compatible, and if the security policy of the IoT management platform changes, backward compatibility can be guaranteed without users modifying any code; authentication-sensitive key information is not directly transmitted, and the legitimacy of the authentication identity is guaranteed by calculating the signature through the key and signature algorithm.
[0126] Building upon the aforementioned security authentication of the protocol gateway system and devices, the protocol gateway system also supports TLS (Transport Layer Security) encryption to ensure the security of data transmission between the gateway, devices, and the IoT management platform. After exchanging random keys using an asymmetric encryption algorithm, symmetric encryption is used to encrypt the transmitted data to prevent the theft of business data during transmission. Optionally, the IoT management platform can provide an interface for updating the protocol adapter gateway system and device keys to ensure the security of user access to the protocol adapter gateway system and devices in the event of key information leakage.
[0127] The data format conversion system also boasts flexible deployment advantages. For LAN devices, the system can be deployed within the LAN. If the device supports the IP protocol, the system can be deployed on the device site, on the manufacturer's / user's own server, or even on an internet-hosted cloud. By automatically parsing the communication protocols used by IoT devices based on the data format conversion system, and then forwarding the IoT device's data to the IoT management platform, the system enables IoT devices to access the IoT cloud platform. In particular, in addition to providing basic uplink and downlink channels for device data, the data format conversion system introduces numerous features to make identity authentication and data transmission more secure, the integration with the IoT management platform more user-friendly, and easier for users to use and expand.
[0128] The data format conversion system and the data format conversion method provided in this disclosure are based on the same inventive concept and have the same beneficial effects as the methods they adopt, operate or implement.
[0129] According to another aspect of the present disclosure, a data format conversion apparatus is provided, as shown in FIG4, the apparatus comprising:
[0130] The first acquisition module 101 is used to acquire the communication protocol specification used by the transmission message based on the transmission message sent by the sending end;
[0131] The second acquisition module 102 is used to acquire the encoding and decoding strategy corresponding to the communication protocol specification, and based on the encoding and decoding strategy, acquire the target data of the transmission message, wherein the target data is the data required by the receiving end; the encoding and decoding strategy is obtained by training a neural network model using the communication protocol specification and sample messages transmitted using the communication protocol specification, wherein the sample messages are pre-labeled according to the communication protocol specification.
[0132] The format conversion module 103 is used to convert the format of the target data into a format supported by the receiving end, and send the converted target data to the receiving end.
[0133] In one or more embodiments, the second acquisition module 102 is used to:
[0134] When the sending end is an IoT device, the transmission message is segmented based on the encoding and decoding strategy to obtain the parsed data of the transmission message. The parsed data is used to annotate the transmission message according to the communication protocol specification.
[0135] Obtain the target data of the transmission message from the parsed data.
[0136] In one or more embodiments, the second acquisition module 102 is used to:
[0137] When the transmitted message is a connection request message, the communication protocol specification is matched with the communication protocol specifications stored in the method library. The method library is used to store various communication protocol specifications and corresponding encoding and decoding strategies. The connection request message is a message sent by the IoT terminal requesting access to the IoT management platform.
[0138] If the communication protocol specification used by the transmitted message is not found in the method library, a sample message transmitted using the communication protocol specification is obtained. Based on the communication protocol specification and the sample message, the neural network model is trained until the neural network model converges, thereby obtaining the encoding and decoding strategy corresponding to the communication protocol specification.
[0139] In one or more embodiments, the second acquisition module 102 is further configured to:
[0140] The communication protocol specification and the sample message are input into the neural network model to obtain the parsed data of the sample message output by the neural network model. The parsed data is used to annotate the sample message according to the communication protocol specification.
[0141] Based on the parsed data output by the neural network model and the pre-labeled sample messages, the error of the neural network model is calculated, and the model parameters of the neural network model are optimized using the error until the neural network model converges.
[0142] The data format conversion device is further configured to: match the communication protocol specification with the protocols already installed in the protocol stack before matching the communication protocol specification with the communication protocol specifications stored in the method library, wherein the protocols already installed are communication protocol specifications supported by the Internet of Things management platform;
[0143] It was confirmed that there is no communication protocol specification that matches the communication protocol specification in the already implemented protocol.
[0144] The data format conversion apparatus and the data format conversion method provided in this disclosure are based on the same inventive concept and have the same beneficial effects as the methods they employ, operate, or implement.
[0145] This disclosure also provides a computer device for performing the data format conversion method described above. Please refer to FIG5, which shows a schematic diagram of a computer device provided in some embodiments of this disclosure. As shown in FIG5, the computer device 8 includes: a processor 800, a memory 801, a bus 802, and a communication interface 803. The processor 800, the communication interface 803, and the memory 801 are connected via the bus 802. The memory 801 stores a computer program that can run on the processor 800. When the processor 800 runs the computer program, it performs the data format conversion method provided in any of the foregoing embodiments of this disclosure.
[0146] The memory 801 may include high-speed random access memory (HSRAM) or non-volatile memory, such as at least one disk storage device. Communication between this device network element and at least one other network element is achieved through at least one communication interface 803 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc.
[0147] Bus 802 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. The memory 801 is used to store programs. After receiving an execution instruction, the processor 800 executes the program. The data format conversion method disclosed in any of the foregoing embodiments of this disclosure can be applied to the processor 800, or implemented by the processor 800.
[0148] The processor 800 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 800 or by instructions in software form. The processor 800 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application-Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPTA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this disclosure. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this disclosure can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 801, and processor 800 reads the information in memory 801 and, in conjunction with its hardware, completes the steps of the above method.
[0149] The computer device and the data format conversion method provided in this disclosure are based on the same inventive concept and have the same beneficial effects as the methods they employ, operate, or implement.
[0150] This disclosure also provides a computer-readable storage medium corresponding to the data format conversion method provided in the foregoing embodiments. The computer-readable storage medium is an optical disc, on which a computer program (i.e., a computer program product) is stored. When the computer program is run by a processor, it executes the data format conversion method provided in any of the foregoing embodiments.
[0151] It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, phase-change random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory, read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory, or other optical or magnetic storage media, which will not be elaborated here.
[0152] The computer-readable storage medium provided in the above embodiments of this disclosure and the data format conversion method provided in the embodiments of this disclosure are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the applications stored therein.
[0153] This disclosure also provides a computer program product, as shown in Figure 6. The computer program product 600 carries program code, namely computer program 601. The instructions included in the computer program 601 can be used to execute the steps of the data format conversion method described in the above method embodiments. For details, please refer to the above method embodiments, which will not be repeated here.
[0154] The aforementioned computer program product can be implemented through hardware, software, or a combination thereof. In one optional embodiment, the computer program product is specifically embodied in a computer storage medium; in another optional embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.
[0155] The basic principles of this disclosure have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this disclosure are merely examples and not limitations, and should not be considered as essential features of each embodiment of this disclosure. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the scope of this disclosure to the necessity of employing the aforementioned specific details for implementation.
[0156] The block diagrams of devices, apparatuses, devices, and systems disclosed herein are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.
[0157] Additionally, as used herein, the “or” used in a list of items beginning with “at least one” indicates a separate list, such that a list of, for example, “at least one of A, B, or C” means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word “exemplary” does not imply that the described example is preferred or better than other examples.
[0158] It should also be noted that in the systems and methods of this disclosure, the components or steps can be decomposed and / or recombined. These decompositions and / or recombinations should be considered as equivalent solutions to this disclosure.
[0159] Various changes, substitutions, and modifications can be made to the technology described herein without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims of this disclosure is not limited to the specific aspects of the processes, machines, manufactures, events, means, methods, and actions described above. Currently existing or later-developed processes, machines, manufactures, events, means, methods, or actions that perform substantially the same function or achieve substantially the same result as the corresponding aspects described herein can be utilized. Therefore, the appended claims include such processes, machines, manufactures, events, means, methods, or actions within their scope.
[0160] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of this disclosure. Therefore, this disclosure is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features disclosed herein.
[0161] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this disclosure to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations therein.
Claims
1. A data format conversion method, wherein, include: Based on the transmission message sent by the sending end, obtain the communication protocol specification used by the transmission message; Obtain the encoding / decoding strategy corresponding to the communication protocol specification, and based on the encoding / decoding strategy, obtain the target data of the transmission message, wherein the target data is the data required by the receiving end; The target data is converted into a format supported by the receiving end, and the converted target data is sent to the receiving end. The encoding / decoding strategy is obtained by training a neural network model using the communication protocol specification and sample messages transmitted using the communication protocol specification, wherein the sample messages are pre-labeled according to the communication protocol specification.
2. The data format conversion method as described in claim 1, wherein, Based on the encoding / decoding strategy, the target data of the transmitted message is obtained, including: When the sending end is an IoT device, the transmission message is segmented based on the encoding and decoding strategy to obtain the parsed data of the transmission message. The parsed data is used to annotate the transmission message according to the communication protocol specification. Obtain the target data of the transmission message from the parsed data.
3. The data format conversion method as described in claim 1, wherein, Obtaining the encoding / decoding strategy corresponding to the communication protocol specification includes: When the transmitted message is a connection request message, the communication protocol specification is matched with the communication protocol specifications stored in the method library. The method library is used to store various communication protocol specifications and corresponding encoding and decoding strategies. The connection request message is a message sent by the sending end requesting access to the receiving end. If the communication protocol specification used by the transmitted message is not found in the method library, a sample message transmitted using the communication protocol specification is obtained. Based on the communication protocol specification and the sample message, the neural network model is trained until the neural network model converges, thereby obtaining the encoding and decoding strategy corresponding to the communication protocol specification.
4. The data format conversion method as described in claim 3, wherein, Based on the communication protocol specification and the sample message, the neural network model is trained until it converges, including: The communication protocol specification and the sample message are input into the neural network model to obtain the parsed data of the sample message output by the neural network model. The parsed data is used to annotate the sample message according to the communication protocol specification. Based on the parsed data output by the neural network model and the pre-labeled sample messages, the error of the neural network model is calculated, and the model parameters of the neural network model are optimized using the error until the neural network model converges.
5. The data format conversion method as described in claim 3, wherein, Before matching the communication protocol specification with the communication protocol specifications stored in the method library, the process also includes: The communication protocol specification is matched with the protocols already installed in the protocol stack, wherein the installed protocols are the communication protocol specifications supported by the receiving end; It was confirmed that there is no communication protocol specification that matches the communication protocol specification in the already implemented protocol.
6. The data format conversion method as described in claim 1, wherein, Obtaining the encoding / decoding strategy corresponding to the communication protocol specification includes: When the transmitted message is a connection request message, the communication protocol specification is matched with the communication protocol specifications stored in the method library. The method library is used to store various communication protocol specifications and corresponding encoding and decoding strategies. The connection request message is a message sent by the sending end requesting access to the receiving end. If the communication protocol specification used by the transmitted message exists in the method library, the communication protocol specification used by the transmitted message and the corresponding encoding / decoding strategy are obtained directly from the method library.
7. The data format conversion method as described in claim 1, wherein, The method further includes: Based on the standard specifications used by various communication protocols, a more unified communication protocol specification is obtained; The neural network model is trained to obtain the encoding / decoding strategy; and The encoding / decoding strategy of the communication protocol specification and the protocol features corresponding to the communication protocol specification, obtained by training the neural network model, are persistently stored.
8. The data format conversion method as described in claim 1, wherein, The method further includes: Establish a bidirectional connection channel with the sending end; Adapt to the data received.
9. The data format conversion method as described in claim 1, wherein, The sending end is an IoT device, and the receiving end is an IoT management platform.
10. The data format conversion method as described in claim 1, wherein, The neural network models include Generative Adversarial Network (GAN) and Memory Model (LSTM).
11. A data format conversion system, wherein, include: The sending end is used to send transmission messages to the access module; The access module is used to convert the target data of the transmission message according to the data format conversion method according to any one of claims 1 to 10, and send the converted target data to the receiving end. The receiving end is used to receive the converted target data sent by the access module.
12. A data format conversion device, wherein, include: The first acquisition module is used to acquire the communication protocol specification used by the transmission message sent by the sending end. The second acquisition module is used to acquire the encoding and decoding strategy corresponding to the communication protocol specification, and based on the encoding and decoding strategy, acquire the target data of the transmission message, wherein the target data is the data required by the receiving end; the encoding and decoding strategy is obtained by training a neural network model using the communication protocol specification and sample messages transmitted using the communication protocol specification, wherein the sample messages are pre-labeled according to the communication protocol specification; The format conversion module is used to convert the format of the target data into a format supported by the receiving end, and send the converted target data to the receiving end.
13. A data format conversion apparatus, comprising a memory, a processor, and a computer program stored in the memory, wherein, The processor executes the computer program to implement a data format conversion method, the data format conversion method comprising: Based on the transmission message sent by the sending end, obtain the communication protocol specification used by the transmission message; Obtain the encoding / decoding strategy corresponding to the communication protocol specification, and based on the encoding / decoding strategy, obtain the target data of the transmission message, wherein the target data is the data required by the receiving end; The target data is converted into a format supported by the receiving end, and the converted target data is sent to the receiving end. The encoding / decoding strategy is obtained by training a neural network model using the communication protocol specification and sample messages transmitted using the communication protocol specification, wherein the sample messages are pre-labeled according to the communication protocol specification.
14. The data format conversion apparatus as claimed in claim 13, wherein, Based on the encoding / decoding strategy, the target data of the transmitted message is obtained, including: When the sending end is an IoT device, the transmission message is segmented based on the encoding and decoding strategy to obtain the parsed data of the transmission message. The parsed data is used to annotate the transmission message according to the communication protocol specification. Obtain the target data of the transmission message from the parsed data.
15. The data format conversion apparatus as claimed in claim 13, wherein, Obtaining the encoding / decoding strategy corresponding to the communication protocol specification includes: When the transmitted message is a connection request message, the communication protocol specification is matched with the communication protocol specifications stored in the method library. The method library is used to store various communication protocol specifications and corresponding encoding and decoding strategies. The connection request message is a message sent by the sending end requesting access to the receiving end. If the communication protocol specification used by the transmitted message is not found in the method library, a sample message transmitted using the communication protocol specification is obtained. Based on the communication protocol specification and the sample message, the neural network model is trained until the neural network model converges, thereby obtaining the encoding and decoding strategy corresponding to the communication protocol specification.
16. The data format conversion apparatus as claimed in claim 15, wherein, Based on the communication protocol specification and the sample message, the neural network model is trained until it converges, including: The communication protocol specification and the sample message are input into the neural network model to obtain the parsed data of the sample message output by the neural network model. The parsed data is used to annotate the sample message according to the communication protocol specification. Based on the parsed data output by the neural network model and the pre-labeled sample messages, the error of the neural network model is calculated, and the model parameters of the neural network model are optimized using the error until the neural network model converges.
17. The data format conversion apparatus as claimed in claim 15, wherein, Before matching the communication protocol specification with the communication protocol specifications stored in the method library, the process also includes: The communication protocol specification is matched with the protocols already installed in the protocol stack, wherein the installed protocols are the communication protocol specifications supported by the receiving end; It was confirmed that there is no communication protocol specification that matches the communication protocol specification in the already implemented protocol.
18. The data format conversion apparatus as claimed in claim 13, wherein, The sending end is an IoT device, and the receiving end is an IoT management platform.
19. A computer-readable storage medium having a computer program stored thereon, wherein, When the computer program is executed by a processor, it implements the method described in any one of claims 1 to 10.
20. A computer program product comprising a computer program, wherein, When the computer program is executed by a processor, it implements the method described in any one of claims 1 to 10.