Message format conversion method and device based on plug-in, gateway equipment and medium

Through the plug-in-based message format conversion method, the problem of mismatch between different devices is solved, flexible conversion and effective management of message formats between devices is realized, and the scalability and stability of the system is improved.

CN119629233APending Publication Date: 2025-03-14深圳开鸿数字产业发展有限公司

Patent Information

Application Number
CN202411576415.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-06
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

Message format mismatch between different devices leads to complex and difficult interoperability between devices and data exchange.

Method used

The plug-in-based message format conversion method is adopted, by obtaining plug-in information corresponding to the controlled device, analyzing the plug-in information to obtain message conversion rules, receiving operation instructions, and format conversion according to the conversion rules of the target device, so that the target device can execute operation instructions.

Benefits of technology

The communication complexity between devices caused by different message formats is optimized, flexible conversion and effective management of message formats between devices is realized, and the scalability and stability of the system is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119629233A_ABST
    Figure CN119629233A_ABST
Patent Text Reader

Abstract

The invention discloses a message format conversion method and device based on a plug-in, gateway equipment and a medium, and the method comprises the steps: obtaining plug-in information, carrying out the analysis of the plug-in information, obtaining a message conversion rule corresponding to the plug-in information, and enabling the plug-in information to correspond to controlled equipment; receiving an operation instruction, determining a target device corresponding to the operation instruction, and determining a target conversion rule corresponding to the target device; and performing format conversion on the operation instruction based on the target conversion rule, so that the target equipment executes the operation instruction. According to the invention, flexible conversion and effective management of message formats between devices are realized, and the expandability and stability of the system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of message processing, and in particular to a plug-in-based message format conversion method, device, gateway equipment and medium. Background Art

[0002] In the modern era of device interconnection, communication and data exchange between different devices are becoming more and more common, thanks to the rapid development of information technology and the widespread application of the Internet of Things. However, due to the various message formats between different devices, if the sent message does not match the message format of the device, the interoperability and data exchange between devices will become complicated and difficult, and data interoperability and compatibility have become a huge challenge.

[0003] Therefore, the prior art still needs to be improved and enhanced. Summary of the invention

[0004] The technical problem to be solved by the present invention is that, in view of the above-mentioned defects of the prior art, a plug-in-based message format conversion method, device, gateway device and medium are provided to solve the problem of message format mismatch and data exchange difficulty between devices caused by different message formats between different devices in the prior art.

