Message processing method, electronic equipment and computer readable storage medium

By unifying the internal conversion message format and subscription information mechanism, the problem of low message processing efficiency in the Internet of Things gateway system is solved, and more efficient and accurate message transmission is achieved.

CN120499285APending Publication Date: 2025-08-15ZHEJIANG DAHUA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510685287.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-26
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

The message processing efficiency of traditional IoT gateway systems is low, mainly due to the frequent protocol conversion operations between heterogeneous devices, resulting in low message processing efficiency.

Method used

The unified internal conversion message format is adopted, and the message to be transmitted is converted into an internal conversion message through the sending end association module, and the subscription information is accurately sent from the message distribution module to the receiving end association module, and finally converted from the receiving end module to the target conversion message to the receiving end, avoiding multiple protocol conversions.

Benefits of technology

It improves the message processing efficiency and accuracy of the Internet of Things gateway system, shortens the message conversion and transmission time, and ensures that the messages are accurately distributed to the corresponding receiving end.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120499285A_ABST
    Figure CN120499285A_ABST
Patent Text Reader

Abstract

The invention discloses a message processing method, electronic equipment and a computer readable storage medium, which are applied to an Internet of Things gateway system comprising a message distribution module, a plurality of platform plug-in modules and a plurality of destination modules, the platform plug-in modules are associated with a platform, the destination modules are associated with an execution unit, and the execution unit is associated with the platform plug-in modules. The method comprises the following steps: acquiring a to-be-transmitted message sent by a sending end by using a module associated with the sending end, and converting the to-be-transmitted message into an internal conversion message in an Internet of Things gateway system; acquiring subscription information matched with the module associated with the receiving end, and sending the internal conversion message to the module associated with the receiving end by using a message distribution module according to the subscription information; wherein the receiving end is an execution unit when the sending end is a platform, and the receiving end is a platform when the sending end is an execution unit; and converting the internal conversion message into a target conversion message by using a module associated with the receiving end, and sending the target conversion message to the corresponding receiving end. According to the scheme, the message processing efficiency of the Internet of Things gateway system can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of Internet of Things, and in particular to a message processing method, an electronic device, and a computer-readable storage medium. Background Art

[0002] With the rapid development of IoT technology, IoT gateways, as the core hub connecting massive terminal devices with cloud platforms, face a significant impact on the performance of the entire IoT system due to their message processing efficiency and reliability. Traditional IoT gateway systems typically employ a distributed architecture, using multiple protocol conversion modules to achieve communication adaptation between heterogeneous devices. These systems generally employ an "end-to-end" protocol conversion mechanism, requiring each communication link node to independently perform protocol parsing, data format conversion, and content reassembly. This significantly impacts the message processing efficiency of IoT gateway systems. Consequently, improving the message processing efficiency of IoT gateway systems has become a pressing issue. Summary of the Invention

[0003] The main technical problem solved by this application is to provide a message processing method, electronic device and computer-readable storage medium, which can improve the message processing efficiency of the Internet of Things gateway system.

[0004] In order to solve the above technical problems, the first aspect of the present application provides a message processing method, which is applied to an Internet of Things gateway system including a message distribution module, multiple platform plug-in modules and multiple destination modules, wherein the platform plug-in module is associated with the platform, and the destination module is associated with the execution unit. The message processing method includes: using the module associated with the sending end to obtain the message to be transmitted sent by the sending end, and converting the message to be transmitted into an internal conversion message within the Internet of Things gateway system; obtaining the subscription information matching the module associated with the receiving end, and using the message distribution module to send the internal conversion message to the module associated with the receiving end according to the subscription information; wherein, when the sending end is the platform, the receiving end is the execution unit, and when the sending end is the execution unit, the receiving end is the platform, and the subscription information includes a subscription relationship between at least one module associated with the receiving end and the message distribution module; using the module associated with the receiving end to convert the internal conversion message into a target conversion message, and sending the target conversion message to the corresponding receiving end.

