Iot device communication method and iot device
By configuring standardized communication metadata and communication driver modules for IoT devices, the problems of low development efficiency and high cost caused by different models of communication modules are solved, enabling efficient and low-cost IoT device development.
Patent Information
- Application Number
- CN202310004787.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-03
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2043-01-03
AI Technical Summary
In the development of existing IoT devices, different models of communication modules require proprietary communication command drivers, resulting in low development efficiency and high costs.
By configuring standardized communication metadata for IoT devices and using the communication driver module to parse the communication metadata to determine the target communication instructions, data interaction between the processing unit and the IoT platform can be achieved, reducing the need for dedicated code development for the processing unit.
It improves the development efficiency of IoT devices, reduces development costs, and simplifies the development process of IoT devices.
Smart Images

Figure CN116032968B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of Internet of Things, and in particular to an Internet of Things device communication method and device, a micro control chip for the Internet of Things device communication method and device, an Internet of Things device, a storage medium. BACKGROUND
[0002] With the rapid development of Internet of Things (IoT) technology, technologies such as Internet-connected cars, Internet-connected homes, smart cities, smart buildings, and smart industries bring convenience to people's lives from all sides, and the demand for developing Internet of Things devices is increasing.
[0003] At present, most Internet of Things devices need to rely on access to communication modules to obtain networking capabilities. Since different types of communication modules need to be driven by their own communication instructions, when developing Internet of Things devices, it is necessary to develop instruction driving modules corresponding to the communication modules for the processing units in the Internet of Things devices. This process limits the development efficiency of Internet of Things devices and increases development costs. Therefore, it is necessary to provide a new Internet of Things device communication method to improve the development efficiency of Internet of Things devices and reduce development costs, and further promote the development of Internet of Things technology. SUMMARY
[0004] The embodiments of the present application provide an Internet of Things device communication method and an Internet of Things device to improve the development efficiency of Internet of Things devices and reduce development costs.
[0005] In a first aspect, the embodiments of the present application provide an Internet of Things device communication method, the Internet of Things device comprising a processing unit and at least one communication module, the method comprising: when the processing unit needs to communicate with an Internet of Things platform, determining a target communication instruction matched with the communication module, and sending the target communication instruction to the communication module; the target communication instruction is obtained in advance from the communication metadata corresponding to the communication module; calling the communication module to communicate with the Internet of Things platform based on the target communication instruction, to realize data interaction between the processing unit and the Internet of Things platform.
[0006] In a second aspect, the embodiments of the present application provide another method for communication of an Internet of Things device, the Internet of Things device comprising a micro control chip for data processing and at least one AT module for external communication, the method comprising: when the micro control chip needs to communicate with an Internet of Things platform, determining a target AT instruction matched with the AT module, and sending the target AT instruction to the AT module; the target AT instruction is obtained in advance from communication metadata corresponding to the AT module, the communication metadata recording a plurality of AT instructions, the AT instructions corresponding to standard communication operations for communication with the Internet of Things platform; invoking the AT module to communicate with the Internet of Things platform based on the target AT instruction, to realize data interaction between the micro control chip and the Internet of Things platform.
[0007] In a third aspect, the embodiments of the present application provide a method for communication of an Internet of Things device, the Internet of Things device comprising a processing unit and at least one communication module, the method comprising: when the processing unit needs to communicate with an Internet of Things platform, determining a target communication instruction matched with the communication module, the target communication instruction being obtained in advance from communication metadata corresponding to the communication module, the communication metadata recording a plurality of communication instructions, the communication instructions corresponding to standard communication operations for communication with the Internet of Things platform; sending the target communication instruction to the communication module, so that the communication module communicates with the Internet of Things platform based on the target communication instruction, to realize data interaction between the processing unit and the Internet of Things platform.
[0008] In a fourth aspect, the embodiments of the present application provide an Internet of Things device, comprising a processing unit, at least one communication module, and a communication driving module; the communication driving module is configured to, when the processing unit needs to communicate with an Internet of Things platform, determine a target communication instruction matched with the communication module, and send the target communication instruction to the communication module, the target communication instruction being obtained in advance from communication metadata corresponding to the communication module; the communication module is configured to communicate with the Internet of Things platform based on the target communication instruction, to realize data interaction between the processing unit and the Internet of Things platform.
[0009] In a fifth aspect, the embodiments of the present application provide a micro control chip for an Internet of Things device, comprising a processing unit and a communication driving module; the communication driving module is configured to, when the processing unit needs to communicate with an Internet of Things platform, determine a target communication instruction matched with the communication module, the target communication instruction being obtained in advance from communication metadata corresponding to the communication module, the communication metadata recording a plurality of communication instructions, the communication instructions corresponding to standard communication operations for communication with the Internet of Things platform; the communication driving module is further configured to send the target communication instruction to the communication module, so that the communication module communicates with the Internet of Things platform based on the target communication instruction, to establish data interaction between the processing unit and the Internet of Things platform.
[0010] In a sixth aspect, an embodiment of the present application provides another Internet of Things device, comprising a memory, a processor and a computer program stored in the memory, wherein the processor implements the method of any one of the above aspects when executing the computer program.
[0011] In a seventh aspect, an embodiment of the present application provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method of any one of the above aspects.
[0012] Compared with the related art, the present application has the following advantages:
[0013] According to the embodiment of the present application, the Internet of Things device comprises a processing unit and at least one communication module. When the processing unit needs to communicate with the Internet of Things platform, first, the target communication instruction matched with the communication module is determined, and the determined target communication instruction is sent to the communication module. The target communication instruction is obtained by pre-parsing the communication metadata corresponding to the communication module. Since the target communication instruction only needs to be obtained and parsed from the communication metadata corresponding to the communication module, and the communication instruction corresponding to the communication module does not need to be developed for the processing unit, the development cost of the Internet of Things device is reduced, and the development efficiency is improved. After the target communication instruction is determined, the communication module communicates with the Internet of Things platform based on the target communication instruction, realizes the data interaction between the processing unit and the Internet of Things platform, and completes the communication between the Internet of Things device and the Internet of Things platform.
[0014] The above description is only a summary of the technical scheme of the present application. In order to more clearly understand the technical means of the present application, the content of the specification can be implemented, and in order to make the above and other purposes, characteristics and advantages of the present application more obvious and easy to understand, the specific implementation of the present application is described below. BRIEF DESCRIPTION OF DRAWINGS
[0015] In the drawings, the same reference signs represent the same or similar components or elements throughout the drawings unless otherwise specified. The drawings are not necessarily drawn to scale. It should be understood that the drawings only depict some embodiments according to the present application, and should not be regarded as limiting the scope of the present application.
[0016] Figure 1 is a design idea schematic diagram of the communication metadata provided by the present application;
[0017] Figure 2 is a scene schematic diagram of the Internet of Things device communication scheme provided by the present application;
[0018] Figure 3 is a flowchart of the Internet of Things device communication method of an embodiment of the present application;
[0019] Figure 4 is a process diagram of determining target communication instructions by an Internet of Things device according to an embodiment of the present application;
[0020] Figure 5 is a flow chart of a communication method of an Internet of Things device according to another embodiment of the present application;
[0021] Figure 6 is a flow chart of a communication method of an Internet of Things device according to an embodiment of the present application;
[0022] Figure 7 is a structural block diagram of an Internet of Things device according to an embodiment of the present application;
[0023] Figure 8 is a structural block diagram of a micro control chip for an Internet of Things device according to an embodiment of the present application;
[0024] Figure 9 is a structural block diagram of a communication device of an Internet of Things device according to an embodiment of the present application;
[0025] Figure 10 is a structural block diagram of a communication device of an Internet of Things device according to another embodiment of the present application;
[0026] Figure 11 is a structural block diagram of a communication device of an Internet of Things device according to an embodiment of the present application; and
[0027] Figure 12 is a block diagram of an Internet of Things device according to an embodiment of the present application. DETAILED DESCRIPTION
[0028] In the following, only certain exemplary embodiments are simply described. As those skilled in the art can recognize, the described embodiments can be modified in various different ways without departing from the concept or scope of the present application. Therefore, the drawings and the description are considered to be exemplary in nature, rather than limiting.
[0029] In order to facilitate understanding of the technical solutions of the embodiments of the present application, the related technologies of the embodiments of the present application are described below. The following related technologies can be combined with the technical solutions of the embodiments of the present application in any manner as optional solutions, which all belong to the protection scope of the embodiments of the present application.
[0030] When the Internet of Things device communicates through the communication module, the processing unit in the Internet of Things device first needs to send a communication instruction to the communication module. Different models of communication modules correspond to their exclusive communication instruction formats. Table 1 shows the communication instruction formats and examples of three different models of communication modules when establishing a connection through the TCP protocol.
[0031]
[0032] As shown in Table 1, the communication module is also instructed to establish a connection by TCP protocol using the AT (Attention) instruction, and the communication instruction formats of the three types of communication modules are different. For the instruction of the communication operation of establishing a connection, the three types of communication modules use self-defined strings such as QIOPEN, MIPOPEN and CIPSTART, respectively, and the orders and representations of the server address, server port and connection number in the instructions are different, and even the representation methods of the TCP protocol are different.
[0033] Due to the differences in application scenarios of Internet of Things devices, a batch of Internet of Things devices may use communication modules supplied by different communication module manufacturers during development, and each Internet of Things device may be equipped with a communication module of a different type. In the related art, in order to enable the processing unit in the Internet of Things device to send a communication instruction to the communication module connected thereto, the developer of the Internet of Things device needs to specially develop code corresponding to the communication module for the processing unit, so that the processing unit can send a communication instruction matched with the communication module to the communication module. This makes the development cost of the Internet of Things device high, and reduces the development efficiency of the Internet of Things device.
[0034] In another related art, the developer of the communication module needs to develop the communication module according to the communication instruction format provided by the Internet of Things device manufacturer. Although the developer of the Internet of Things device does not need to adaptively develop the code of the processing unit for different communication modules, the development efficiency of the communication module is reduced, and the problem of high development cost of the Internet of Things device is also not solved.
[0035] Therefore, the embodiments of the present application provide a new Internet of Things device communication scheme to wholly or partially solve the above technical problems.
[0036] In the embodiments of the present application, the communication module of the Internet of Things device is configured with standardized and structured communication metadata. The communication driving module can be configured for the processing unit, which is used to acquire and analyze the communication metadata of the communication module. The communication driving module can also determine the communication instruction to be sent by the processing unit to the communication module based on the communication metadata. Figure 1 A design idea schematic diagram of communication metadata is shown. As shown in FIG. 1, the communication metadata includes a communication module type field, a communication module address field, a communication module port field, a communication module protocol field and a communication module connection number field. Figure 1As shown, the communication metadata records a plurality of communication instructions corresponding to three protocol types of Transmission Control Protocol (TCP), Transport Layer Security (TLS) and Message Queuing Telemetry Transport (MQTT), and specifically shows the contents of the communication metadata corresponding to the TCP protocol. The communication operations that can be performed when using the TCP protocol include connection establishment, data sending, data receiving and disconnection operations, and the communication metadata includes the identifiers of the standard communication operations corresponding to the above communication operations, which are connect, send, recv and disconnect, respectively. When the communication driving module parses the communication metadata, the communication instruction corresponding to a certain communication operation can be determined through the indication of the identifier of the standard communication operation.
[0037] For the communication operation, the communication metadata further includes the instruction format of the execution instruction (cmd) and the instruction format of the receiving instruction (resp). The instruction format of cmd is used to indicate the specific instruction format, including a custom string exclusive to the communication module, parameters required to be filled in the communication instruction, and the positions of the parameters; the instruction format of resp is used to indicate the return content of the communication instruction, which can be a keyword for identifying the success of the instruction. Further, the parameters can be represented by the standard-defined names in the communication metadata, so as to improve the parsing efficiency of the communication driving module. For example, the connection number can be recorded as fd, the server address can be recorded as host, the port can be recorded as port, the data to be exchanged can be recorded as data, and the data length can be recorded as data_len, and the parameters required to be filled in can be indicated by the $ symbol.
[0038] When the communication driving module parses the communication metadata, it can determine which parameters required to be filled in the communication instruction and the filling positions of the parameters in the instruction through the instruction format of cmd, fill in the parameters based on the instruction format of cmd when the communication module needs to be called, and send the communication instruction; if the keyword identifying the success of the instruction returned by the communication module is received, the communication driving module can provide the processing unit with the feedback that the communication instruction has been successfully executed.
[0039] In a specific application example, in combination with the communication module of model A shown in Table 1, for the communication operation of TCP connection establishment, the communication metadata thereof is:
[0040] ‘cmd’:‘AT+QIOPEN=1,$fd,‘TCP’,$host,$port’,
[0041] 'resp': 'CONNECT'
[0042] After the communication metadata is parsed by the communication driver module, it is known that when a connection is established using a communication module of type A, three parameters, connection number, server address and port, and the filling positions of the above three parameters need to be filled in the communication instruction. When the processing unit needs to establish a connection with connection number 1, server address www.example.com and port number 443, the communication driver module can generate the communication instruction "AT+QIOPEN=1,1,'TCP',www.example.com,443". If "CONNECT" is received from the communication module, it can be fed back to the processing unit that the connection has been successfully established.
[0043] Since the embodiments of the present application do not involve code development corresponding to specific processing unit types or communication module types, but only need the communication module to provide the communication metadata of the original communication instruction without invasion, the development efficiency of the Internet of Things device can be improved, and low-cost development of the Internet of Things device can be realized.
[0044] It can be understood that in some specific application scenarios, the communication instruction is not represented in the form of characters (such as some communication instructions of the communication module are represented in the form of binary), but the communication metadata can still be constructed for the communication instruction based on similar design ideas. The embodiments of the present application do not limit the representation form of the communication instruction recorded in the communication metadata.
[0045] Figure 2 is a schematic diagram of one application scenario for implementing the method of the embodiments of the present application. Figure 2 The Internet of Things device shown in FIG. 1 is composed of a microcontroller unit (MCU) and a communication module. The microcontroller unit is the processing unit of the Internet of Things device, and after being connected to the communication module through a serial port, the communication module can be called through AT instructions to control the communication module to connect the Internet of Things platform and transceive data, thereby completing the communication between the Internet of Things device and the Internet of Things platform. The microcontroller unit and the communication module transmit (TX) or receive (Rx) AT instructions and data through a universal asynchronous receiver / transmitter (URAT).
[0046] The micro control chip is integrated with and runs a software development kit (SDK) including an AT instruction driving module (i.e., a communication driving module of the AT instruction) and an operating system (OS) module. The AT instruction driving module can be used to acquire and analyze preconfigured communication metadata in the communication module. When acquiring the communication metadata, the AT instruction driving module sends an instruction "AT_META=?" to the communication module through URAT and receives the communication metadata provided by the communication module according to the instruction. Generally, the Internet of Things device does not replace the communication module, and thus the received communication metadata can be directly stored in the Internet of Things device locally for subsequent communication with the communication module. The OS module can adapt to different operating systems to support developers to develop and debug the Internet of Things device based on different operating systems.
[0047] The developer can input parameters required by the Internet of Things device in communication into the SDK by calling an application interface of the SDK when initializing the Internet of Things device, for example, the server address, server port and connection number of the Internet of Things platform to which the Internet of Things device is to be connected. After determining the above parameters, when the MCU needs to send an AT instruction to the communication module, the AT driving module is only required to provide the above parameters and the action type of the instruction, and then the AT driving module can acquire the AT instruction corresponding to the action type from the communication metadata. After filling in the parameters according to the format of the AT instruction, the AT instruction is sent to the communication module to complete the call to the communication module. After receiving the AT instruction, the AT parser in the communication module parses the received AT instruction to understand the content of the instruction, and communicates with the Internet of Things platform according to the content of the instruction through the transmission control protocol / internet protocol (TCP / IP).
[0048] Therefore, the AT driving module enables the MCU to have the adaptive capability, so that the MCU can send the AT instruction to the communication module through the AT driving module to complete the call to the communication module without knowing the specific AT instruction format of the communication module. That is, the developer does not need to specially develop the code for the MCU to enable the MCU to send the AT instruction to the communication module connected to the MCU. This reduces the complexity of the development of the Internet of Things device, improves the development efficiency while reducing the development cost.
[0049] The embodiment of the present application provides a communication method of an Internet of Things device, such as Figure 3A flowchart of a communication method 300 of an Internet of Things (IoT) device is shown, where the IoT device includes a processing unit and at least one communication module, and the method 300 can include the following steps:
[0050] In step S301, when the processing unit needs to communicate with an IoT platform, a target communication instruction matched with the communication module is determined, and the target communication instruction is sent to the communication module; the target communication instruction is obtained in advance from the communication metadata corresponding to the communication module, and the communication metadata records a plurality of communication instructions, and the communication instructions correspond to standard communication operations for communicating with the IoT platform.
[0051] In the embodiments of the present application, the IoT device refers to a device that can establish a connection with other devices and an IoT platform through a network and exchange data. The processing unit included in the IoT device can be used to process and analyze data, and can use the communication module and the communication of the IoT platform by accessing the communication module. The communication module can provide the IoT device with the ability of network data transmission, and its types can include cellular modules, wireless network (Wireless Fidelity, WIFI) modules, Bluetooth (Bluetooth) modules, etc. Among them, the cellular (Cellular) module can further include 2G, 3G, 4G, 5G and narrow bandwidth Internet of Things (Narrow Band-IoT, NB-IoT) modules. The communication module supports the IoT device to use TCP, TLS, User Datagram Protocol (User Datagram Protocol, UDP) and MQTT and other communication protocols to communicate with the outside world (such as communicating with the IoT platform). The processing unit included in the IoT device can be an MCU or a system on chip (System on Chip, SoC) and the like. When developing an IoT device, one or more communication modules can be connected to the processing unit of the IoT device according to the communication requirements of the IoT device. The specific type or model of the processing unit and the communication module connected to the processing unit is not limited in the present application.
[0052] When the processing unit needs to communicate externally, the communication module is instructed to complete the communication according to the communication instruction by sending the communication instruction to the communication module. The communication instruction is used to indicate the protocol type used for communication, the communication operation type, and the parameters used in communication. Among them, the protocol type can include TCP, TLS, UPD and MQTT, the communication operation type can include establishing a connection, sending data, receiving data and disconnecting a connection, and the parameters used in communication can include server address, server port, connection number, exchanged data and data length, etc.
[0053] The specific communication instruction sent to the communication module is denoted as a target communication instruction. Different types of communication modules correspond to exclusive communication instruction formats, and the communication module can only successfully execute the communication instruction matching the exclusive communication instruction format. For example, three types of communication modules correspond to the communication instruction formats shown in Table 1, and details are not described herein.
[0054] The communication metadata records various communication instructions. The communication metadata can record the various communication instructions in a structured data format, for example, in JSON (Java Script Object Notation), XML (Extensible Markup Language), or PROTOBUF (ProtocolBuffers) format. The specific recording format of the communication metadata is not limited in the embodiments of the present application. In addition, the communication instructions recorded in the communication metadata match the communication module, and the communication instructions corresponding to a specific communication operation have a corresponding relationship with the standard communication operation of the Internet of Things platform. When determining the target communication instruction, the communication metadata corresponding to the communication module can be first parsed to determine the target communication instruction according to the communication instruction format, so that the target communication instruction matches the communication instruction, and then the target communication instruction is sent to the communication module.
[0055] In an embodiment, when the processing unit needs to communicate with the Internet of Things platform, determining the target communication instruction matching the communication module can include first determining the standard communication operation of the Internet of Things platform. Different processing units and communication modules can have different names for the same communication operation, but the essence of the same communication operation is the same, so each type of communication operation can be abstractly expressed as a standard communication operation. For example, the standard communication operations of the connection establishment, data sending, data receiving, and disconnection operations can correspond to connect, send_data, receive_data, and disconnect, respectively.
[0056] After the processing unit determines the standard communication operation, the communication instruction corresponding to the standard communication operation can be obtained as the target communication instruction according to the pre-determined correspondence between the communication instruction and the standard communication operation. The communication instruction and the standard communication operation have a one-to-one correspondence, so the correspondence between the communication instruction and the standard communication operation can be pre-determined and recorded in the communication metadata. Thus, when determining the target communication instruction, the correspondence between the communication instruction and the standard communication operation can be determined by parsing the communication metadata, and then the target communication instruction can be further determined according to the obtained correspondence.
[0057] In an embodiment, the parsing process of the communication metadata can include first obtaining the communication metadata corresponding to the communication module. The communication metadata can be pre-configured in the communication module. For the communication module configured with the communication metadata, the communication metadata can be obtained by sending a communication instruction to the communication module to query the communication metadata. For example, a communication instruction "AT_META=?" can be sent to the communication module to query, and then the communication metadata provided by the communication module is received. It can be understood that for the communication module without pre-configured communication metadata, the communication metadata can be obtained through offline data transmission or other ways, and the application embodiment does not limit the way of obtaining the communication metadata of the communication module.
[0058] The communication instruction involved corresponds to the standard communication operation and carries the identifier of the standard communication operation, which can be used to determine the communication instruction corresponding to a certain communication operation. Specifically, the corresponding communication instruction can be extracted from the communication metadata according to the identifier of the standard communication operation, and the correspondence between the communication instruction and the standard communication operation is established. In a specific application example, the standard communication actions mentioned above can use connect, send, recv and disconnect identifiers. The communication metadata records the communication instructions corresponding to the above four identifiers. When the processing unit needs to implement the connection establishment communication operation, the communication instruction corresponding to the connect identifier can be parsed from the communication metadata through the connect identifier, so as to further determine the target communication instruction.
[0059] In step S302, the communication module is called to communicate with the Internet of Things platform based on the target communication instruction, so as to realize the data interaction between the processing unit and the Internet of Things platform.
[0060] It can be understood that in addition to the data interaction of the Internet of Things platform, the Internet of Things device of the application embodiment itself can also call the communication module to communicate with other Internet of Things devices based on the relay of the Internet of Things platform. The application embodiment does not limit the communication object of the Internet of Things device.
[0061] In an embodiment, the target communication instruction uses the parameters defined by the standard, and when the target communication instruction is sent to the communication module, the parameter values corresponding to the parameters can be filled in the target communication instruction, and the target communication instruction filled with the parameter values is sent to the communication module. The parameters involved in the communication between the Internet of Things device and the Internet of Things platform are fixed, for example, including the server address, server port and connection number of the Internet of Things platform connected by the Internet of Things device. Therefore, the parameters involved can be pre-defined in a standardized form, which is convenient for subsequent communication.
[0062] Figure 4is a process schematic diagram of determining target communication instruction by an Internet of Things device provided by an embodiment of the present application. As shown in Figure 4 The Internet of Things device includes an MCU, a communication driving module and a communication module. The communication driving module is configured to determine target communication instruction for the MCU. Specifically, the communication driving module can determine the communication instruction corresponding to a certain communication operation based on the communication metadata of the communication module. The MCU instructs the communication driving module to determine and send the target communication instruction to the communication module by providing the communication protocol type, the communication operation and the related parameters. After obtaining the parameter values provided by the MCU, the communication driving module can determine the target communication instruction by filling the parameter values into the corresponding communication instruction. Figure 4 The communication protocol type involved in the embodiment is TCP; the communication operation includes connection establishment (establishing connection), sending (sending data), receiving (receiving data) and connection termination (disconnecting); and the parameters include fd, host, port, data and data_len, which respectively represent the connection number, the server address, the port, the data to be exchanged and the data length.
[0063] In a specific application example, the communication metadata in the form of JSON can record the communication instructions corresponding to multiple standard communication actions through multiple levels of JSON objects. In combination with the design idea shown in Figure 1 The JSON object level can include the communication protocol object level, the communication operation object level and the execution instruction object level. Each level expresses the record content in the form of key-value pair, and Key is used as the identifier for parsing when the communication metadata is parsed. For example, in combination with Figure 1 In the communication protocol object level, the communication metadata can include the communication protocol objects corresponding to TCP, TLS and MQTT three protocols. Taking the TCP protocol as an example, the Key of the communication protocol object can be ‘tcp’, and the Value corresponding to the Key can be Figure 1The Key of the communication operation object corresponds to a standard communication operation, which can be, for example, 'connect','send','recv', and 'disconnect'. The Value of the communication operation object can be a plurality of execution instructions corresponding to the communication operation. The Key of the execution instruction object in JSON can be 'cmd' and'resp', and the Value can be a specific communication instruction format corresponding to the two Keys. Among them, 'cmd' is used to identify a communication instruction, and'resp' is used to identify an expected return value corresponding to the communication instruction, that is, a return value when the instruction is successfully executed. It can be understood that since the receiving data communication operation is an operation in which the communication module actively reports the received data to the processing unit, this operation does not have a communication instruction identified by 'cmd'. Taking the A-type communication module shown in Table 1 as an example, the Value of the cmd instruction corresponding to the connection operation (connect) under the TCP protocol in the communication metadata of the communication module can be 'AT+QIOPEN=1,$fd, 'TCP',$host,$port'; and the Value of the resp instruction can be 'CONNECT'. In the communication metadata, the standard defined parameters are fd, host, port, data, and data_len, which respectively represent the connection number, server address, port, data to be exchanged, and data length, and the parameters to be filled in are identified by the $ symbol.
[0064] In parsing the communication metadata of the communication module, the communication protocol to be used by the processing unit is first determined, and the specific communication metadata corresponding to the communication protocol is determined through the protocol identifier. Then, based on the standard communication operation determined by the processing unit, the communication instruction corresponding to the standard communication operation is determined through the identifier of the standard communication operation. After determining the communication instruction, the parameters identified by $ are filled in the communication instruction to determine the target communication instruction. Taking the use of the TCP protocol as an example, when the processing unit processes a connection with a connection number of 1, a server address of www.example.com, and a port number of 443, in establishing a connection, the communication instruction AT+QIOPEN=1,$fd, 'TCP',$host,$port' is obtained by parsing the metadata, where the parameters identified by $ are fd, host, and port. Thus, the target communication instruction determined is "AT+QIOPEN=1,1, 'TCP', www.example.com, 443"; in disconnecting the connection, the communication instruction AT+QICLOSE=$fd' is obtained by parsing the metadata, where the parameter identified by $ is fd. Thus, the target communication instruction determined is "AT+QICLOSE=1".
[0065] In an embodiment, when the communication module is called to communicate with the IoT platform based on the target communication instruction, the communication content with the IoT platform can be determined based on the parameter value in the target communication instruction first, and then the communication with the IoT platform is performed based on the communication content. That is to say, after the communication module receives the target communication instruction, the target communication instruction can be parsed, and the communication content with the IoT platform is determined according to the parameters in the target communication instruction. For example, after the communication module receives the target communication instruction "AT+QIOPEN=1,1,'TCP',www.example.com,443", it can be parsed that the communication content of the instruction is to establish a connection using port 443 on the server at address www.example.com through the TCP protocol, and the connection number is 1. Then, the communication module can communicate with the IoT platform based on the communication content, and request to establish a connection as required.
[0066] In an embodiment, when the processing unit is connected with multiple communication modules, the communication module to be called needs to be determined first when the IoT device communicates. Before the IoT device determines the target communication instruction matched with the communication module, the communication module to be called this time can be determined based on the data communication state of the communication module. The data communication state includes the frequency of data, the uplink and downlink bandwidth, and the amount of data to be exchanged. The data communication states of multiple communication modules can be compared, and the communication module with higher communication efficiency is selected preferentially. It can be understood that in actual application, the communication module meeting the demand can also be selected preferentially according to the communication demand of the processing unit. The selection of the communication module in the embodiments of the present application is not limited.
[0067] In an embodiment, when the communication module determines that the target communication instruction is executed successfully, the message of successful execution can be fed back to the processing unit according to the indication of the feedback result in the target communication instruction. In the communication metadata of model A represented in the JSON form in the foregoing specific application example, the expected return value of multiple communication instructions is recorded with'resp' as the identifier, that is, the return value when the instruction is successfully executed. After the communication module successfully executes the communication task indicated by the target communication instruction, the return value is sent to the processing unit. Since the return value indicating the success of the instruction is recorded in the communication metadata, the processing unit can obtain the feedback of the successful execution of the target communication instruction by parsing the communication metadata and combining the data sent by the communication module to the processing unit. For example, if the processing unit receives "CONNECT", it indicates that the target communication instruction for indicating the establishment of the connection is successfully executed; if "SEND OK" is received, it indicates that the target communication instruction for indicating the sending of data is successfully executed.
[0068] In one embodiment, in case the communication module determines that the target communication instruction is not executed successfully, i.e. the processing unit does not receive the expected return value, the processing unit can be notified to re-determine the target communication instruction.
[0069] In addition, in case the communication module determines that the target communication instruction is not executed successfully, the processing unit can also be provided with an original error message. In case the processing unit does not receive the expected return value, the cause of the communication failure can be further analyzed by querying the original error message.
[0070] The embodiments of the present application also provide another communication method for an Internet of Things device, as shown in the following table. Figure 5 As shown in the flowchart of the communication method for the Internet of Things device provided by another embodiment of the present application, the Internet of Things device comprises a micro control chip for data processing and at least one AT module for external communication, and the method 500 can comprise the following steps:
[0071] In step S501, when the micro control chip needs to communicate with the Internet of Things platform, a target AT instruction matched with the AT module is determined, and the target AT instruction is sent to the AT module; the target AT instruction is obtained by pre-analyzing the communication metadata corresponding to the AT module, the communication metadata records a plurality of AT instructions, and the AT instructions correspond to standard communication operations for communicating with the Internet of Things platform.
[0072] In the process of using the AT module to communicate with the outside, the communication metadata, i.e. the AT instruction metadata, records structured information about a plurality of AT instructions in the communication metadata, and the target AT instruction can be determined according to the indication of the structured information by analyzing the communication metadata.
[0073] In step S502, the AT module is called to communicate with the Internet of Things platform based on the target AT instruction, so as to realize data interaction between the micro control chip and the Internet of Things platform.
[0074] The specific communication scheme can refer to the foregoing embodiments, which will not be described here.
[0075] The embodiments of the present application also provide a communication method for an Internet of Things device, as shown in the following table. Figure 6 As shown in the flowchart of the communication method for the Internet of Things device provided by an embodiment of the present application, the Internet of Things device comprises a processing unit and at least one communication module, and the method 600 can comprise the following steps:
[0076] In step S601, when the processing unit needs to communicate with the Internet of Things platform, a target communication instruction matched with the communication module is determined, the target communication instruction being obtained in advance from the communication metadata corresponding to the communication module, the communication metadata recording a plurality of communication instructions, the communication instructions corresponding to standard communication operations for communicating with the Internet of Things platform.
[0077] In step S602, the target communication instruction is sent to the communication module, so that the communication module communicates with the Internet of Things platform based on the target communication instruction, and data interaction between the processing unit and the Internet of Things platform is realized.
[0078] The specific communication scheme can refer to the foregoing embodiments, which will not be described here.
[0079] The embodiment of the present application further provides an Internet of Things device, as shown in the accompanying drawings. Figure 7 As shown in the accompanying drawings, a structural block diagram of an Internet of Things device 700 provided by an embodiment of the present application is shown, the Internet of Things device comprising a processing unit 701, a communication driving module 702, and at least one communication module 703. In the Internet of Things device 700:
[0080] The communication driving module 702 is configured to, when the processing unit needs to communicate with the Internet of Things platform, determine a target communication instruction matched with the communication module, and send the target communication instruction to the communication module, the target communication instruction being obtained in advance from the communication metadata corresponding to the communication module.
[0081] The communication module 703 is configured to communicate with the Internet of Things platform based on the target communication instruction, so as to realize data interaction between the processing unit and the Internet of Things platform.
[0082] In an implementation manner, the communication driving module 702 is arranged in the processing unit.
[0083] The embodiment of the present application further provides a micro control chip for an Internet of Things device, as shown in the accompanying drawings. Figure 8 As shown in the accompanying drawings, a structural block diagram of a micro control chip 800 for an Internet of Things device provided by an embodiment of the present application is shown, the micro control chip 800 comprising a processing unit 801 and a communication driving module 802. In the micro control chip 800:
[0084] The communication driving module 802 is configured to, when the processing unit needs to communicate with the Internet of Things platform, determine a target communication instruction matched with the communication module, the target communication instruction being obtained in advance from the communication metadata corresponding to the communication module, the communication metadata recording a plurality of communication instructions, the communication instructions corresponding to standard communication operations for communicating with the Internet of Things platform.
[0085] The communication driving module 802 is further configured to send the target communication instruction to the communication module, so that the communication module communicates with the Internet of Things platform based on the target communication instruction, and data interaction between the processing unit and the Internet of Things platform is established.
[0086] The communication driving module involved in the embodiments of the present application can be provided by a software tool development package, and specifically can be a code module. In an implementation, the software tool development package can be integrated and run on the processing unit, or the communication driving module can be provided to the processing unit in the form of firmware. When the processing unit needs to communicate with the Internet of Things platform, the communication module can be called through the communication driving module to complete data interaction with the Internet of Things platform.
[0087] Corresponding to the application scenario and method of the method provided by the embodiments of the present application, the embodiments of the present application further provide an Internet of Things device communication apparatus. As shown in Figure 9 FIG. 9 is a structural block diagram of an Internet of Things device communication apparatus 900 according to an embodiment of the present application. The apparatus 900 can include:
[0088] An instruction determination module 901 is configured to determine a target communication instruction matched with the communication module when the processing unit needs to communicate with the Internet of Things platform, and send the target communication instruction to the communication module; the target communication instruction is obtained from the communication metadata corresponding to the communication module in advance;
[0089] A module calling module 902 is configured to call the communication module to communicate with the Internet of Things platform based on the target communication instruction, so as to realize data interaction between the processing unit and the Internet of Things platform.
[0090] In an implementation, the instruction determination module 901 can be specifically configured to determine a standard communication operation for communicating with the Internet of Things platform, and acquire a communication instruction corresponding to the standard communication operation as the target communication instruction according to a pre-determined correspondence relationship between the communication instruction and the standard communication operation.
[0091] In an implementation, the instruction determination module 901 can include a metadata analysis submodule configured to analyze the communication metadata; the metadata analysis submodule can be specifically configured to:
[0092] Acquire the communication metadata corresponding to the communication module, the communication metadata recording a plurality of communication instructions, the communication instructions corresponding to the standard communication operation and carrying the identifier of the standard communication operation;
[0093] Extract the corresponding communication instruction from the communication metadata according to the identifier of the standard communication operation, and establish the correspondence relationship between the communication instruction and the standard communication operation.
[0094] In an embodiment, the target communication instruction uses a parameter defined by a standard, and the instruction determining module 901 can include:
[0095] The parameter value filling submodule is configured to fill the parameter value corresponding to the parameter in the target communication instruction, and send the target communication instruction with the filled parameter value to the communication module.
[0096] In an embodiment, the module calling module 902 can be specifically configured to determine the communication content with the Internet of Things platform based on the parameter value in the target communication instruction, and perform communication with the Internet of Things platform based on the communication content.
[0097] In an embodiment, the apparatus 900 can further include a module determining module configured to determine the communication module called this time based on the data communication state of the communication module before the Internet of Things device determines the target communication instruction matching the communication module.
[0098] In an embodiment, the apparatus 900 can further include a message feedback module configured to, in a case where the communication module determines that the target communication instruction is executed successfully, feed back a message of successful execution to the processing unit according to the indication of the feedback result in the target communication instruction.
[0099] In an embodiment, the apparatus 900 can further include a notification module configured to, in a case where the communication module determines that the target communication instruction is not executed successfully, notify the processing unit to determine the target communication instruction again.
[0100] In an embodiment, the apparatus 900 can further include a message feedback module configured to, in a case where the communication module determines that the target communication instruction is not executed successfully, feed back a message of successful execution to the processing unit according to the indication of the feedback result in the target communication instruction.
[0101] Corresponding to the application scenario and method of the method provided in the embodiments of the present application, another Internet of Things device communication apparatus is further provided in the embodiments of the present application. The Internet of Things device includes a micro control chip for data processing and at least one AT module for external communication. As shown in Figure 10 The structure block diagram of the Internet of Things device communication apparatus 1000 of another embodiment of the present application is shown. The apparatus 1000 can include:
[0102] The instruction determining module 1001 is configured to determine a target AT instruction matching the AT module when the micro control chip needs to communicate with the Internet of Things platform, and send the target AT instruction to the AT module. The target AT instruction is obtained in advance from the communication metadata corresponding to the AT module. The communication metadata records a plurality of AT instructions, and the AT instruction corresponds to a standard communication operation for communicating with the Internet of Things platform.
[0103] The instruction sending module 1002 is configured to send the target communication instruction to the communication module, so that the communication module communicates with the Internet of Things platform based on the target communication instruction, and realizes data interaction between the processing unit and the Internet of Things platform.
[0104] Corresponding to the application scenarios and methods of the method provided in the embodiments of the present application, the embodiments of the present application further provide a communication device for an Internet of Things device, wherein the Internet of Things device comprises a processing unit and at least one communication module. As shown in Figure 11 The structure block diagram of the communication device 1100 for the Internet of Things device in an embodiment of the present application is shown in the figure, and the device 1100 can comprise:
[0105] The instruction determining module 1101 is configured to determine a target communication instruction matched with the communication module when the processing unit needs to communicate with the Internet of Things platform, wherein the target communication instruction is obtained from the communication metadata corresponding to the communication module in advance, the communication metadata records a plurality of communication instructions, and the communication instructions correspond to standard communication operations for communicating with the Internet of Things platform.
[0106] The instruction sending module 1102 is configured to send the target communication instruction to the communication module, so that the communication module communicates with the Internet of Things platform based on the target communication instruction, and realizes data interaction between the processing unit and the Internet of Things platform.
[0107] The functions of each module in each device in the embodiments of the present application can be referred to the corresponding description in the above method, and have the corresponding beneficial effects, which will not be repeated here.
[0108] Figure 12 The block diagram of the Internet of Things device 1200 for implementing the embodiments of the present application is shown in the figure. As shown in Figure 12 The electronic device 1200 comprises a memory 1201 and a processor 1202, and the memory 1201 stores a computer program which can run on the processor 1202. The processor 1202 executes the computer program to implement the method in the above embodiments. The number of the memory 1201 and the processor 1202 can be one or more. The Internet of Things device further comprises a communication interface 1203 for communicating with external devices and performing data interaction transmission.
[0109] If the memory 1201, the processor 1202 and the communication interface 1203 are implemented independently, the memory 1201, the processor 1202 and the communication interface 1203 can be connected to each other through a bus and complete communication between each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, a Universal Asynchronous Receiver / Transmitter (UART), a Serial Peripheral Interface (SPI), a Secure Digital Input and Output (SDIO) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For convenience of representation, Figure 12 Only one thick line is used in the figure to represent the bus, but it does not mean that there is only one bus or only one type of bus.
[0110] Optionally, in a specific implementation, if the memory 1201, the processor 1202 and the communication interface 1203 are integrated on a chip, the memory 1201, the processor 1202 and the communication interface 1203 can complete communication between each other through an internal interface.
[0111] The embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to implement the method provided in the embodiment of the present application.
[0112] The embodiment of the present application further provides a chip, which includes a processor, is used for calling and running instructions stored in a memory, so that a communication device installed with the chip executes the method provided in the embodiment of the present application.
[0113] The embodiment of the present application further provides a chip, which includes an input interface, an output interface, a processor and a memory, the input interface, the output interface, the processor and the memory are connected through an internal connection path, and the processor is used for executing code in the memory, when the code is executed, the processor is used for executing the method provided in the embodiment of the present application.
[0114] It is to be understood that the above-mentioned processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc. It is to be noted that the processor can be a processor supporting an advanced RISC machine (ARM) architecture.
[0115] Further, the memory can include a read-only memory and a random access memory, optionally. The memory can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. The non-volatile memory can include a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically EPROM (EEPROM), or a flash memory, for example. The volatile memory can include a random access memory (RAM) used as an external cache. Many forms of RAM are available by way of example but not limitation. For example, a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous DRAM (SDRAM), a double data rate SDRAM (DDR SDRAM), an enhanced SDRAM (ESDRAM), a SyncLink DRAM (SLDRAM), and a direct Rambus RAM (DR RAM) can be used.
[0116] In the above-described embodiments, all or part of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded on a computer, all or part of the processes or functions according to the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another computer-readable storage medium.
[0117] In the description of the present specification, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" and the like means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. Also, the specific features, structures, materials or characteristics described can be combined in any appropriate manner in any one or more embodiments or examples. In addition, a person skilled in the art can combine and combine the different embodiments or examples described in the present specification and the features of the different embodiments or examples without contradiction.
[0118] In addition, the terms "first", "second", etc. are used only for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined with "first", "second" can explicitly or implicitly include at least one of the features. In the description of the present application, the meaning of "a plurality of" is two or more, unless otherwise explicitly specified.
[0119] Any process or method described in the flowchart or otherwise described herein can be understood as a representation of code including one or more executable instructions for performing a specific logical function or process. Also, the scope of the preferred embodiments of the present application includes additional implementations that can not be shown or discussed explicitly, including performing functions in a different order, including substantially simultaneously, or in reverse order, according to the functions involved.
[0120] The logic and / or steps described in the flowchart or otherwise described herein, for example, can be considered as a list of executable instructions for implementing the logic function, which can be embodied in any computer-readable medium for use by an instruction execution system, apparatus or device, such as a computer-based system, a system including a processor, or other system that can fetch instructions from the instruction execution system, apparatus or device and execute the instructions, or in conjunction with these instructions execution system, apparatus or device.
[0121] It should be understood that each part of the present application can be realized by hardware, software, firmware or a combination thereof. In the above embodiments, a plurality of steps or methods can be realized by software or firmware stored in a memory and executed by a suitable instruction execution system. All or part of the steps of the above-mentioned embodiment methods can be completed by a program instructing the relevant hardware, which can be stored in a computer readable storage medium and includes one or a combination of the steps of the embodiment methods when executed.
[0122] In addition, each functional unit in each embodiment of the present application can be integrated in one processing module, or each unit can be physically present separately, or two or more units can be integrated in one module. The above-mentioned integrated module can be realized in the form of hardware or in the form of a software functional module. The above-mentioned integrated module, if realized in the form of a software functional module and sold or used as an independent product, can also be stored in a computer readable storage medium. The storage medium can be a read-only memory, a magnetic disk or an optical disk, etc.
[0123] The above is only an exemplary embodiment of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of various changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for communicating with an Internet of Things device, the Internet of Things device comprising a communication driver module, a processing unit, and at least one communication module, the communication module preconfigured with communication metadata, the communication module configured to provide the communication metadata to the communication driver module. The communication module has a corresponding communication instruction format; the method comprises: When the processing unit needs to communicate with the Internet of Things platform, according to the action type of the communication parameter and the communication instruction provided by the processing unit for communicating with the Internet of Things platform, the target communication instruction matched with the communication module is determined by the communication driver module, and the target communication instruction is sent to the communication module; the target communication instruction is obtained by pre-analyzing the communication metadata corresponding to the communication module, the communication metadata records a plurality of communication instructions, and the communication instruction corresponds to a standard communication operation for communicating with the Internet of Things platform; the target communication instruction contains the communication parameter filled in accordance with the communication instruction format; The communication module is called to communicate with the Internet of Things platform based on the target communication instruction, so as to realize the data interaction between the processing unit and the Internet of Things platform.
2. The method of claim 1, wherein, The target communication instruction matched with the communication module is determined, comprising: Determine the standard communication operation for communicating with the Internet of Things platform; According to the correspondence between the predetermined communication instruction and the standard communication operation, the communication instruction corresponding to the standard communication operation is obtained as the target communication instruction.
3. The method of claim 2, wherein, The analysis process of the communication metadata comprises: Obtain the communication metadata corresponding to the communication module, and the communication instruction carries the identifier of the standard communication operation; According to the identifier of the standard communication operation, the corresponding communication instruction is extracted from the communication metadata, and the correspondence between the communication instruction and the standard communication operation is established.
4. The method of claim 1, wherein, The target communication instruction uses a standard defined parameter, and the target communication instruction is sent to the communication module, comprising: Fill in the parameter value corresponding to the parameter in the target communication instruction, and send the target communication instruction filled with the parameter value to the communication module.
5. The method of claim 4, wherein, The communication module is called to communicate with the Internet of Things platform based on the target communication instruction, comprising: Determine the communication content with the Internet of Things platform based on the parameter value in the target communication instruction, and communicate with the Internet of Things platform based on the communication content.
6. The method of claim 1, wherein, Before the Internet of Things device determines the target communication instruction matched with the communication module, the method further comprises: Determine the communication module called this time based on the data communication state of the communication module.
7. The method of claim 1, wherein, The method further comprises: In the case that the communication module determines that the target communication instruction is executed successfully, according to the indication of the feedback result of the target communication instruction, a message of execution success is fed back to the processing unit.
8. A method for communicating with an Internet of Things device, the Internet of Things device comprising a communication driver module, a micro control chip for data processing, and at least one AT module for external communication, the AT module being pre-configured with communication metadata, the AT module being configured to provide the communication metadata to the communication driver module. The AT module has a corresponding communication instruction format; the method comprises: When the micro control chip needs to communicate with the Internet of Things platform, the communication driving module determines a target AT instruction matched with the AT module according to the communication parameter and the action type of the communication instruction provided by the micro control chip, and sends the target AT instruction to the AT module; the target AT instruction is obtained from the communication metadata corresponding to the AT module in advance, a plurality of AT instructions are recorded in the communication metadata, and the AT instructions correspond to standard communication operations for communicating with the Internet of Things platform; the target AT instruction contains the communication parameter filled in accordance with the communication instruction format; The AT module is called to communicate with the Internet of Things platform based on the target AT instruction, so as to realize data interaction between the micro control chip and the Internet of Things platform.
9. A communication method for an Internet of Things device, the Internet of Things device comprising a communication driving module, a processing unit and at least one communication module, the method being applied to the communication driving module, and the method comprising: When the processing unit needs to communicate with the Internet of Things platform, a target communication instruction matched with the communication module is determined according to the communication parameter and the action type of the communication instruction provided by the processing unit, the target communication instruction being obtained from the communication metadata corresponding to the communication module in advance, a plurality of communication instructions being recorded in the communication metadata, and the communication instructions corresponding to standard communication operations for communicating with the Internet of Things platform; the target communication instruction contains the communication parameter filled in accordance with the communication instruction format; The target communication instruction is sent to the communication module, so that the communication module communicates with the Internet of Things platform based on the target communication instruction, and data interaction between the processing unit and the Internet of Things platform is realized.
10. An Internet of Things device comprising a processing unit, at least one communication module, and a communication driver module; the communication module being preconfigured with communication metadata, the communication module being configured to provide the communication metadata to the communication driver module; The communication module has a corresponding communication instruction format; The communication driving module is configured to, when the processing unit needs to communicate with the Internet of Things platform, determine a target communication instruction matched with the communication module according to the communication parameter and the action type of the communication instruction provided by the processing unit, and send the target communication instruction to the communication module, the target communication instruction being obtained from the communication metadata corresponding to the communication module in advance; the target communication instruction contains the communication parameter filled in accordance with the communication instruction format; The communication module is configured to communicate with the Internet of Things platform based on the target communication instruction, so as to realize data interaction between the processing unit and the Internet of Things platform.
11. The apparatus of claim 10, wherein, The communication driving module is arranged in the processing unit.
12. A micro control chip for an Internet of Things device, comprising a processing unit and a communication driving module; The communication driving module is configured to, when the processing unit needs to communicate with the Internet of Things platform, determine a target communication instruction matched with the communication module according to a communication parameter and an action type of a communication instruction provided by the processing unit for communicating with the Internet of Things platform, the target communication instruction being obtained from a communication metadata corresponding to the communication module in advance, the communication metadata recording a plurality of communication instructions corresponding to standard communication operations for communicating with the Internet of Things platform, and the target communication instruction containing the communication parameter filled in accordance with a format of the communication instruction. The communication module is preconfigured with communication metadata, and is configured to provide the communication metadata to the communication driving module; The communication module has a corresponding communication instruction format; The communication driving module is further configured to send the target communication instruction to the communication module, so that the communication module communicates with the Internet of Things platform based on the target communication instruction, and establishes data interaction between the processing unit and the Internet of Things platform. 13.An Internet of Things device, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor implements the method of any one of claims 1-9 when executing the computer program. 14.A computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and the computer program is executed by a processor to implement the method of any one of claims 1-9.
Citation Information
Patent Citations
Instruction processing method and device for module communication, microcontroller and medium
CN113127227A