[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is as follows:

[0006] In a first aspect, the present invention provides a plug-in-based message format conversion method, wherein the method comprises:

[0007] Acquire plug-in information, parse the plug-in information, and obtain a message conversion rule corresponding to the plug-in information, wherein the plug-in information corresponds to the controlled device;

[0008] Receive an operation instruction, determine a target device corresponding to the operation instruction, and determine a target conversion rule corresponding to the target device;

[0009] The operation instruction is formatted based on the target conversion rule so that the target device executes the operation instruction.

[0010] In one implementation, before obtaining the plug-in information, the method further includes:

[0011] The device information of the controlled device is obtained, the corresponding plug-in information is configured based on the device information, and the plug-in information is stored in the cloud, wherein there is at least one controlled device.

[0012] In one implementation, obtaining the plug-in information includes:

[0013] Obtain a plug-in download address, and download the plug-in information from the cloud based on the plug-in download address.

[0014] In one implementation, before obtaining the plug-in information, the method further includes:

[0015] Establish a communication connection with the controlled device in advance.

[0016] In one implementation, the receiving the operation instruction and determining the target device corresponding to the operation instruction includes:

[0017] Parsing the operation instruction to determine the character string information carried in the operation instruction;

[0018] Based on the string information, determining a device model corresponding to the string information;

[0019] Based on the device model, the target device is determined.

[0020] In one implementation, converting the format of the operation instruction based on the target conversion rule so that the target device executes the operation instruction includes:

[0021] Based on the target conversion rule, converting the format of the operation instruction into a target format to obtain an operation instruction after format conversion;

[0022] The operation instruction is format-converted based on the target conversion rule so that the target device executes the operation instruction and transmits it to the target device so that the target device executes the operation instruction after the format conversion.

[0023] In one implementation, the method further includes:

[0024] If there is a newly added controlled device, obtain device information corresponding to the newly added controlled device, and determine whether the device information of the newly added controlled device is applicable to the plug-in information;

[0025] If the device information of the newly added controlled device is not applicable to the plug-in information, a new plug-in is set based on the device information of the newly added controlled device, and the new plug-in is uploaded to the cloud.

[0026] In a second aspect, the present invention provides a plug-in-based message format conversion device, wherein the device comprises:

[0027] A plug-in parsing module, used to obtain plug-in information, parse the plug-in information, and obtain a message conversion rule corresponding to the plug-in information, wherein the plug-in information corresponds to a controlled device;

[0028] A conversion rule determination module, used to receive an operation instruction, determine a target device corresponding to the operation instruction, and determine a target conversion rule corresponding to the target device;

[0029] The message format conversion module is used to convert the format of the operation instruction based on the target conversion rule so that the target device executes the operation instruction.

[0030] In a third aspect, an embodiment of the present invention further provides a gateway device, wherein the gateway device includes a memory, a processor, and a plug-in-based message format conversion program stored in the memory and executable on the processor, and when the processor executes the plug-in-based message format conversion program, the steps of the plug-in-based message format conversion method of any one of the above-mentioned schemes are implemented.

[0031] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein a plug-in-based message format conversion program is stored on the computer-readable storage medium, and when the plug-in-based message format conversion program is executed by a processor, the steps of the plug-in-based message format conversion method described in any one of the above-mentioned schemes are implemented.

[0032] Beneficial effect: Compared with the prior art, the present invention provides a plug-in-based message format conversion method. The method of the present invention first obtains plug-in information, parses the plug-in information, and obtains the message conversion rules corresponding to the plug-in information, wherein the plug-in information corresponds to the controlled device. Next, an operation instruction is received, the target device corresponding to the operation instruction is determined, and the target conversion rule corresponding to the target device is determined. Finally, the operation instruction is formatted based on the target conversion rule so that the target device executes the operation instruction. In this way, the present invention optimizes the complexity of communication between devices caused by different message formats, realizes flexible conversion and effective management of message formats between devices, and improves the scalability and stability of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 A flowchart of a specific implementation of a plug-in-based message format conversion method provided in an embodiment of the present invention.

[0034] Figure 2 A schematic diagram of an application scenario of a plug-in-based message format conversion method provided in an embodiment of the present invention.

[0035] Figure 3 A schematic diagram of a channel flow of a plug-in-based message format conversion method provided in an embodiment of the present invention.

[0036] Figure 4 A flowchart of receiving an operation instruction and determining a target device corresponding to the operation instruction provided by an embodiment of the present invention.

[0037] Figure 5 A flowchart of converting the format of the operation instruction based on the target conversion rule and enabling the target device to execute the operation instruction is provided in an embodiment of the present invention.

[0038] Figure 6 It is a principle block diagram of a plug-in-based message format conversion device provided in an embodiment of the present invention.

[0039] Figure 7 It is a block diagram of the internal structure principle of the intelligent terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0040] In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0041] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations or steps, nor must they be executed in the order described. For example, some operations or steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.

[0042] It should be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0043] It should be understood that, in order to clearly describe the technical solutions of the embodiments of the present invention, in the embodiments of the present invention, words such as "first" and "second" are used to distinguish between identical or similar items with substantially identical functions and effects. For example, the first control information and the second control information are only used to distinguish different control information, and their order is not limited.

[0044] Those skilled in the art can understand that the words "first", "second", etc. do not limit the quantity and execution order, and the words "first", "second", etc. do not necessarily limit the differences.

[0045] It should be further understood that the term “and / or” used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0046] In the prior art, communication and data exchange between different devices have become more and more common, thanks to the rapid development of information technology and the widespread application of the Internet of Things. However, due to the various message formats between different devices, if the sent message does not match the message format of the device, the interoperability and data exchange between devices will become complicated and difficult. Specifically, different device manufacturers may use different communication protocols, data encoding methods, and message structures. For example, one device may use one encoding format to transmit data, while another device may use another encoding format. In addition, even if both devices use the same encoding format, they may have differences in field naming, data types, and message structures. Mismatched message formats may result in data parsing errors, information loss, or communication failures between devices. This will not only reduce the overall performance and reliability of the system, but may also have a negative impact on the user's experience. For example, in a smart home system, if smart bulbs manufactured by multiple manufacturers are used at the same time, and the control instructions from the gateway device cannot be correctly parsed due to mismatched message formats, then users cannot use the device to uniformly control the switch and brightness of the bulbs.