[0005] To solve the above technical problems, the second aspect of the present application provides an electronic device, comprising a memory and a processor coupled to each other, wherein the memory stores program instructions, and the processor is used to execute the program instructions to implement the message processing method described in the first aspect above.

[0006] In order to solve the above technical problems, the third aspect of the present application provides a computer-readable storage medium, which stores program instructions that can be executed by a processor, and the program instructions are used to implement the message processing method described in the first aspect above.

[0007] The above scheme uses the module associated with the sending end to obtain the message to be transmitted sent by the sending end, and uses the module associated with the sending end to convert the message to be transmitted into an internal conversion message within the Internet of Things gateway system, obtains the subscription information matched by the module associated with the receiving end, uses the message distribution module to send the internal conversion message to the module associated with the receiving end according to the subscription information, uses the module associated with the receiving end to convert the internal conversion message into a target conversion message, and uses the module associated with the receiving end to send the target conversion message to the corresponding receiving end. By converting the message to be transmitted into a unified internal conversion message within the gateway and transmitting it, multiple conversions of messages between different protocols or formats are avoided, and the time for message conversion and transmission is shortened. Moreover, through the subscription information, the message distribution module can accurately send the internal conversion message to the module associated with the corresponding receiving end, and finally convert the internal conversion message into a target conversion message and send it to the corresponding receiving end, thereby improving the accuracy of message processing and thus improving the message processing efficiency of the Internet of Things gateway system. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without inventive efforts. Among them:

[0009] Figure 1 This is a flow chart of an implementation method of the message processing method of the present application;

[0010] Figure 2 This is a structural diagram of an implementation scheme of the Internet of Things gateway system of the present application;

[0011] Figure 3 This is a structural diagram of another embodiment of the Internet of Things gateway system of the present application;

[0012] Figure 4 This is a schematic structural diagram of an embodiment of the electronic device of the present application;

[0013] Figure 5 It is a structural diagram of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION

[0014] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them, and different implementation methods can be adaptively combined. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0015] The terms "system" and "network" are often used interchangeably in this document. The term "and / or" is simply a description of an association between related objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " generally indicates that the related objects are in an "or" relationship. Furthermore, "multiple" in this document means two or more than two.

[0016] See also Figure 1 and Figure 2 , Figure 1 This is a flow chart of an implementation method of the message processing method of this application. Figure 2 This is a schematic diagram of the structure of an embodiment of the Internet of Things gateway system of the present application. The message processing method is applied to an Internet of Things gateway system including a message distribution module, multiple platform plug-in modules, and multiple destination modules. The platform plug-in modules are associated with the platform, and the destination modules are associated with the execution unit. The method includes:

[0017] S101: Utilize a module associated with a sending end to obtain a message to be transmitted sent by the sending end, and convert the message to be transmitted into an internal conversion message within the Internet of Things gateway system.

[0018] Specifically, the module associated with the sending end is used to obtain the message to be transmitted sent by the sending end, and the module associated with the sending end is used to convert the message to be transmitted into an internal conversion message within the Internet of Things gateway system.

[0019] In one application mode, a module associated with the sending end is used to obtain a message to be transmitted sent by the sending end, confirm the message format corresponding to the message to be transmitted, and use the module associated with the sending end to convert the message to be transmitted into an internal conversion message within the Internet of Things gateway system according to the message format.

[0020] Optionally, the message transmission between multiple modules of the Internet of Things gateway system uniformly uses internal conversion messages, and the internal conversion messages can be transmitted in JSON format. Of course, other formats can also be used for transmission. This application does not impose specific restrictions on this. The message to be transmitted sent by the sender is an Internet of Things message, which can be in any format, such as a binary message, a JSON message, etc. This application does not impose specific restrictions on this.

[0021] In another application mode, the module associated with the sending end is used to obtain the message to be transmitted sent by the sending end, the transmission protocol corresponding to the module associated with the sending end is determined, and the module associated with the sending end is used to convert the message to be transmitted into an internal conversion message within the Internet of Things gateway system according to the transmission protocol.

