Method, device and computer readable storage medium for transmitting data
By using the same message structure for data interaction between the edge computing gateway and the platform, the problem of interaction complexity caused by different message formats in the existing technology is solved, and the data interaction efficiency and processing capabilities are improved.
Patent Information
- Application Number
- CN202110448863.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-25
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2041-04-25
AI Technical Summary
The data interaction between the edge computing gateway and the platform is complex, resulting in high processing complexity and low efficiency. Especially when multiple communication protocols interact, the number of modules increases exponentially, resulting in high processing power requirements and possibly slow or inability to process.
The same message structure is used for data interaction. The message sent by the first device to the second device includes the first part and the second part. The first part contains the address, data type, sequence number and time information of the edge computing gateway. The second part Contains functional attributes, and received messages are also responded with the same structure, thereby avoiding increased module overhead and processing time due to different message formats.
It reduces the processing complexity between the edge computing gateway and the platform, improves interaction efficiency, reduces the number of new modules, and simplifies the processing process.
Smart Images

Figure CN113259418B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communications, and in particular to a method, device and computer-readable storage medium for transmitting data in the field of communications. Background Art
[0002] In the field of communication technology, there is data interaction between the edge computing gateway and the platform through various communication protocols. Since the data structures obtained by encapsulating data through various communication protocols are diversified, the edge computing gateway and the platform need to use diversified parsing modules to parse the data of various data structures, which increases the difficulty of data interaction between the edge computing gateway and the platform. In addition, the data types of the edge computing gateway and the platform are diversified, and the formats of the messages exchanged between the edge computing gateway and the platform may also be different. For example, the edge computing gateway sends a request message to the platform, and the platform needs to use a module to parse the received message. The platform sends a response message to the edge computing gateway, and the platform needs to use another module to encapsulate the response message before sending it. In this way, two modules are required for one platform interaction. If the platform and the edge computing gateway use multiple communication protocols for interaction, the number of modules will increase exponentially. This makes the processing of the platform and the edge computing gateway complicated, and the processing capabilities of the platform and the edge computing gateway are relatively high. For platforms or edge computing gateways with low processing capabilities, it may lead to slow processing speed, low efficiency, or even unprocessable situations. Summary of the invention
[0003] The embodiments of the present application provide a method, device, and computer-readable storage medium for transmitting data, which help reduce the processing complexity between the edge computing gateway and the platform and improve the interaction efficiency.
[0004] In a first aspect, an embodiment of the present application provides a method for transmitting data, including:
[0005] The first device sends a first message to the second device, where the first message includes a first part and a second part, where the first part includes an address of a first edge computing gateway, a first data type, a first sequence number, and first time information, and the second part includes a first functional attribute, where the first time information is used to indicate a sending time of the first message;
[0006] The first device receives a second message sent by the second device in response to the first message, where the second message includes a third part and a fourth part, the third part includes the address of the first edge computing gateway, the first data type, the first sequence number, and second time information, and the fourth part includes the first functional attribute, wherein the second time information is used to indicate the sending time of the second message;
[0007] The first device is a platform, and the second device is the first edge computing gateway, or the first device is the first edge computing gateway, and the second device is the platform.
[0008] In the above technical scheme, the first device sends a first message to the second device, and the first device receives a second message sent by the second device in response to the first message. Part of the content included in the first message is the same as the part of the content included in the second message. For the first device, the encapsulation module of the first message is the same as the parsing module of the second message. Similarly, for the second device, the encapsulation module of the second message is the same as the parsing module of the first message. This can avoid the need for multiple modules to interact with the second device at one time due to different message formats, that is, avoid the overhead caused by the need to create multiple modules for the interaction between the edge computing gateway and the platform, as well as the time consumption during the processing process. The use of the same message structure for data interaction provided in the embodiment of the present application helps to reduce the creation of new modules, reduce the complexity of processing between the edge computing gateway and the platform, and improve the interaction efficiency between the edge computing gateway and the platform.
[0009] Optionally, the message format of the first message is the same as that of the second message.
[0010] Optionally, when the first device is a platform and the second device is a first edge computing gateway, the first part of the first message also includes an address of the platform.
[0011] Optionally, when the first device is a first edge computing gateway and the second device is a platform, the first part of the second message also includes an address of the platform.
[0012] Optionally, the first part of the first message is the primary node of the first message, and the second part of the first message is the secondary node of the first message.
[0013] Optionally, the third part of the second message is the primary node of the second message, and the fourth part of the second message is the secondary node of the second message.
[0014] Optionally, the first device actively reports a message to the second device, and the second device does not need to respond.
[0015] In some possible implementations, the second part further includes first indication information, where the first indication information is used to indicate whether the first message includes a fifth part, where the fifth part includes an address of a terminal device; and / or,
[0016] The fourth part also includes second indication information, where the second indication information is used to indicate whether the second message includes a sixth part, where the sixth part includes the address of the terminal device;
[0017] If the fourth part also includes the second indication information, the method further includes:
[0018] If the first device determines, according to the second indication information, that the second message includes the sixth part, the first device parses the sixth part.
[0019] Optionally, the fifth part is the third-level node of the first message, and the sixth part is the third-level node of the second message.
[0020] In some possible implementations, if the first indication information indicates that the first message includes the fifth part, the fifth part also includes third indication information, the third indication information is used to indicate whether the first message includes a seventh part, and the seventh part includes the first data and / or the name of the first data; and / or,
[0021] If the second indication information indicates that the second message includes the sixth part, the sixth part also includes fourth indication information, and the fourth indication information is used to indicate whether the second message includes an eighth part, and the eighth part includes the second data and / or the name of the second data;
[0022] If the sixth part includes the fourth indication information, the method further includes:
[0023] If the first device determines, according to the fourth indication information, that the second message includes the eighth part, the first device parses the eighth part.
[0024] Optionally, the seventh part is the fourth-level node of the first message, and the eighth part is the fourth-level node of the second message.
[0025] In some possible implementations, the second part further includes fifth indication information, where the fifth indication information is used to indicate whether the first message includes the seventh part, where the seventh part includes the first data and / or the name of the first data; and / or,
[0026] The fourth part also includes sixth indication information, where the sixth indication information is used to indicate whether the second message includes the eighth part, where the eighth part includes the second data and / or the name of the second data;
[0027] If the fourth part includes the sixth indication information, the method further includes:
[0028] If the first device determines, according to the sixth indication information, that the second message includes the eighth part, the first device parses the eighth part.
[0029] In some possible implementations, the first message is a request message, the second message is a response message, the name of the first data included in the seventh part is the name of the data requested by the first message, the second data included in the eighth part is the first data, and the name of the second data is the name of the first data;
[0030] The first data type is the data type of the first data, the first serial number is the serial number of the first data, and the first functional attribute is the attribute of the first message.
[0031] Optionally, the message sent by the first device to the second device is an actively reported message, and the reported message includes the name of the first data and the first data.
[0032] In some possible implementations, the first message is a request message, the second message is a response message, the seventh part includes the first data and / or a name of the first data, the eighth part includes the second data and / or a name of the second data, the first data is different from the second data, and the name of the first data is different from the name of the second data;
[0033] The first data type is the data type of the first data, the first serial number is the serial number of the first data, and the first functional attribute is the attribute of the first message.
[0034] Optionally, the first message is a message actively reported by the first device, and the reported message includes the first data and the name of the first data. The second message is a response message to the message reported by the first device, and the response message includes the second data and the name of the second data. The first data is different from the second data, and the name of the first data is different from the name of the second data.
[0035] In some possible implementations, the address of the first edge computing gateway is composed of at least one of the administrative area code of the area where the first edge computing gateway is located, the district code of the area where the first edge computing gateway is located, the road code of the road where the first edge computing gateway is located, the location code of the location where the first edge computing gateway is located, the device category code of the first edge computing gateway, and the digital code of the first edge computing gateway.
[0036] Optionally, the administrative area code is determined according to the administrative division code; the district code is determined according to the chronological order of the establishment of each district; the road code is determined according to the total number of roads; the location code is determined according to the direction of the road; the equipment category code is the code of the first edge computing gateway; the digital code is the serial number of the first edge computing gateway among multiple edge computing gateways, and the multiple edge computing gateways include the first edge computing gateway.
[0037] In the above technical solution, by compiling the address of the edge computing gateway according to a unified rule, it is beneficial for the platform to uniformly manage the edge computing gateway.
[0038] In some possible implementations, the first device sending the first message to the second device includes:
[0039] The first device sends the first message to the second device according to the message queue telemetry transmission MQTT protocol;
[0040] The first device receiving the second message sent by the second device in response to the first message includes:
[0041] The first device receives the second message sent by the second device in response to the first message according to the MQTT protocol.
[0042] In some possible implementations, before the first device sends the first message to the second device according to the MQTT protocol, the method further includes:
[0043] The first device performs authentication with the MQTT protocol server;
[0044] The first device sending the first message to the second device according to the MQTT protocol includes:
[0045] After authentication is passed, the first device sends the first message to the second device according to the MQTT protocol.
[0046] Optionally, a server of the MQTT protocol is built on the first device side.
[0047] Optionally, a server of the MQTT protocol is built on the second device side.
[0048] In a second aspect, the present application provides a device for transmitting data, the device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the above-mentioned method for transmitting data when executed by the processor.
[0049] In a third aspect, the present application provides a computer-readable storage medium, characterized in that the computer-readable storage medium stores computer instructions, and when the computer instructions are executed on a device, the device executes the method described in any one of the above aspects.
[0050] It can be understood that the beneficial effects of the second to third aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 It is a schematic diagram of a system communication architecture provided by an embodiment of the present application;
[0052] Figure 2 This is a schematic diagram of a data interaction scenario provided by an embodiment of the present application;
[0053] Figure 3 is a schematic diagram of a method for data interaction between a first device and a second device provided in an embodiment of the present application;
[0054] Figure 4 This is a schematic diagram of the relationship between a publisher, an agent, and a subscriber provided in an embodiment of the present application;
[0055] Figure 5 This is a schematic diagram of an edge computing gateway address provided in an embodiment of the present application;
[0056] Figure 6 It is a schematic diagram of a method for data interaction between an edge computing gateway and a platform provided in an embodiment of the present application;
[0057] Figure 7 It is a schematic diagram of another method for data interaction between an edge computing gateway and a platform provided in an embodiment of the present application;
[0058] Figure 8 is a schematic diagram of another method for data interaction between a first device and a second device provided in an embodiment of the present application;
[0059] Fig. 9 It is a schematic diagram of the composition of a message provided in an embodiment of the present application;
[0060] Fig.10 It is a schematic diagram of a data transmission device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0061] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0062] It should be understood that the "multiple" mentioned in this application refers to two or more. In the description of this application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in order to facilitate the clear description of the technical solution of this application, the words "first" and "second" are used to distinguish between the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the words "first" and "second" do not limit the quantity and execution order, and the words "first" and "second" do not limit them to be different.
[0063] Before explaining the embodiments of the present application in detail, the application scenarios of the embodiments of the present application are first described.
[0064] In the field of communication technology, data interaction between devices and between devices and platforms requires the use of various communication protocols. In some cases, because the data sender uses different communication protocols to encapsulate the data before sending it, the data structure of the sent data is diverse, so the data receiver needs to use different modules to parse the data of different structures. Similarly, the data sender will also receive data as the data receiver, which increases the difficulty of interaction between the data sender and the data receiver. For example, in the field of smart road construction, the Transportation Bureau, the Traffic Police Bureau, and the Urban Management Bureau have installed different types of smart devices for supervision, construction, planning, maintenance, and management for the construction of smart roads. In order to unify the planning and comprehensive management of these smart devices and realize the comprehensive perception and sharing of information, it is necessary to establish an information system. At present, the construction of smart roads mainly relies on edge computing gateways to collect data from various smart devices and then send them to the platform, and realize the functions of comprehensive management, equipment maintenance, and public services based on the platform. However, with the increase in the number of smart devices with different structures connected to the edge computing gateway, the data types are also increasing. There are cases where different message formats are used for interaction between the edge computing gateway and the platform for data of different data types. For example, the platform sends a request message to the edge computing gateway, and the platform receives a response message sent by the edge computing gateway. Since the module for encapsulating the request message is different from the module for parsing the response message, the platform interaction requires two modules at a time. Similarly, the edge computing gateway sends a request message to the platform, and the edge computing gateway receives a response message sent by the platform. Since the module for encapsulating the request message is different from the module for parsing the response message, the edge computing gateway interaction also requires two modules at a time. If different communication protocols are used for interaction, the number of modules required for each interaction of the platform or the edge computing gateway will increase exponentially, and the total number of modules required by both parties will increase fourfold. In this way, the difficulty of data interaction between the two parties is increased, which seriously affects the efficiency of data interaction between the two parties.
[0065] To this end, the embodiments of the present application provide a method, device, and computer-readable storage medium for transmitting data, which reduce the complexity of processing between the edge computing gateway and the platform and help improve the efficiency of data interaction between the edge computing gateway and the platform.
[0066] The method for transmitting data provided in an embodiment of the present application is described in detail below.
[0067] like Figure 1As shown, a schematic diagram of a system communication architecture for smart road construction provided by an embodiment of the present application is shown. The system communication architecture is mainly composed of front-end equipment, edge computing gateways and platforms. For example, the front-end equipment includes intelligent devices such as meteorological sensors, LED display screens, smart power supplies, and microwave radars. The edge computing gateway is connected to various intelligent devices through the southbound interface to perform network integration, data collection, calculation, storage and application. The edge computing gateway helps to reduce the difficulty of the data docking platform for a large number of heterogeneous devices, and helps to shorten the time for data access platforms for a large number of heterogeneous devices. Among them, the southbound interface mainly uses a physical interface, such as an RS232 serial port, an RS485 serial port, and an RJ45 network port. In addition, the southbound interface also supports data interaction by establishing various communication protocols, such as the Hypertext Transfer Protocol (HTTP) protocol, the Transmission Control Protocol (TCP) protocol, and the like. The edge computing gateway collects data from various smart devices through the southbound interface, analyzes the collected data, and performs structured processing and secure encryption on the data. It then interacts with the platform through the northbound interface, and uses the platform to achieve unified management and control of various devices, and achieves comprehensive perception and sharing of information from various front-end devices. Among them, the northbound interface is mainly a communication interface established between the edge computing gateway and the platform according to the agreed communication protocol. For example, the Message Queuing Telemetry Transport (MQTT) protocol.
[0068] In some embodiments, the HTTP protocol or Hypertext Transfer Protocol Secure (HTTPS) protocol is supported between the edge computing gateway and the platform.
[0069] In some embodiments, the platform is the data aggregation center of the edge computing gateway. The edge computing gateway and the platform interact with each other through a communication protocol, and the control of the edge computing gateway and the management and control of multiple front-end devices are realized based on the platform.
[0070] In some embodiments, one or more edge computing gateways uniformly process multiple data collected from front-end devices at the application layer of the communication protocol to obtain a unified standard data structure and send it to the platform. This helps reduce the difficulty of platform docking and also helps the platform integrate and process multiple data received.
[0071] In some embodiments, the communication link between the edge computing gateway and the platform includes a long-connection communication link. Long-connection communication means that the link is initially established and maintained, and all subsequent requests and other messages are transmitted through this channel. For example, Figure 2 As shown, the long connection communication link between the edge computing gateway and the platform adopts the MQTT protocol, and transmits data in the lightweight data exchange format JSON (Java Script Object Notation, JSON) through the MQTT protocol.
[0072] Alternatively, if Figure 2 As shown, the long connection communication link between the edge computing gateway and the platform adopts the HTTP protocol or the HTTPS protocol, and transmits some unstructured data through the HTTP protocol or the HTTPS protocol, such as text, pictures, videos, audio, software update packages and other file resources.
[0073] Exemplarily, as shown in Table 1, Table 1 shows the various communication methods supported between the edge computing gateway and the platform, the encryption method corresponding to each communication method, the data type corresponding to each communication method, the data format corresponding to each communication method, the encoding method corresponding to each communication method, and the communication content corresponding to each communication method.
[0074] Table 1
[0075]
[0076]
[0077] In some embodiments, the communication between the edge computing gateway and the platform is encrypted in the form of a cipher suite. Exemplarily, the cipher suite can meet the requirements of the National Cryptography Administration, for example, the SM series, SM2, SM3, SM4, SM7, SM9, etc. formulated by the National Cryptography Administration. By using the cipher suite for encryption, it is beneficial to ensure the communication security between the edge computing gateway and the platform, and improve the security compatibility of the platform and the security capabilities of the overall information system.
[0078] The following describes a method for transmitting data in an embodiment of the present application in conjunction with the accompanying drawings.
[0079] like Figure 3 As shown, a method for transmitting data provided by an embodiment of the present application is shown. The method includes:
[0080] S310: A first device establishes a communication link with a second device.
[0081] In some embodiments, the first edge computing gateway establishes a communication link between the first edge computing gateway and the platform according to a communication protocol agreed upon between the first edge computing gateway and the platform.
[0082] In some embodiments, the first edge computing gateway and the platform support a communication method of HTTP protocol or HTTPS protocol. By building an HTTP server on the platform side, the HTTP server is used as a medium for file resource interaction between the first edge computing gateway and the platform. The first edge computing gateway, as a client in the HTTP protocol or HTTPS protocol, sends a request to the HTTP server, thereby interacting with file resources between the first edge computing gateway and the platform. Exemplarily, as shown in Table 2, Table 2 shows various request methods issued by the first edge computing gateway as a client to the HTTP server and the corresponding description of each method.
[0083] Table 2
[0084]
[0085]
[0086] In some embodiments, the first edge computing gateway and the platform support the communication mode of the MQTT protocol. By building an MQTT server on the platform side, the MQTT server acts as an intermediate agent of the MQTT protocol, the first edge computing gateway and the platform act as clients of the MQTT protocol, and the first edge computing gateway and the platform interact with data information through the MQTT protocol. Among them, the parameter configuration of the MQTT server includes the Internet Protocol (Internet Protocol, IP) of the MQTT server, the port of the MQTT server, the user name and password and other information. Exemplarily, the port of the MQTT server is set to 1883 by default. Exemplarily, such as Figure 4 As shown, the relationship between the publisher, the agent, and the subscriber is shown. The agent is an MQTT server, and the message publisher can also be a message subscriber. For example, the first edge computing gateway can publish messages as a message publisher and subscribe to messages as a message subscriber at the same time, that is, the first edge computing gateway can be used to send messages and receive messages at the same time.
[0087] Optionally, an MQTT server is built on the first edge computing gateway side, and data information is exchanged between the first edge computing gateway and the platform through the MQTT protocol.
[0088] In some embodiments, the message transmitted by the MQTT protocol is divided into two parts: topic and payload, where the topic is the type of message and the payload is the content of the message. The first edge computing gateway and the platform, as clients of the MQTT protocol, negotiate and agree on publishing topics (Public Topic) and subscribing to topics (Subscribe Topic), and publish and subscribe to messages through topics. For example, the first edge computing gateway is the subscriber of the message, the platform is the publisher of the message, the first edge computing gateway subscribes to the type of message through the topic, the platform publishes the message to the topic, and the first edge computing gateway receives the message published by the platform through the topic. For another example, the first edge computing gateway is the publisher of the message, the platform is the subscriber of the message, the platform subscribes to the type of message through the topic, the first edge computing gateway publishes the message to the topic, and the platform receives the message published by the first edge computing gateway through the topic. For the above two situations, the addresses of the corresponding topics are shown in Table 3, where smr represents smart road, server represents the message publisher is the platform, client represents the message publisher is the edge computing gateway, regionId represents the address of the artificially divided geographical area, such as a road section or a community, and gatewayId represents the address of the first edge computing gateway.
[0089] Table 3
[0090]
[0091] In some embodiments, the address of the first edge computing gateway is composed of at least one of the administrative region code of the area where the first edge computing gateway is located, the district code of the area where the first edge computing gateway is located, the road code of the road where the first edge computing gateway is located, the location code of the location where the first edge computing gateway is located, the device category code of the first edge computing gateway, and the digital code of the first edge computing gateway. Among them, the administrative region code is determined according to the administrative division code and consists of 4 digits. For example, the administrative region code of Shenzhen is 4403; the district code is determined according to the time sequence of the establishment of each district and consists of 2 digits, for example, 01 to 99, 01 represents Luohu District, 02 represents Nanshan District, 03 represents Futian District, 04 represents Bao'an District, 05 represents Longgang District, 06 represents Yantian District, 07 represents Guangming New District, 08 represents Pingshan New District, 09 represents Longhua New District, and 10 represents Dapeng New District. Newly built areas in the later period will be compiled in sequence according to this rule; the road code is determined according to the total number of roads and consists of 5 digits. For example, the code range is specified according to the total number of existing roads 11600. 0001~99999; the location code is determined according to the direction of the road, consisting of 4 digits, represented by odd and even numbers, ranging from 0001 to 9999. For example, for an east-west road, the south side is an odd number and the north side is an even number. For a north-south road, the east side is an odd number and the west side is an even number. The device category code is the code of the first edge computing gateway device, for example, ZNWG is used to represent the edge computing gateway device. The digital code is the arrangement sequence number of multiple edge computing gateway devices, consisting of 2 digits, used to distinguish multiple edge computing gateway devices at the same location, for example, the sequence starts from 01 and ends at 99, where the sequence number of the first edge computing gateway is 01. For example, Figure 5 As shown, the address of the first edge computing gateway is shown. By uniformly compiling the addresses of the edge computing gateways, it is helpful for the platform to distinguish which edge computing gateway the received data comes from, and it is convenient for the platform to manage multiple edge computing gateway devices.
[0092] S320, the first device sends data to the second device according to the communication link.
[0093] In some embodiments, the first edge computing gateway sends data to the platform according to the communication link.
[0094] In some embodiments, the platform may also send instructions to the first edge computing gateway through a communication link to control the first edge computing gateway.
[0095] In some embodiments, the first edge computing gateway sends the collected text, pictures, videos, audio, software update packages and other file resource information to the platform via the HTTP protocol or the HTTPS protocol.
[0096] In some embodiments, the first edge computing gateway and the platform respectively log in to the MQTT server for authentication, and after the authentication is passed, they exchange data through the MQTT protocol.
[0097] For example, Figure 6 As shown, after the first edge computing gateway is authenticated by the platform, the first edge computing gateway sends a request message to the platform through the edge computing gateway or the platform subscribes to a topic, and the platform sends a response message to the first edge computing gateway through the platform or the edge computing gateway subscribes to a topic.
[0098] For example, Figure 7 As shown, after the first edge computing gateway is successfully authenticated with the platform, the platform sends a request message to the first edge computing gateway through the platform or the edge computing gateway subscribes to a topic, and the first edge computing gateway sends a response message to the platform through the edge computing gateway or the platform subscribes to a topic.
[0099] In some embodiments, the quality of service of publishing messages between the first edge computing gateway and the platform according to the MQTT protocol ensures that the message is delivered at least once.
[0100] In some embodiments, if the message sent by the first edge computing gateway to the platform is a warning message, after the platform receives the message, it needs to reply to the first edge computing gateway. If the first edge computing gateway does not receive a reply message from the platform after sending the platform warning message, it will resend the warning message to the platform multiple times, and give up sending the warning message after sending the warning message multiple times. Exemplarily, the first edge computing gateway sends the warning message to the platform three times cumulatively, and gives up sending if it still does not receive a reply from the platform after sending the warning message three times cumulatively.
[0101] In some embodiments, after the first edge computing gateway sends a request message to the platform, the platform determines whether the request message is sent repeatedly or the sending time has expired based on the information in the message header of the request message. If the request message is sent repeatedly or the sending time has expired, the platform discards the request message.
[0102] In some embodiments, after the platform sends a request message to the first edge computing gateway, the first edge computing gateway determines whether the request message is sent repeatedly or the sending time has expired based on the information in the message header of the request message. If the request message is sent repeatedly or the sending time has expired, the first edge computing gateway discards the request message.
[0103] In some embodiments, the first edge computing gateway processes the data to be sent in a unified structure before sending it to the platform, or the platform processes the data to be sent in a unified structure before sending it to the first edge computing gateway. The data processing process includes the following steps:
[0104] S810, the first device sends a first message to the second device, the first message includes a first part and a second part, the first part includes an address of a first edge computing gateway, a first data type, a first serial number and first time information, the second part includes a first functional attribute, wherein the first time information is used to indicate the sending time of the first message.
[0105] In some embodiments, the first edge computing gateway is configured as follows: Figure 1 The southbound interface receives data from various front-end smart devices, processes the format of the received data, and then sends it to the platform.
[0106] In some embodiments, the first part of the first message is a primary node of the first message, and the second part of the first message is a secondary node of the first message.
[0107] In some embodiments, the platform sends a first message to the first edge computing gateway, where the first message is a request message sent by the platform to the first edge computing gateway, for example Figure 7 As an example, the platform sends a request message to the first edge computing gateway to control the restart of the first edge computing gateway. The content of the request message is as follows:
[0108]
[0109]
[0110] Exemplarily, the field tables corresponding to the message content sent between the platform and the first edge computing gateway are shown in Table 4 and Table 5, which respectively show the value of each field and the meaning of the field value.
[0111] Table 4
[0112]
[0113] Table 5
[0114]
[0115] In some embodiments, the first edge computing gateway sends a first message to the platform. As an example, the first edge computing gateway sends the heartbeat data of the first edge computing gateway to the platform once every fixed time, and the message content is as follows:
[0116]
[0117]
[0118] Exemplarily, the field table corresponding to the message content of the heartbeat data of the first edge computing gateway is shown in Table 6 and Table 7, and Table 6 and Table 7 respectively show the value of each field and the meaning of the field value.
[0119] Table 6
[0120]
[0121] Table 7
[0122] type Secondary node mode field value Field value meaning Request message activeUpload Function type: Active upload
[0123] S820, the first device receives a second message sent by the second device in response to the first message, the second message includes a third part and a fourth part, the third part includes an address of the first edge computing gateway, a first data type, a first serial number, and second time information, and the fourth part includes a first functional attribute, wherein the second time information is used to indicate the sending time of the second message.
[0124] In some embodiments, the third portion of the second message is a primary node of the second message, and the fourth portion of the second message is a secondary node of the second message.
[0125] In some embodiments, the first device receives a second message sent by the second device in response to the first message, and the fourth part of the second message includes a response result of the second device in response to the first message. Exemplarily, a response result of 0 indicates a successful response, a response result of 1 indicates a failed response, and other response results are reserved.
[0126] In some embodiments, the platform receives a second message sent by the first edge computing gateway in response to the first message, that is, the first edge computing gateway sends the second message to the platform in response to the request of the platform, for example Figure 7 As an example, after the platform sends a request message to the first edge computing gateway to control the restart of the first edge computing gateway, the first edge computing gateway sends a response message of successful response to the platform. The values of the message fields and the meanings of the field values are shown in Table 4 and Table 5. The content of the response message is as follows:
[0127] In some embodiments, the first device sends a first message to the second device, and the second part of the first message also includes first indication information, such as the msg field in Table 9, and the first indication information is used to indicate whether the first message also includes a fifth part, and the fifth part includes the terminal device, that is, Figure 1The first device receives the second message sent by the second device in response to the first message, and the fourth part of the second message also includes the second indication information, such as the msg field in Table 9, and the second indication information is used to indicate whether the second message includes the sixth part, and the sixth part includes the address of the terminal device. If the fourth part includes the msg field, it indicates that the second message also includes the sixth part, and the first device parses the sixth part. For example, the platform sends a request to the first edge computing gateway to obtain the address of the front-end device, and the first edge computing gateway sends the address of the response front-end device to the platform.
[0128] In some embodiments, the first device sends a first message to the second device, and the second part of the first message also includes first indication information, such as the msg field in Table 9, and the first indication information is used to indicate whether the first message also includes a fifth part, and the fifth part includes the terminal device, that is, Figure 1 For example, the first edge computing gateway actively sends the address of the front-end device to the platform.
[0129] In some embodiments, the first device receives a second message sent by the second device in response to the first message, and the fourth part of the second message also includes second indication information, such as the msg field in Table 9, and the second indication information is used to indicate whether the second message includes a sixth part, and the sixth part includes the address of the terminal device. If the fourth part includes the msg field, it indicates that the second message also includes the sixth part, and the first device parses the sixth part. For example, the platform sends a connection between the first edge computing gateway and the front-end device to the first edge computing gateway.
[0130] In some embodiments, the fifth portion of the first message is a third-level node of the first message, and the sixth portion of the second message is a third-level node of the second message.
[0131] In some embodiments, the first device sends a first message to the second device, the first indication information of the first message indicates that the first message includes the fifth part, the fifth part also includes the third indication information, such as the parameters field in Table 10, the third indication information is used to indicate whether the first message includes the seventh part, the seventh part includes the first data requested by the first message and the name of the first data; the first device receives the second message sent by the second device in response to the first message, the second indication information of the second message indicates that the second message includes the sixth part, the sixth part also includes the fourth indication information, such as the parameters field in Table 10, the fourth information is used to indicate whether the second message includes the eighth part, the eighth part includes the second data and the name of the second data, if the sixth part includes the parameters field, indicating that the second message also includes the eighth part, then the first device parses the eighth part. For example, the platform sends the parameters for setting the front-end device to the first edge computing gateway, the first edge computing gateway responds successfully, and sends the current parameters of the front-end device after the response.
[0132] In some embodiments, the seventh part of the first message includes the name of the first data requested by the first message, and the eighth part of the second message includes the second data, wherein the second data is the first data corresponding to the name of the first data. For example, the platform sends the model of the front-end device to the first edge computing gateway to request the data of the front-end device, and the first edge computing gateway sends the data of the front-end device to the platform.
[0133] In some embodiments, the seventh part of the first device includes the first data requested by the first message, and the eighth part of the second message includes the second data and the name of the second data, wherein the name of the second data is the name of the first data, and the second data is the first data. For example, the platform sends a parameter value to the first edge computing gateway for searching for a corresponding parameter name, and the first edge computing gateway sends the parameter name and the corresponding parameter to the platform.
[0134] In some embodiments, the seventh part of the first message includes the name of the first data requested by the first message and the first data, and the eighth part of the second message includes the second data, wherein the second data is different from the first data. For example, the first edge computing gateway sends the model of the front-end device and the data of the front-end device to the platform, and the platform sends the next setting data of the front-end device to the first edge computing gateway.
[0135] In some embodiments, the seventh part of the first message includes the name of the first data requested by the first message and the first data, and the eighth part of the second message includes the name of the second data, wherein the name of the second data is the same as the name of the first data. For example, the first edge computing gateway sends the model and corresponding data of the front-end device to the platform, and the platform sends a response result to the first edge computing gateway and feeds back the corresponding device model.
[0136] In some embodiments, the first device sends a first message to the second device, and the first indication information of the first message indicates that the first message includes the fifth part, and the fifth part also includes the third indication information, such as the parameters field in Table 10, and the third indication information is used to indicate whether the first message includes the seventh part, and the seventh part includes the first data requested by the first message and the name of the first data. For example, the first edge computing gateway actively sends the current parameter information of the front-end device to the platform.
[0137] In some embodiments, the first device receives a second message sent by the second device in response to the first message, the second indication information of the second message indicates that the second message includes the sixth part, the sixth part also includes the fourth indication information, such as the parameters field in Table 10, the fourth information is used to indicate whether the second message includes the eighth part, the eighth part includes the second data and the name of the second data, if the sixth part includes the parameters field, indicating that the second message also includes the eighth part, then the first device parses the eighth part. For example, the platform sends the parameters set for the front-end device to the first edge computing gateway.
[0138] In some embodiments, the seventh portion of the first message is a fourth-level node of the first message, and the eighth portion of the second message is a fourth-level node of the second message.
[0139] In some embodiments, the content of the first message, i.e., the request message, sent by the first device to the second device is divided into four nodes, or the content of the second message, i.e., the response message, received by the first device in response to the first message and sent by the second device is divided into four nodes. For example, Table 8, Table 9, Table 10, and Table 11 show the fields of each node and the corresponding definition of each field. As an example, the first message sent by the first device is as follows: Figure 7 The request message in Table 8 includes the address of the first edge computing gateway, the first data type such as the data type in the request message in Table 8, the first serial number such as the serial number of the data in the request message in Table 8, the first time information such as the time in the request message in Table 8, the first function attribute such as the function type in the request message in Table 9, the address of the terminal device such as the parameter in the request message in Table 10, and the second data and / or the name of the second data such as the keyword and the corresponding value in the request message in Table 11. The first device receives the second message sent by the second device in response to the first message such as Figure 7The content of the message includes the address of the first edge computing gateway, the first data type such as the data type of the response message in Table 8, the first serial number such as the serial number of the data in the response message in Table 8, the second time information such as the time of the response message in Table 8, the first functional attribute such as the functional type of the response message in Table 9, the address of the terminal device such as the parameter type of the response message in Table 10, the first data and / or the name of the first data such as the keyword and corresponding value of the response message in Table 11. Among them, the serial number of the data in the first message, i.e., the request message, is the same as the serial number of the data in the second message, i.e., the response message, the attribute field of the first message is the same as the attribute of the second message, and the data type of the first message is the same as the data type of the second message.
[0140] Table 8
[0141]
[0142] Table 9
[0143]
[0144]
[0145] Table 10
[0146]
[0147] Table 11
[0148]
[0149] In some embodiments, a first device sends a first message to a second device, and the first device receives a second message sent by the second device in response to the first message, and the values of the fields of the four nodes of the first message are not unique and the values of the fields of the four nodes of the second message are not unique.
[0150] In some embodiments, when the first device is a platform and the second device is a first edge computing gateway, the first part of the first message also includes an address of the platform.
[0151] In some embodiments, when the first device is a first edge computing gateway and the second device is a platform, the first part of the second message also includes an address of the platform.
[0152] In some embodiments, the first serial number is a unique identification code generated by the first edge computing gateway sending the first data, which is composed of a 32-bit random code, or the first serial number is a unique identification code generated by the platform sending the second data, which is composed of a 32-bit random code.
[0153] In some embodiments, the message body of the second message includes a ninth part and a tenth part, the ninth part includes the device model of the third-level node, i.e., the sender of the third data, and the fourth-level node, i.e., the third data, and the tenth part includes the device model of the third-level node, i.e., the sender of the fourth data, and the fourth data. For example, the ninth part includes the device model of the environment device 1 and the data of the environment device 1, and the tenth part includes the device model of the environment device 2 and the data of the environment device 2.
[0154] Optionally, the third data is the same as the first data, the first data type is the data type of the third data, and the first serial number is the serial number of the third data.
[0155] Optionally, the fourth data is the same as the first data, the first data type is the data type of the fourth data, and the first serial number is the serial number of the fourth data.
[0156] In some embodiments, the message body of the second message includes a ninth part and a tenth part, the ninth part includes the address of the third-level node, i.e., the sender of the third data, the keyword of the fourth-level node, i.e., the device model of the sender of the third data, and the value of the fourth-level node, i.e., the third data, and the tenth part includes the address of the third-level node, i.e., the sender of the fourth data, the keyword of the fourth-level node, i.e., the device model of the sender of the fourth data, and the value of the fourth-level node, i.e., the fourth data. For example, the ninth part includes the device model of environment device 1 and the data of environment device 1, and the tenth part includes the device model of environment device 2 and the data of environment device 2.
[0157] Exemplarily, the components of the second message are as follows: Fig. 9As shown, the message header of the second message includes at least one of the address of the first edge computing gateway, the first data type, the second time information, the first sequence number, and the first functional attribute, and the order of the address of the first edge computing gateway, the first data type, the second time information, the first sequence number, and the first functional attribute is not unique. The message body of the third message includes the ninth part and the tenth part, in which the address of the sender of the third data in the ninth part is on the left side of the device model of the sender of the third data, and the third data is on the right side of the device model of the sender of the third data, and the arrangement of the tenth part is the same as the ninth part. Optionally, the device model of the sender of the third data is on the left side of the address of the sender of the third data, and the third data is on the right side of the address of the sender of the third data, and the arrangement of the tenth part is the same as the ninth part. Optionally, the third data is on the left side of the address of the sender of the third data, and the device model of the sender of the third data is on the right side of the address of the sender of the third data, and the arrangement of the tenth part is the same as the ninth part. Optionally, the third data is on the left side of the device model of the sender of the third data, and the address of the sender of the third data is on the right side of the device model of the sender of the third data, and the arrangement of the tenth part is the same as the ninth part. Optionally, the third data is on the left side of the device model of the sender of the third data, and the address of the sender of the third data is on the right side of the device model of the sender of the third data, and the arrangement of the tenth part is the same as the ninth part. Optionally, the address of the sender of the third data is on the left side of the third data, the device model of the sender of the third data is on the right side of the third data, and the arrangement of the tenth part is the same as the ninth part. Optionally, the device model of the sender of the third data is on the left side of the third data, the address of the sender of the third data is on the right side of the third data, and the arrangement of the tenth part is the same as the ninth part.
[0158] For example, Fig. 9 As shown, when the first device is a platform and the second device is a first edge computing gateway, the platform can determine which edge computing gateway the second message comes from according to the address of the first edge computing gateway in the message header of the second message, determine which data type the received data belongs to according to the first data type, the first data type is the data type of the third data and the fourth data, determine the message sending time according to the second time information, determine the third data and the fourth data according to the first serial number, and determine the functional type of the message according to the first functional attribute; the platform can determine the data sender according to the address of the sender of the third data and the address of the sender of the fourth data in the message body of the second message, distinguish the sources of the third data and the fourth data, determine the device model of the data sender according to the device model of the sender of the third data and the device model of the sender of the fourth data, and distinguish the device models of the senders of the third data and the fourth data.
[0159] In some embodiments, the first edge computing gateway sends a first message to the platform at fixed intervals, and no platform response is required. For example, the data type of the first message is the heartbeat data of the first edge computing gateway, or the data type of the first message is the status data of the front-end device.
[0160] As an example, the first edge computing gateway determines the online status of each front-end device, generates corresponding data according to the determination result, and sends a first message to the platform, wherein the first data type is the status data of the front-end device, the first sequence number is the sequence number of the status data, the first functional attribute is active upload, and the data included in the request message is the first data and the name of the first data. The message content is as follows:
[0161]
[0162]
[0163] Exemplarily, the specific field table content corresponding to the first message is shown in Table 12 and Table 13. Table 12 and Table 13 show the four node fields in the first message, the corresponding value of each field and the corresponding meaning of the value.
[0164] Table 12
[0165]
[0166] Table 13
[0167]
[0168]
[0169] As an example, the platform sends a first message, namely a request message, to the first edge computing gateway for obtaining data of the smart power supply device, and the first edge computing gateway sends a second message, namely a response message, to the platform, such as Figure 7 The request message and response message in the text file are as follows: The first data type is smart power supply, the first serial number is the serial number of the parameter of the smart power supply, the first function attribute is read, and the message content is as follows:
[0170] The platform sends a request message:
[0171]
[0172] The first edge computing gateway sends a response message indicating successful response. The data included in the response message is the second data and the name of the second data:
[0173]
[0174]
[0175]
[0176]
[0177]
[0178] The first edge computing gateway sends a response message indicating a failed response:
[0179]
[0180] As an example, the platform sends a first message, i.e., a request message, to the first edge computing gateway for setting parameters of the smart power supply device, and the first edge computing gateway sends a second message, i.e., a response message of successful response or a response message of failed response, to the platform. Figure 7 The first data type is smart power supply, the first serial number is the serial number of the setting parameter of the smart power supply, the first function attribute is setting, the data included in the request message is the first data and the name of the first data, and the message content is as follows:
[0181] The platform sends a request message:
[0182]
[0183]
[0184] The first edge computing gateway sends a successful response message:
[0185] The first edge computing gateway sends a response message indicating a failed response:
[0186]
[0187]
[0188] As an example, the first edge computing gateway actively sends the parameters of the smart power supply device to the platform, such as Figure 6 The first data type is a smart power supply, the first serial number is a serial number of a parameter of the smart power supply, the first function attribute is active upload, the data included in the request message is the first data and the name of the first data, and the message content of the request message is as follows:
[0189]
[0190]
[0191]
[0192]
[0193] As an example, the platform sends a first message, i.e., a request message, to the first edge computing gateway to set the first edge computing gateway to actively upload parameters of the smart power supply device. The data included in the request message is the first data and the name of the first data. The first edge computing gateway sends a second message, i.e., a response message of successful response or a response message of failed response, to the platform. Figure 7 The first data type is a smart power supply, the first serial number is a serial number of a parameter of the smart power supply, the first functional attribute is a parameter for setting an active upload method, and the content of the request message is as follows:
[0194]
[0195] Exemplarily, the specific field table contents corresponding to the request message and response message regarding the parameters of the smart power supply device between the platform and the first edge computing gateway are shown in Tables 14 and 15. Tables 14 and 15 show the four node fields of the message, the corresponding field values, and the corresponding field value meanings.
[0196] Table 14
[0197]
[0198] Table 15
[0199]
[0200]
[0201]
[0202]
[0203]
[0204] In some embodiments, the first device sends a first message to the second device, and the first device receives a second message sent by the second device in response to the first message, wherein the message content of the first message includes a first part, a second part, and a seventh part, namely, a first-level node, a second-level node, and a fourth-level node, wherein the fifth indication information of the second part is used to indicate that the first message includes the seventh part, and the message content of the second message includes a third part and a fourth part, namely, a first-level node and a second-level node. For example, the first edge computing gateway sends data information of the first edge computing gateway to the platform, and the platform sends a message of successful response to the first edge computing gateway. For another example, the platform sends parameters for setting the first edge computing gateway to the first edge computing gateway, and the first edge computing gateway sends a successful response to the platform. For another example, the first edge computing gateway sends an alarm message to the platform, and the platform sends a successful response to the first edge computing gateway.
[0205] In some embodiments, the first device sends a first message to the second device, and the first device receives a second message sent by the second device in response to the first message, wherein the message content of the first message includes the first part, the second part, and the seventh part, namely, the first-level node, the second-level node, and the fourth-level node, and the message content of the second message includes the third part, the fourth part, and the eighth part, namely, the first-level node, the second-level node, and the fourth-level node, and the first device parses the eighth part according to the sixth indication information in the fourth part. For example, the platform sends the setting parameters of the first edge computing gateway to the first edge computing gateway, and the first edge computing gateway sends a response result to the platform and sends the current parameter information.
[0206] The present application embodiment provides a device 1000 for transmitting data, such as Fig.10 As shown, the device 1000 includes a processing unit 1010 and a transceiver unit 1020 .
[0207] For example, the processing unit 1010 is used to implement the processing-related operations performed by the first device in the above method embodiment, for example, the first message sent by the first device includes a first part and a second part, the first part includes the address of the first edge computing gateway, the first data type, the first serial number and the first time information, and the second part includes the first functional attribute. The transceiver unit 1020 is used to implement the transceiver-related operations performed by the first device in the above method embodiment, for example, the first device sends a first message to the second device, and the first device receives the second message sent by the second device.
[0208] This embodiment also provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on a device, the device can execute the above-mentioned related method steps to implement the method for transmitting data in the above-mentioned embodiment.
[0209] This embodiment also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the above-mentioned related steps to implement the method for transmitting data in the above-mentioned embodiment.
[0210] In addition, an embodiment of the present application also provides a device, which may specifically be a chip, a component or a module, and the device may include a connected processor and a memory; wherein the memory is used to store computer-executable instructions, and when the device is running, the processor may execute the computer-executable instructions stored in the memory so that the chip executes the method for transmitting data in the above-mentioned method embodiments.
[0211] Among them, the equipment, computer storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.
[0212] It should be noted that the information interaction, execution process and other contents between the above-mentioned modules are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0213] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0214] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0215] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0216] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0217] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0218] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. 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 application, and should all be included in the protection scope of the present application.
Claims
1. A method for transmitting data, characterized in that: The method comprises: The first device sends a first message to the second device, where the first message includes a first part and a second part, where the first part includes an address of a first edge computing gateway, a first data type, a first sequence number, and first time information, and the second part includes a first functional attribute, where the first time information is used to indicate a sending time of the first message; The first device receives a second message sent by the second device in response to the first message, the second message including a third part and a fourth part, the third part including the address of the first edge computing gateway, the first data type, the first sequence number, and the second time information, the fourth part including the first functional attribute, wherein the second time information is used to indicate the sending time of the second message; the first part is a primary node of the first message, the second part is a secondary node of the first message, the third part is a primary node of the second message, and the fourth part is a secondary node of the second message; The first device is a platform, and the second device is the first edge computing gateway, or the first device is the first edge computing gateway, and the second device is the platform.
2. The method according to claim 1, characterized in that The second part further includes first indication information, where the first indication information is used to indicate whether the first message includes a fifth part, where the fifth part includes an address of a terminal device; and / or, The fourth part also includes second indication information, where the second indication information is used to indicate whether the second message includes a sixth part, where the sixth part includes the address of the terminal device; If the fourth part also includes the second indication information, the method further includes: If the first device determines, according to the second indication information, that the second message includes the sixth part, the first device parses the sixth part.
3. The method according to claim 2, characterized in that If the first indication information indicates that the first message includes the fifth part, the fifth part also includes third indication information, and the third indication information is used to indicate whether the first message includes a seventh part, and the seventh part includes the first data and / or the name of the first data; and / or, If the second indication information indicates that the second message includes the sixth part, the sixth part also includes fourth indication information, and the fourth indication information is used to indicate whether the second message includes an eighth part, and the eighth part includes the second data and / or the name of the second data; If the sixth part includes the fourth indication information, the method further includes: If the first device determines, according to the fourth indication information, that the second message includes the eighth part, the first device parses the eighth part.
4. The method according to claim 1, characterized in that: The second part also includes fifth indication information, where the fifth indication information is used to indicate whether the first message includes a seventh part, where the seventh part includes the first data and / or the name of the first data; and / or, The fourth part also includes sixth indication information, where the sixth indication information is used to indicate whether the second message includes an eighth part, where the eighth part includes the second data and / or the name of the second data; If the fourth part includes the sixth indication information, the method further includes: If the first device determines, according to the sixth indication information, that the second message includes the eighth part, the first device parses the eighth part.
5. The method according to claim 3 or 4, characterized in that: The first message is a request message, the second message is a response message, the name of the first data included in the seventh part is the name of the data requested by the first message, the second data included in the eighth part is the first data, and the name of the second data is the name of the first data; The first data type is the data type of the first data, the first serial number is the serial number of the first data, and the first functional attribute is the attribute of the first message.
6. The method according to claim 3 or 4, characterized in that: The first message is a request message, the second message is a response message, the seventh part includes the first data and / or a name of the first data, the eighth part includes the second data and / or a name of the second data, the first data is different from the second data, and the name of the first data is different from the name of the second data; The first data type is the data type of the first data, the first serial number is the serial number of the first data, and the first functional attribute is the attribute of the first message.
7. The method according to claim 1, characterized in that The address of the first edge computing gateway is composed of at least one of the administrative area code of the area where the first edge computing gateway is located, the district code of the area where the first edge computing gateway is located, the road code of the road where the first edge computing gateway is located, the location code of the location where the first edge computing gateway is located, the device category code of the first edge computing gateway, and the digital code of the first edge computing gateway; the digital code is the serial number of the first edge computing gateway among multiple edge computing gateways, and the multiple edge computing gateways include the first edge computing gateway.
8. The method according to claim 1, characterized in that: The first device sending the first message to the second device includes: The first device sends the first message to the second device according to the message queue telemetry transmission MQTT protocol; The first device receiving the second message sent by the second device in response to the first message includes: The first device receives the second message sent by the second device in response to the first message according to the MQTT protocol.
9. The method according to claim 8, characterized in that Before the first device sends the first message to the second device according to the MQTT protocol, the method further includes: The first device is authenticated with the MQTT protocol server.
10. A device for transmitting data, comprising a processor, wherein the processor is configured to execute the method according to any one of claims 1 to 9.