[0047] In order to solve the above problems, this embodiment provides a plug-in-based message format conversion method. In specific implementation, this embodiment first obtains the plug-in information corresponding to the controlled device, parses the plug-in information, and obtains the message conversion rule corresponding to the plug-in information. Then, receive the operation instruction, determine the target device corresponding to the operation instruction, and determine the target conversion rule corresponding to the target device. Finally, the operation instruction is formatted based on the target conversion rule so that the target device executes the operation instruction. It can be seen that the present invention optimizes the complexity of communication between devices caused by different message formats, realizes flexible conversion and effective management of message formats between devices, and improves the scalability and stability of the system.

[0048] For example, Figure 2 As shown in FIG. 1 , when a user needs to use a gateway device to control devices produced by several device manufacturers at the same time, such as smart light bulbs, and the device message formats do not match each other. At this time, the method proposed in the present invention can solve the problem of unified management of the above devices. Specifically, Figure 3As shown, first, for the devices that need to be uniformly controlled and managed, corresponding adapted plug-ins are made and stored in the cloud, which can be a cloud server. Ensure that a connection has been established between the gateway device and the controlled device, and that a connection has been established between the gateway device and the cloud. On this basis, according to the controlled device connected to the gateway device, the cloud sends the corresponding plug-in to the gateway device. The gateway device parses the obtained plug-in to obtain the message conversion rule corresponding to the controlled device. When the user sends a unified control command to the gateway device through the cloud, the gateway device obtains control commands in different message formats according to the message conversion rules, and distributes them to each controlled device. Finally, the controlled device executes the control task according to the control command in the adapted message format. In this way, the technical effect of realizing flexible conversion of message formats between devices and unified and effective management of devices is achieved.

[0049] Exemplary Methods

[0050] The present embodiment provides a plug-in-based message format conversion method, which can be applied to intelligent terminal control systems, such as Figure 1 As shown in , the specific steps include:

[0051] Step S100: Obtain plug-in information, parse the plug-in information, and obtain a message conversion rule corresponding to the plug-in information, wherein the plug-in information corresponds to a controlled device.

[0052] In this embodiment, the controlled device refers to an IoT device, such as a smart light bulb, a smart switch, etc. The plug-in can be a software module installed on the gateway device, or a configuration and script file. The software module can be an independent code package, a dynamic link library, or a shared object, etc. The configuration and script file can be a configuration file or a script file. The plug-in is used to provide a corresponding list of controlled device message formats and controlled device information. Specifically, the corresponding list can be in the form of a configuration file, a data table, or a database. The corresponding list includes the message conversion rules of the corresponding controlled device, and the message conversion rules include at least one efficient message format conversion algorithm, such as a hash algorithm, etc. The corresponding list also includes the relationship between different message types and field mappings. Further, the plug-in can be installed in the gateway device, and can also perform functions such as upgrading, uninstalling, version management, and compatibility checking. Therefore, through the plug-in, the gateway device can convert the user's original message into a control message that can be recognized by the controlled device, thereby realizing unified control of several controlled devices with different message formats.

[0053] In one implementation, before obtaining the plug-in information, device information of the controlled device is obtained, the corresponding plug-in information is configured based on the device information, and the plug-in information is stored in the cloud, wherein there is at least one controlled device.

[0054] In this embodiment, the cloud can be used to provide users with an interface for controlling multiple controlled devices, so that users can issue control commands through the interface to achieve unified control of all controlled devices; it can also be used to provide developers with a unified storage and management platform for plug-ins of controlled devices. Developers develop corresponding message conversion plug-ins according to the message formats of different manufacturers and different types of controlled devices, and upload them to the cloud. Specifically, the cloud stores plug-in information and controlled device information, wherein the controlled device information is used to uniquely identify the product information of the controlled device itself, and the plug-in information corresponding to the controlled device information identifies the relevant information of the controlled device corresponding to the plug-in. Furthermore, the cloud can also store plug-in development tools and documents to help developers quickly develop and test message format conversion plug-ins, thereby improving the efficiency and quality of developers. In the specific implementation process, such as Figure 3 As shown in step 1, the developer creates plug-in A, plug-in B, and plug-in C adapted for devices such as lamp 1 of manufacturer A, lamp 2 of manufacturer B, and lamp 3 of manufacturer C, and stores them on the cloud.