[0022] S102: Obtain subscription information matching the module associated with the receiving end, and use the message distribution module to send the internal conversion message to the module associated with the receiving end according to the subscription information; wherein, when the sending end is a platform, the receiving end is an execution unit, and when the sending end is an execution unit, the receiving end is a platform, and the subscription information includes a subscription relationship between at least one module associated with the receiving end and the message distribution module.

[0023] Specifically, the subscription information matching the module associated with the receiving end is obtained, wherein the subscription information includes a subscription relationship between at least one module associated with the receiving end and a message distribution module, and the message distribution module is used to send the internal conversion message to the module associated with the receiving end according to the subscription information, and when the sending end is a platform, the receiving end is an execution unit, and when the sending end is an execution unit, the receiving end is a platform.

[0024] It can be understood that when the sending end is a platform, the subscription information includes a subscription relationship between at least one destination module and a message distribution module; when the sending end is an execution unit, the subscription information includes a subscription relationship between at least one platform plug-in module and a message distribution module.

[0025] In one application mode, the subscription information matching the module associated with the receiving end is obtained, the subscription information is stored in the cache, and the corresponding key-value pairs are set for quick query. After receiving the internal conversion message, the message distribution module traverses the entire cache and searches for the matching subscription information one by one through the key-value pairs, and then sends the internal conversion messages one by one to the modules associated with the receiving end according to the subscription information found.

[0026] In some application scenarios, the cache component may be a distributed cache system such as Redis or Memcached, and this application does not impose any specific restrictions on this.

[0027] In another application method, the subscription information matching the module associated with the receiving end is obtained and stored in the message queue middleware. When the message distribution module receives the internal conversion message, the internal conversion message is sent to the module associated with the receiving end at the same time according to all the subscription information stored in the message queue middleware.

[0028] In some application scenarios, the message queue middleware can be RabbitMQ, Kafka, etc., and this application does not impose specific restrictions on this.

[0029] In an application scenario, the subscription information is generated based on the message type of the message to be transmitted and the execution unit information corresponding to the execution unit.

[0030] In a specific application scenario, the format of the subscription information is topic: / productID / deviceName / service, indicating that the execution unit has subscribed to the service message. The format of the subscription information can also be topic: / productID / deviceName / event, indicating that the event message of the execution unit is subscribed. In other application scenarios, the format of the subscription information can be flexibly set as needed, and this application does not impose specific restrictions on this.

[0031] S103: Utilize the module associated with the receiving end to convert the internal conversion message into a target conversion message, and send the target conversion message to the corresponding receiving end.

[0032] Specifically, the internal conversion message is converted into a target conversion message by using a module associated with the receiving end, and the target conversion message is sent to the corresponding receiving end by using a module associated with the receiving end.

[0033] In one application mode, the module associated with the receiving end is used to convert the internal conversion message into the target conversion message according to the corresponding message format, and the module associated with the receiving end is used to send the target conversion message to the corresponding receiving end.

[0034] In another application mode, the module associated with the receiving end is used to convert the internal conversion message into a target conversion message according to a corresponding transmission protocol, and the module associated with the receiving end is used to send the target conversion message to the corresponding receiving end.

[0035] It should be noted that both the platform plug-in module and the destination module in the IoT gateway system have the function of converting the message to be transmitted and the internal conversion message, as well as the internal conversion message and the target conversion message.

[0036] The above scheme uses the module associated with the sending end to obtain the message to be transmitted sent by the sending end, and uses the module associated with the sending end to convert the message to be transmitted into an internal conversion message within the Internet of Things gateway system, obtains the subscription information matched by the module associated with the receiving end, uses the message distribution module to send the internal conversion message to the module associated with the receiving end according to the subscription information, uses the module associated with the receiving end to convert the internal conversion message into a target conversion message, and uses the module associated with the receiving end to send the target conversion message to the corresponding receiving end. By converting the message to be transmitted into a unified internal conversion message within the gateway and transmitting it, multiple conversions of messages between different protocols or formats are avoided, and the time for message conversion and transmission is shortened. Moreover, through the subscription information, the message distribution module can accurately send the internal conversion message to the module associated with the corresponding receiving end, and finally convert the internal conversion message into a target conversion message and send it to the corresponding receiving end, thereby improving the accuracy of message processing and thus improving the message processing efficiency of the Internet of Things gateway system.

[0037] In one embodiment, please continue to refer to Figure 2 The Internet of Things gateway system also includes a plug-in management module, and before step S101, it also includes: using the plug-in management module to load multiple platform plug-in modules and multiple target modules.

[0038] Specifically, after the Internet of Things gateway system is initialized and started, a plug-in management module is used to load multiple platform plug-in modules and multiple target modules.

[0039] In one implementation scenario, after the IoT gateway system is initialized and started, a call instruction is sent to the plug-in management module. After receiving the call instruction, the plug-in management module reads the configuration files corresponding to the platform plug-in module and the target module to be called, thereby loading multiple platform plug-in modules and multiple target modules according to the configuration files.

[0040] Optionally, after the platform plug-in module is loaded, the platform plug-in module will obtain the required parameters from the plug-in management module to complete initialization and connect to the platform. After the target module is loaded, the target module will obtain the required parameters from the plug-in management module to complete initialization and dynamically connect to the execution unit.

[0041] It is understandable that through the platform plug-in module, the IoT gateway system can connect to multiple platforms at the same time, including cloud platforms and private platforms.

[0042] In one embodiment, see Figure 3 , Figure 3This is a schematic diagram of the structure of another embodiment of the IoT gateway system of the present application. The destination module includes a gateway object model module and a sub-device plug-in module. When the destination module is the gateway object model module, the execution unit includes a gateway internal module associated with the gateway object model module. When the destination module is a sub-device plug-in module, the execution unit includes a sub-device associated with the sub-device plug-in module.

[0043] Specifically, when the target module is a gateway object model module, the execution unit is a gateway internal module associated with the gateway object model module; when the target module is a sub-device plug-in module, the execution unit is a sub-device associated with the sub-device plug-in module.

[0044] Optionally, when the destination module is a sub-device plug-in module, sub-devices of the same type can be connected to the sub-device plug-in module, and the number is not limited.

[0045] It should be noted that there are many types of internal modules in the gateway, different types correspond to different functions, and are also included in the IoT gateway system.

[0046] It can be understood that through the plug-in mechanism, the IoT gateway system appears as a loosely coupled, modular plug-in, and each plug-in has its own specific capabilities and can work independently without interfering with each other. In addition, both the platform plug-in module and the sub-device plug-in module have implemented a plug-in mechanism, allowing the IoT gateway system to dynamically load the platform plug-in module and the sub-device plug-in module, thereby increasing the system's corresponding platform access capabilities and sub-device access capabilities.

[0047] In one implementation scenario, the sub-device corresponds to a device identifier. When the sending end is a platform, the receiving end is an execution unit, the destination module is a sub-device plug-in module, and the execution unit is a sub-device, step S103 specifically includes: using the sub-device plug-in module to convert the internal conversion message into a target conversion message, and sending the target conversion message to the corresponding gateway internal module.

[0048] Specifically, since each sub-device has a unique device identifier, after the internal conversion message is converted into a target conversion message using the sub-device plug-in module, the target conversion message is sent to the corresponding sub-device according to the unique device identifier, so that the target conversion message can be accurately sent to the corresponding sub-device, thereby improving the accuracy and reliability of message transmission of the Internet of Things gateway system. Moreover, when the sub-device plug-in of the Internet of Things gateway system is connected to a large number of sub-devices, the target conversion message is sent to the corresponding sub-device through the unique identifier, which can avoid each sub-device from processing the message, saving the computing resources and processing time of the sub-device, thereby improving the message processing efficiency of the entire Internet of Things gateway system.