[0055] In one implementation, before obtaining the plug-in information, a communication connection with the controlled device is pre-established.

[0056] In this embodiment, the controlled device and the gateway device need to maintain a communication connection, otherwise the user instructions cannot be distributed to each controlled device through the gateway device. Specifically, the communication connection includes a wired connection and a wireless connection. Furthermore, the controlled device needs to have the conditions to establish a communication connection with the gateway device. As mentioned above, the controlled device needs to be able to at least have a wired connection or a wireless connection with the gateway device. If the controlled device is a device that cannot connect to the Internet, the unified control of this embodiment cannot be achieved. Correspondingly, the gateway device needs to have the conditions to establish a connection with the cloud. Specifically, the gateway device needs to obtain relevant plug-ins from the cloud before it can be used to achieve unified management of the controlled devices. In the specific implementation process, such as Figure 3 As shown in steps 2 and 3, the gateway device establishes connections with the devices of manufacturer A lamp 1, manufacturer B lamp 2, and manufacturer C lamp 3, ensuring that the gateway device and these smart lighting devices are in a communicative state. Similarly, the gateway device also establishes a connection with the cloud, ensuring that the gateway device and the cloud are in a communicative state.

[0057] In one implementation, the obtaining the plug-in information includes: obtaining a plug-in download address, and downloading the plug-in information from the cloud based on the plug-in download address.

[0058] In this embodiment, the gateway device obtains the plug-in from the cloud by downloading. In other implementations, the gateway device may also obtain the plug-in offline, such as hard disk copying. However, the offline acquisition method has a lag and is complicated to operate. In contrast, the method of downloading the plug-in from the cloud has higher real-time performance, stronger maintainability, and simpler operation. In the specific implementation process, Figure 3 As shown in step 4, the gateway device obtains plug-in A, plug-in B, and plug-in C by downloading from the cloud.

[0059] Step S200: receiving an operation instruction, determining a target device corresponding to the operation instruction, and determining a target conversion rule corresponding to the target device.

[0060] The user sends an operation instruction to the cloud, and the cloud sends the operation instruction to the gateway device. When the gateway device receives the operation instruction, it parses the operation instruction, confirms the controlled device to be controlled by the operation instruction, that is, the corresponding target device, and obtains the conversion rules of the message format corresponding to the target device through the corresponding list of the plug-in based on the device information of the target device. In this way, the gateway device has the ability to convert the original instruction issued by the user into a message format recognizable by the target device.

[0061] Specifically, Figure 4 As shown in , step S200 specifically includes the following steps:

[0062] Step S201, parsing the operation instruction to determine the character string information carried in the operation instruction;

[0063] Step S202: based on the string information, determine the device model corresponding to the string information;

[0064] Step S203: Determine the target device based on the device model.

[0065] During specific implementation, in this embodiment, after the user sends an operation instruction to the cloud, the gateway device will obtain the user's original operation instruction issued by the cloud. The operation instruction contains at least one string of character string information. The character string information at least contains the device model of the target device that the user needs to control. Furthermore, the at least one string of character string information may also include basic information such as device type and device manufacturer for matching and obtaining corresponding message format conversion rules in the plug-in. The gateway device obtains the target conversion rules corresponding to the target device of the device model based on the corresponding relationship recorded in the plug-in through the obtained device model. The target conversion rules can be used to convert the user's original operation instructions into operation instructions that can be recognized and used by the target device. In the specific implementation process, such as Figure 3 As shown in step 5, the gateway device parses the obtained plug-in to obtain the message conversion rules corresponding to the lamp 1 of manufacturer A, the lamp 2 of manufacturer B, and the lamp 3 of manufacturer C.