[0049] In another implementation scenario, when the sending end is a platform, the receiving end is an execution unit, the destination module is a gateway object model module, and the execution unit is a gateway internal module, step S103 specifically includes: using the gateway object model module to convert the internal conversion message into a target conversion message, and sending the target conversion message to the corresponding gateway internal module.

[0050] Specifically, after the gateway object model module receives the internal conversion message sent by the message distribution module, it converts the internal conversion message into a target conversion message, and parses the target conversion message and sends it to the corresponding gateway internal module. By parsing and converting the internal conversion message, unnecessary redundant information can be removed, key data can be extracted, and the amount of data transmission can be reduced, thereby improving the message processing efficiency of the entire Internet of Things gateway system.

[0051] In one embodiment, when the sending end is a platform and the receiving end is an execution unit, the target conversion message corresponds to an execution result after being executed by the execution unit. After step S103, it also includes: using the target module to obtain the execution result sent by the execution unit, converting the execution result into a result conversion message and sending it to the message distribution module; using the message distribution module to send the result conversion message to the module associated with the corresponding sending end; using the module associated with the corresponding sending end to convert the result conversion message into a result message, and sending the result message to the corresponding sending end.

[0052] Specifically, when the sending end is the platform and the receiving end is the execution unit, after receiving the target conversion message, the execution unit calls the corresponding functional module to execute the target conversion message and obtains the corresponding execution result. The destination module associated with the execution unit is used to obtain the execution result sent by the execution unit, and the execution result is converted into a result conversion message and sent to the message distribution module. The message distribution module is used to send the result conversion message to the corresponding module associated with the sending end, and the result conversion message is converted into a result message and then sent to the platform using the module associated with the corresponding sending end. This can ensure that the execution result can be fed back to the platform in a timely and accurate manner, so that the platform can perform corresponding processing or adjustments based on the execution result.

[0053] In one implementation scenario, before the step of using the destination module to obtain the execution result sent by the execution unit, converting the execution result into a result conversion message and then sending it to the message distribution module, it also includes: obtaining the event message generated by the execution unit; wherein the event message is obtained by the event conversion triggered by the execution unit when executing the target conversion message; and using the execution unit to send the event message to the destination module.

[0054] Specifically, in the process of the execution unit executing the received target conversion message, a specific event report may be triggered. At this time, the execution unit will generate a corresponding event message and use the execution unit to send the event message to the destination module. Through the event reporting mechanism, the platform can understand the execution status of the execution unit in real time, and when the execution unit encounters an error or abnormal situation, the platform can determine the cause of the failure of the execution unit in the first time, thereby further improving the reliability of the entire Internet of Things gateway system.

[0055] In a specific implementation scenario, the platform issues an upgrade request. After the platform plug-in module associated with the platform receives the message to be transmitted corresponding to the upgrade request, it converts it into an internal conversion message and sends it to the message distribution module. The message distribution module sends the internal conversion message to the matching destination module based on the subscription information. When the destination module is a sub-device plug-in module, the sub-device plug-in module converts the internal conversion message into a target conversion message and sends it to the corresponding sub-device based on the device identifier. The sub-device executes the target conversion message to obtain an execution result, such as a successful upgrade. The execution result corresponding to the upgrade success is converted into a result conversion message and sent to the message distribution module. The message distribution module sends the result conversion message to the corresponding platform plug-in module. After receiving the result conversion message, the platform plug-in module converts the result conversion message into a result message and feeds it back to the platform. In addition, during the sub-device's execution of the target conversion message, an upgrade progress event is triggered. At this time, the sub-device generates an event message corresponding to the upgrade progress event and sends it to the corresponding sub-device plug-in module. The sub-device plug-in module also sends the event message to the message distribution module and ultimately feeds it back to the platform.

[0056] In another specific implementation scenario, the platform issues an upgrade request. After the platform plug-in module associated with the platform receives the message to be transmitted corresponding to the upgrade request, it converts it into an internal conversion message and sends it to the message distribution module. The message distribution module sends the internal conversion message to the matching destination module according to the subscription information. When the destination module is a gateway object model module, the gateway object model module converts the internal conversion message into a target conversion message and then sends the target conversion message to the corresponding gateway internal module, such as the upgrade function module. By calling the upgrade function module, the internal function upgrade of the gateway is performed, and an execution result is obtained, such as a successful upgrade. The execution result corresponding to the successful upgrade is converted into a result conversion message and then sent to the message distribution module. The message distribution module sends the result conversion message to the corresponding platform plug-in module. After receiving the result conversion message, the platform plug-in module converts the result conversion message into a result message and feeds it back to the platform. In addition, during the process of the upgrade function module executing the target conversion message, an upgrade progress event will be triggered. At this time, the upgrade function module will generate an event message corresponding to the upgrade progress event and send it to the corresponding gateway object model module. The gateway object model module will also send the event message to the message distribution module and finally feed it back to the platform.

[0057] In one implementation scenario, when the sending end is an execution unit and the receiving end is a platform, after step S101, it also includes: using the message distribution module to obtain the internal conversion message; in response to the fact that there is no subscription relationship between the platform plug-in module and the message distribution module, using the message distribution module to discard the internal conversion message.

[0058] Specifically, when there is no subscription relationship between the platform plug-in module and the message distribution module, the message distribution module is used to discard the internal conversion message to avoid processing invalid messages, maintain the orderly operation of the system, and prevent chain reactions caused by message backlogs, thereby ensuring the stability and reliability of the Internet of Things gateway system.

[0059] In a specific implementation scenario, a specific event trigger is generated by a sub-device or a gateway internal module. For example, the temperature and humidity sensor device detects that the temperature is too high, or the scheduled task set by the gateway internal module detects that the current time is rest time, etc., a corresponding message to be transmitted will be generated. The sub-device will send it to the sub-device plug-in module, and the gateway internal module will send it to the gateway object model module. After receiving the message to be transmitted, the sub-device plug-in module or the gateway internal module converts it into an internal conversion message and sends it to the message distribution module. When there is a subscription relationship between the platform plug-in module and the message distribution module, the message distribution module sends the internal conversion message to the corresponding platform plug-in module according to the subscription information. The platform plug-in module converts the internal conversion message into a target conversion message and sends it to the corresponding platform. When there is no subscription relationship between the platform plug-in module and the message distribution module, the message distribution module will discard the internal conversion message.

[0060] See also Figure 4 , Figure 4 This is a schematic diagram of the structure of an embodiment of an electronic device of the present application. The electronic device 40 includes a memory 400 and a processor 402 coupled to each other, wherein the memory 400 stores program data (not shown in the figure), and the processor 402 calls the program data to implement the method in any of the above embodiments. For a description of the relevant content, please refer to the detailed description of the above method embodiments, which will not be repeated here. Specifically, the electronic device 40 includes but is not limited to: a desktop computer, a laptop computer, a tablet computer, a server, etc., which are not limited here. In addition, the processor 402 can also be referred to as a CPU (Center Processing Unit). The processor 402 may be an integrated circuit chip with signal processing capabilities. The processor 402 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. In addition, the processor 402 can be implemented by an integrated circuit chip.

[0061] See also Figure 5 , Figure 5 This is a structural diagram of an embodiment of a computer-readable storage medium of the present application. The computer-readable storage medium 50 stores program data 500. When the program data 500 is executed by the processor, the method in any of the above embodiments is implemented. For an explanation of the relevant content, please refer to the detailed description of the above method embodiments, which will not be repeated here.

[0062] It should be noted that the units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of this embodiment.

[0063] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0064] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the various implementation methods of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0065] The above description is only an implementation method of the present application and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the description and drawings of this application, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A message processing method, characterized in that: Applied to an Internet of Things gateway system including a message distribution module, multiple platform plug-in modules, and multiple destination modules, the platform plug-in module is associated with the platform, the destination module is associated with the execution unit, and the message processing method includes: Utilize the module associated with the sending end to obtain the message to be transmitted sent by the sending end, and convert the message to be transmitted into an internal conversion message within the Internet of Things gateway system; Obtaining subscription information matching a module associated with the receiving end, and using the message distribution module to send the internal conversion message to the module associated with the receiving end according to the subscription information; wherein, when the sending end is a platform, the receiving end is an execution unit, and when the sending end is an execution unit, the receiving end is a platform, and the subscription information includes a subscription relationship between at least one module associated with the receiving end and the message distribution module; The internal conversion message is converted into a target conversion message by using a module associated with the receiving end, and the target conversion message is sent to the corresponding receiving end.