[0066] Step S300: convert the format of the operation instruction based on the target conversion rule so that the target device executes the operation instruction.

[0067] After the gateway device obtains the original user operation instruction sent from the cloud and obtains the target conversion rule corresponding to the target device, the gateway device converts the format of the original operation instruction based on the target conversion rule to obtain the target operation instruction after format conversion. Then, the gateway device distributes the converted target operation instruction to at least one target device. The target device responds to the converted target operation instruction.

[0068] Specifically, Figure 5 As shown in , step S300 specifically includes the following steps:

[0069] Step S301: based on the target conversion rule, convert the format of the operation instruction into a target format to obtain the operation instruction after the format conversion;

[0070] Step S302: converting the format of the operation instruction based on the target conversion rule so that the target device executes the operation instruction and transmitting the operation instruction to the target device so that the target device executes the operation instruction after the format conversion;

[0071] In specific implementation, when the gateway device of this embodiment obtains the original operation instructions of the user sent from the cloud, such as operation instructions for turning on and off the lights, adjusting the brightness, etc. for smart lamps, after obtaining the target conversion rules corresponding to the target device through the above method, the original operation instructions for the smart lamps are formatted based on the target conversion rules provided by the plug-in to obtain the target operation instructions after format conversion. Then, the gateway device distributes the converted target operation instructions to at least one smart lamp device. The smart lamp device performs operations such as turning on and off the lights, adjusting the brightness, etc. according to the converted target operation instructions. In the specific implementation process, Figure 3 As shown in steps 6 to 9, the user sends a light-on command to the cloud, and the cloud forwards the user's original light-on message command to the gateway device. The gateway device converts the original light-on message command into light-on message format 1, light-on message format 2, and light-on message format 3 that can be recognized by the corresponding lamps according to the message format conversion rules corresponding to lamp 1 of manufacturer A, lamp 2 of manufacturer B, and lamp 3 of manufacturer C. Then, the gateway device distributes the converted light-on message command to lamp 1 of manufacturer A, lamp 2 of manufacturer B, and lamp 3 of manufacturer C, and the above lamps perform the light-on operation according to the command, realizing the unified control of multiple devices by the user.

[0072] In another implementation, the method further includes: introducing a message format verification and validation mechanism to ensure the correctness and integrity of the message during the conversion process and to prevent data loss or damage due to message format errors.

[0073] Specifically, the gateway device is provided with a message format verification and validation mechanism. The first setting method may be to perform a test verification before transmitting the production environment data. Furthermore, for example, the gateway device may customize the test instructions and require the target controlled device to provide feedback, wherein the feedback may be data feedback, such as returning a confirmation message, or physical feedback, such as the user confirming whether the device test instruction is executed correctly. Based on the above feedback, the gateway device can confirm whether the message format conversion meets expectations. The second setting method may also be to directly verify and validate the transmission of production environment data. Similarly, this method also requires feedback from the target controlled device to verify and validate the correctness of the message conversion.

[0074] In one implementation, the method also includes: if there is a newly added controlled device, obtaining the device information corresponding to the newly added controlled device, and determining whether the device information of the newly added controlled device is applicable to the plug-in information; if the device information of the newly added controlled device is not applicable to the plug-in information, setting a new plug-in based on the device information of the newly added controlled device, and uploading the new plug-in to the cloud.

[0075] In this embodiment, based on the connection established between the controlled device and the gateway device, the gateway device can monitor whether there are newly added controlled devices. For example, the user can add more smart lamps, smart switches and other devices on the original basis. When the gateway device monitors the existence of newly added controlled devices, it actively obtains the device information corresponding to the newly added controlled devices, such as device type, device model, device manufacturer, etc. Next, the gateway device determines whether the newly added controlled device exists in the corresponding list of the target format conversion rules of the existing plug-in based on the acquired device information. In other words, it determines whether the existing plug-in of the gateway device is applicable to the newly added controlled device. If applicable, no additional processing is required, and the rule conversion can be performed based on the above method. If not applicable, the developer needs to develop a corresponding new plug-in for the newly added controlled device and maintain the corresponding corresponding list. Furthermore, the new plug-in can be uploaded to the cloud for management and maintenance.

[0076] In summary, this embodiment first makes corresponding adapted plug-ins for devices that need to be uniformly controlled and managed, and stores them on the cloud, such as a cloud server. Ensure that a connection has been established between the gateway device and the controlled device, and that a connection has been established between the gateway device and the cloud. On this basis, the cloud sends the corresponding plug-in to the gateway device according to the controlled device connected to the gateway device. The gateway device parses the obtained plug-in to obtain the message conversion rule corresponding to the controlled device. When the user sends a unified control command to the gateway device through the cloud, the gateway device obtains control commands in different message formats according to the message conversion rules, and distributes them to each controlled device. Finally, the controlled device executes the control task according to the control command in the adapted message format. It can be seen that the present invention achieves the technical effect of realizing flexible conversion of message formats between devices and unified and effective management of devices, thereby improving the scalability and stability of the system.

[0077] Exemplary Devices

[0078] like Figure 7 As shown in , an embodiment of the present invention provides a plug-in-based message format conversion device, which includes: a plug-in parsing module 10, a conversion rule determination module 20, and a message format conversion module 30.

[0079] Specifically, the plug-in parsing module 10 is used to obtain plug-in information, parse the plug-in information, and obtain the message conversion rule corresponding to the plug-in information, wherein the plug-in information corresponds to the controlled device. The conversion rule determination module 20 is used to receive an operation instruction, determine the target device corresponding to the operation instruction, and determine the target conversion rule corresponding to the target device. The message format conversion module 30 is used to convert the format of the operation instruction based on the target conversion rule so that the target device executes the operation instruction.

[0080] In one implementation, the plug-in parsing module 10 includes:

[0081] A plug-in information configuration unit, configured to obtain device information of a controlled device, configure the corresponding plug-in information based on the device information, and store the plug-in information in the cloud, wherein the controlled device is at least one;

[0082] A plug-in download unit, used to obtain a plug-in download address, and download the plug-in information from the cloud based on the plug-in download address;

[0083] The communication connection unit is used to pre-establish a communication connection with the controlled device.

[0084] In one implementation, the conversion rule determination module 20 includes:

[0085] An operation instruction parsing unit, used to parse the operation instruction and determine the character string information carried in the operation instruction;

[0086] A device model acquisition unit, configured to determine a device model corresponding to the string information based on the string information;

[0087] The target device determining unit is used to determine the target device based on the device model.

[0088] In one implementation, the message format conversion module 30 includes:

[0089] An operation instruction format conversion unit, used to convert the format of the operation instruction into a target format based on the target conversion rule to obtain an operation instruction after format conversion;

[0090] The operation instruction transmission unit is used to convert the format of the operation instruction based on the target conversion rule so that the target device executes the operation instruction and transmit it to the target device so that the target device executes the operation instruction after the format conversion.

[0091] Based on the above embodiments, the present invention further provides an intelligent terminal, whose principle block diagram can be shown as follows: Figure 7As shown. The intelligent terminal includes a processor, a memory, a network interface, a display screen, and a temperature sensor connected through a system bus. Among them, the processor of the intelligent terminal is used to provide computing and control capabilities. The memory of the intelligent terminal includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the intelligent terminal is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for optimizing display quality is implemented. The display screen of the intelligent terminal can be a liquid crystal display screen or an electronic ink display screen, and the temperature sensor of the intelligent terminal is pre-set inside the intelligent terminal to detect the operating temperature of the internal device.

[0092] Those skilled in the art will understand that Figure 7 The principle block diagram shown in the figure is only a block diagram of a partial structure related to the scheme of the present invention, and does not constitute a limitation on the smart terminal to which the scheme of the present invention is applied. The specific smart terminal may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0093] In one embodiment, a smart terminal is provided, comprising a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, and the one or more programs include instructions for performing the following operations:

[0094] Acquire plug-in information, parse the plug-in information, and obtain a message conversion rule corresponding to the plug-in information, wherein the plug-in information corresponds to the controlled device;

[0095] Receive an operation instruction, determine a target device corresponding to the operation instruction, and determine a target conversion rule corresponding to the target device;

[0096] The operation instruction is formatted based on the target conversion rule so that the target device executes the operation instruction.

[0097] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct RAMbus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.