2. The message processing method according to claim 1, wherein: The Internet of Things gateway system also includes a plug-in management module; Before the module associated with the sending end is used to obtain the message to be transmitted sent by the sending end and convert the message to be transmitted into an internal conversion message within the Internet of Things gateway system, the method further includes: The plug-in management module is utilized to load a plurality of the platform plug-in modules and a plurality of the target modules.

3. The message processing method according to claim 1, wherein: When the sending end is a platform and the receiving end is an execution unit, the target conversion message is executed by the execution unit and an execution result is generated accordingly; After the module associated with the receiving end is used to convert the internal conversion message into a target conversion message and the target conversion message is sent to the corresponding receiving end, the method further includes: Utilizing the destination module to obtain the execution result sent by the execution unit, converting the execution result into a result conversion message and then sending it to the message distribution module; Using the message distribution module to send the result conversion message to the module associated with the corresponding sending end; The result conversion message is converted into a result message by using a module associated with the corresponding sending end, and the result message is sent to the corresponding sending end.

4. The message processing method according to claim 3, wherein: Before the method of using the destination module to obtain the execution result sent by the execution unit, converting the execution result into a result conversion message and sending the result to the message distribution module, the method further includes: Acquire an event message generated by the execution unit; wherein the event message is obtained by event conversion triggered by the execution unit when executing the target conversion message; The event message is sent to the destination module by using the execution unit.

5. The message processing method according to claim 1, wherein: The destination module includes a gateway object model module and a sub-device plug-in module; wherein, when the destination module is the gateway object model module, the execution unit includes a gateway internal module associated with the gateway object model module, and when the destination module is the sub-device plug-in module, the execution unit includes a sub-device associated with the sub-device plug-in module.

6. The message processing method according to claim 5, characterized in that: The sub-device corresponds to a device identifier, when the sending end is a platform, the receiving end is an execution unit, the destination module is a plug-in module of the sub-device, and the execution unit is the sub-device; The method of converting the internal conversion message into a target conversion message by using a module associated with the receiving end, and sending the target conversion message to the corresponding receiving end, comprises: The internal conversion message is converted into a target conversion message by using the sub-device plug-in module, and the target conversion message is sent to the corresponding sub-device based on the device identifier.

7. The message processing method according to claim 5, characterized in that: When the sending end is a platform, the receiving end is an execution unit, the destination module is the gateway object model module, and the execution unit is an internal module of the gateway; The method of converting the internal conversion message into a target conversion message by using a module associated with the receiving end, and sending the target conversion message to the corresponding receiving end, comprises: The internal conversion message is converted into a target conversion message by using the gateway object model module, and the target conversion message is sent to the corresponding gateway internal module.

8. The message processing method according to claim 1, wherein: When the sending end is an execution unit and the receiving end is a platform, after the module associated with the sending end is used to obtain the message to be transmitted sent by the sending end and convert the message to be transmitted into an internal conversion message within the Internet of Things gateway system, the method further includes: Obtaining the internal conversion message using the message distribution module; In response to the platform plug-in module and the message distribution module not having the subscription relationship, the message distribution module is used to discard the internal conversion message.

9. An electronic device, characterized in that: The method comprises a memory and a processor coupled to each other, wherein the memory stores program instructions, and the processor is used to execute the program instructions to implement the message processing method according to claims 1-8.

10. A computer-readable storage medium, characterized in that Program instructions that can be executed by a processor are stored, and the program instructions are used to implement the message processing method according to any one of claims 1 to 8.