[0098] In summary, the present invention discloses that the present invention provides a plug-in-based message format conversion method. The method of the present invention first obtains plug-in information, parses the plug-in information, and obtains the message conversion rule corresponding to the plug-in information, wherein the plug-in information corresponds to the controlled device. Next, an operation instruction is received, the target device corresponding to the operation instruction is determined, and the target conversion rule corresponding to the target device is determined. Finally, the operation instruction is formatted based on the target conversion rule so that the target device executes the operation instruction. In this way, the present invention optimizes the complexity of communication between devices caused by different message formats, realizes flexible conversion and effective management of message formats between devices, and improves the scalability and stability of the system.

[0099] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0100] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A plug-in-based message format conversion method, characterized in that: The method comprises: Acquire plug-in information, parse the plug-in information, and obtain a message conversion rule corresponding to the plug-in information, wherein the plug-in information corresponds to the controlled device; Receive an operation instruction, determine a target device corresponding to the operation instruction, and determine a target conversion rule corresponding to the target device; The operation instruction is formatted based on the target conversion rule so that the target device executes the operation instruction.

2. The plug-in-based message format conversion method according to claim 1, characterized in that: Before obtaining the plug-in information, the method further includes: The device information of the controlled device is obtained, the corresponding plug-in information is configured based on the device information, and the plug-in information is stored in the cloud, wherein there is at least one controlled device.

3. The plug-in-based message format conversion method according to claim 2, characterized in that: The obtaining of plug-in information includes: Obtain a plug-in download address, and download the plug-in information from the cloud based on the plug-in download address.

4. The plug-in-based message format conversion method according to claim 1, characterized in that: Before obtaining the plug-in information, the method further includes: Establish a communication connection with the controlled device in advance.

5. The plug-in-based message format conversion method according to claim 1, characterized in that: The receiving the operation instruction and determining the target device corresponding to the operation instruction includes: Parsing the operation instruction to determine the character string information carried in the operation instruction; Based on the string information, determining a device model corresponding to the string information; Based on the device model, the target device is determined.

6. The plug-in-based message format conversion method according to claim 1, characterized in that: The format conversion of the operation instruction based on the target conversion rule so that the target device executes the operation instruction includes: Based on the target conversion rule, converting the format of the operation instruction into a target format to obtain an operation instruction after format conversion; The operation instruction is format-converted based on the target conversion rule so that the target device executes the operation instruction and transmits it to the target device so that the target device executes the operation instruction after the format conversion.

7. The plug-in-based message format conversion method according to claim 1, characterized in that: The method further comprises: If there is a newly added controlled device, obtain device information corresponding to the newly added controlled device, and determine whether the device information of the newly added controlled device is applicable to the plug-in information; If the device information of the newly added controlled device is not applicable to the plug-in information, a new plug-in is set based on the device information of the newly added controlled device, and the new plug-in is uploaded to the cloud.

8. A message format conversion device based on a plug-in, characterized in that: The device comprises: A plug-in parsing module, used to obtain plug-in information, parse the plug-in information, and obtain a message conversion rule corresponding to the plug-in information, wherein the plug-in information corresponds to a controlled device; A conversion rule determination module, used to receive an operation instruction, determine a target device corresponding to the operation instruction, and determine a target conversion rule corresponding to the target device; The message format conversion module is used to convert the format of the operation instruction based on the target conversion rule so that the target device executes the operation instruction.

9. A gateway device, characterized in that: The gateway device includes a memory, a processor, and a plug-in-based message format conversion program stored in the memory and executable on the processor. When the processor executes the plug-in-based message format conversion program, the steps of the plug-in-based message format conversion method as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plug-in-based message format conversion program. When the plug-in-based message format conversion program is executed by the processor, the steps of the plug-in-based message format conversion method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Data processing method and device, electronic equipment and storage medium

    CN113645131A

  • Equipment access method and device, electronic equipment and storage medium

    CN114760340A

  • Internet of Things equipment access method and device, electronic equipment and storage medium

    CN116016005A

  • Equipment access plug-in compatible system

    CN116074349A

  • Analytics for edge devices to intelligently throttle data reporting

    US11469974B1

Cited By

  • Data format conversion method and device based on dynamic lazy loading, equipment and medium

    CN119996510A