Protocol attribute conversion bus control method, device, electronic device and storage medium

By performing attribute combination and protocol conversion in the bus control system, link commands are generated and converted into bus commands, the problem of low transmission efficiency of bus control commands is solved, and more efficient and reliable control effects are achieved.

CN115695571BActive Publication Date: 2025-04-01GUANGZHOU HEDONG TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211358421.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-01
Publication Date
2025-04-01
Estimated Expiration
2042-11-01

AI Technical Summary

Technical Problem

The transmission efficiency of bus control commands is low, resulting in relatively slow control effect.

Method used

By receiving control instructions input by the user, a bus command is generated, and attribute combination and protocol conversion are performed in the main gateway, link commands are generated, and finally the link command is converted into bus commands from the gateway and sent to the target device.

Benefits of technology

It improves the transmission efficiency of bus control commands, reduces the types and number of commands transmitted from the master gateway to the slave gateway, and improves the real-time and reliability of the control effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115695571B_ABST
    Figure CN115695571B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a bus control method, device, electronic device and storage medium for protocol attribute conversion. The technical solution provided by the embodiment of the present application receives a control instruction input by a user, generates at least one bus command according to the control instruction, and the bus command includes a ZigBee command, a KNX command or a Bluetooth command; sends the at least one bus command to the master gateway, in which the bus command is attribute combined and protocol converted to generate a corresponding link command; sends the link command to the slave gateway, and the slave gateway is used to perform protocol conversion on the link command to obtain at least one corresponding bus command; sends the at least one bus command to the target device through the slave gateway, which can solve the problem of low transmission efficiency of bus control commands, improve the transmission efficiency of bus control commands, and improve the control effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the technical field of bus control devices, and in particular, to a protocol attribute conversion bus control method, device, electronic device and storage medium. Background Art

[0002] The various devices connected to the bus can be divided into master devices (modules) and slave devices (modules) according to whether they have control functions over the bus. The master device has control over the bus, and the slave device can only respond to bus commands sent by the master device and has no control over the bus. Only the master device that has obtained the right to use the bus can start transmitting data.

[0003] When the master device sends multiple control commands to the corresponding bus control device (slave device) through different buses (such as ZigBee bus, knx bus or Bluetooth bus, etc.), such as the switch, mode selection, wind speed selection and temperature setting value of the air-conditioning equipment, it is generally transmitted through multiple independent control commands, with low transmission efficiency and relatively slow control effect. Summary of the invention

[0004] The embodiments of the present application provide a protocol attribute conversion bus control method, device, electronic device and storage medium, which can solve the problem of low bus control command transmission efficiency, improve the bus control command transmission efficiency, and improve the control effect.

[0005] In a first aspect, an embodiment of the present application provides a protocol attribute conversion bus control method, comprising:

[0006] Receive a control instruction input by a user, and generate at least one bus command according to the control instruction, wherein the bus command includes a zigbee command, a knx command or a Bluetooth command;

[0007] Sending the at least one bus command to a master gateway, where the master gateway performs attribute combination and protocol conversion on the bus command to generate a corresponding link command;

[0008] Sending the link command to a slave gateway, wherein the slave gateway is used to perform protocol conversion on the link command to obtain at least one corresponding bus command;

[0009] The at least one bus command is sent to the target device through the slave gateway.

[0010] Further, the performing attribute combination and protocol conversion on the at least one bus command to generate a corresponding link command includes:

[0011] According to the attributes of the bus commands and the preset attribute combination, bus commands with corresponding attributes are packaged to obtain a bus command combination, wherein the bus command combination includes at least two bus commands;

[0012] At least two bus commands in the bus command combination are subjected to protocol conversion to obtain a link command.

[0013] Furthermore, the bus commands with corresponding attributes are packaged and processed according to the attributes of the bus commands and the preset attribute combination to obtain the bus command combination, including:

[0014] Determining a corresponding first preset attribute combination according to an attribute of the first bus command;

[0015] According to the first preset attribute combination, obtaining a second bus command of a corresponding attribute;

[0016] The first bus command and the second bus command are packaged to obtain the bus command combination.

[0017] Further, the receiving a control instruction input by a user and generating at least one bus command according to the control instruction includes:

[0018] receiving at least one control instruction input by a user;

[0019] At least one corresponding bus command is generated according to the control instruction, and each control instruction corresponds to a bus command.

[0020] Further, after sending the at least one bus command to the main gateway, the method further comprises:

[0021] In the master gateway, the at least one received bus command is cached;

[0022] The bus commands cached within a time window are combined and converted into protocols to generate corresponding link commands.

[0023] Further, the link command includes link command attributes;

[0024] The bus commands cached in a time window are combined and converted into protocols to generate corresponding link commands, including:

[0025] Match the bus commands cached in a time window with the existing link command attributes in sequence according to preset attribute combinations, where each preset attribute combination corresponds to a link command attribute;

[0026] If the bus command matches an existing link command attribute, the bus command is updated to the corresponding link command;

[0027] If the bus command does not match the existing link command attribute, a new link command attribute is created according to the attribute of the bus command and the preset attribute combination, and a corresponding new link command is generated.

[0028] Further, sending the at least one bus command to the target device through the slave gateway includes:

[0029] Acquire the device ID information in the bus command from the gateway;

[0030] The corresponding bus command is sent to the corresponding target device according to the device ID information.

[0031] In a second aspect, an embodiment of the present application provides a protocol attribute conversion bus control device, including:

[0032] A bus command generating unit, configured to receive a control instruction input by a user, and generate at least one bus command according to the control instruction, wherein the bus command includes a zigbee command, a knx command or a Bluetooth command;

[0033] A first conversion unit, configured to send the at least one bus command to a master gateway, where the master gateway performs attribute combination and protocol conversion on the bus command to generate a corresponding link command;

[0034] A second conversion unit, configured to send the link command to a slave gateway, wherein the slave gateway is configured to perform protocol conversion on the link command to obtain at least one corresponding bus command;

[0035] An instruction sending unit is used to send the at least one bus command to the target device through the slave gateway.

[0036] Furthermore, the first conversion unit is further used to package bus commands with corresponding attributes according to the attributes of the bus commands and the preset attribute combination to obtain a bus command combination, wherein the bus command combination includes at least two bus commands;

[0037] At least two bus commands in the bus command combination are subjected to protocol conversion to obtain a link command.

[0038] Furthermore, the first conversion unit is further used to determine a corresponding first preset attribute combination according to the attribute of the first bus command;

[0039] According to the first preset attribute combination, obtaining a second bus command of a corresponding attribute;

[0040] The first bus command and the second bus command are packaged to obtain the bus command combination.

[0041] Furthermore, the bus command generating unit is further used to receive at least one control instruction input by a user;

[0042] At least one corresponding bus command is generated according to the control instruction, and each control instruction corresponds to a bus command.

[0043] Furthermore, the first conversion unit is further configured to cache the at least one received bus command in the master gateway;

[0044] The bus commands cached within a time window are combined and converted into protocols to generate corresponding link commands.

[0045] Further, the link command includes link command attributes;

[0046] The first conversion unit is further used to match the bus commands cached in a time window with the existing link command attributes in sequence according to preset attribute combinations, each preset attribute combination corresponding to a link command attribute;

[0047] If the bus command matches an existing link command attribute, the bus command is updated to the corresponding link command;

[0048] If the bus command does not match the existing link command attribute, a new link command attribute is created according to the attribute of the bus command and the preset attribute combination, and a corresponding new link command is generated.

[0049] Furthermore, the instruction sending unit is further used to obtain the device ID information in the bus command through the slave gateway;

[0050] The corresponding bus command is sent to the corresponding target device according to the device ID information.

[0051] In a third aspect, an embodiment of the present application provides an electronic device, including:

[0052] memory and one or more processors;

[0053] The memory is used to store one or more programs;

[0054] When the one or more programs are executed by the one or more processors, the one or more processors implement the protocol attribute conversion bus control method as described in the first aspect.

[0055] In a fourth aspect, an embodiment of the present application provides a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to execute the protocol attribute conversion bus control method as described in the first aspect.

[0056] The embodiment of the present application receives a control instruction input by a user, generates at least one bus command according to the control instruction, sends at least one bus command to the main gateway, performs attribute combination and protocol conversion on the bus command in the main gateway, generates a corresponding link command, sends the link command to the slave gateway, and the slave gateway is used to perform protocol conversion on the link command to obtain at least one corresponding bus command, and sends at least one bus command to the target device through the slave gateway. By adopting the above-mentioned technical means, the corresponding link command can be generated and transmitted to the corresponding slave gateway by performing attribute combination and protocol conversion on the bus command, so that the slave gateway can perform protocol conversion to generate the corresponding bus command and transmit it to the target device, thereby avoiding the problem of low efficiency of bus command transmission. In the process of transmission from the main gateway to the slave gateway, the types and quantity of commands are reduced, thereby improving the transmission efficiency of bus control commands. In addition, the reliability of protocol conversion is improved by performing protocol conversion through attribute combination. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 It is a flow chart of a protocol attribute conversion bus control method provided by an embodiment of the present application;

[0058] Figure 2 This is a schematic diagram of a lighting device protocol attribute conversion bus control provided by an embodiment of the present application;

[0059] Figure 3 This is a schematic diagram of a bus control for protocol attribute conversion of an air conditioner provided in an embodiment of the present application;

[0060] Figure 4 It is a structural schematic diagram of a protocol attribute conversion bus control device provided in an embodiment of the present application;

[0061] Figure 5 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0062] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for the convenience of description, only the part related to the present application but not all the contents are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.

[0063] Currently in the ecosystem of the standard protocol link, bus commands (such as zigbee commands, knx commands and Bluetooth commands) corresponding to different bus systems (such as zigbee bus, knx bus and Bluetooth bus) cannot be matched one by one with the standard protocol link.

[0064] The protocol attribute conversion bus control method, device, electronic device and storage medium provided in the present application are intended to reduce the types and number of commands transmitted from the master gateway to the slave gateway by combining the attributes of the bus command and converting the protocol during bus control, thereby improving the transmission efficiency of the bus control command. Compared with the traditional bus control method, it is usually transmitted through multiple independent bus commands, and the types and numbers of transmitted commands are numerous, so the transmission efficiency is relatively low, and it is relatively slow to achieve the ideal control effect. Based on this, a protocol attribute conversion bus control method of an embodiment of the present application is provided to solve the reliability and historical version replacement problems in the existing firmware program upgrade process.

[0065] Figure 1 A flowchart of a protocol attribute conversion bus control method provided in an embodiment of the present application is given. The protocol attribute conversion bus control method provided in this embodiment can be executed by a protocol attribute conversion bus control device, which can be implemented by software and / or hardware. The protocol attribute conversion bus control device can be composed of two or more physical entities, or it can be composed of one physical entity. Generally speaking, the protocol attribute conversion bus control device can be a host computer of the device to be upgraded, such as a computer device.

[0066] The following description is made by taking a computer device as an example of the subject of the protocol attribute conversion bus control method. Figure 1 , the protocol attribute conversion bus control method specifically includes:

[0067] S101, receiving a control instruction input by a user, and generating at least one bus command according to the control instruction, wherein the bus command includes a zigbee command, a knx command or a Bluetooth command.

[0068] The bus can be understood as a public communication trunk for transmitting information between various functional components of a computer. The bus includes zigbee bus, knx bus or Bluetooth bus, etc. The control device controlled by the user is connected to the main gateway through the bus. The command sent by the control device to the main gateway is a bus command, which includes a zigbee command, a knx command or a Bluetooth command.

[0069] It should be noted that if the control device and the main gateway are connected via the Zigbee bus, the command sent by the control device to the main gateway is a bus command or a Zigbee command. If the control device and the main gateway are connected via the KNX bus, the command sent by the control device to the main gateway is a bus command or a KNX command. If the control device and the main gateway are connected via the Bluetooth bus, the command sent by the control device to the main gateway is a bus command or a Bluetooth command.

[0070] At least one control instruction input by a user is received through the control device, and at least one bus command is generated according to the control instruction. It should be noted that one bus command is generated corresponding to each control instruction.

[0071] Figure 2 This is a schematic diagram of a lighting device protocol attribute conversion bus control embodiment of the present application, referring to Figure 2 , the control device 11 is a four-inch screen RGB color disk control device, and the four-inch screen RGB color disk control device is connected to the main gateway 12 through the zigbee bus as an example. The user clicks the brightness adjustment button and the color saturation adjustment button corresponding to the four-inch screen RGB color disk control device, and the four-inch screen (zigbee device) generates two zigbee commands (bus commands) according to the brightness adjustment control instruction and the chroma and saturation adjustment control instruction input by the user clicking the four-inch screen RGB color disk control device, respectively, the zigbee command for brightness adjustment: FE 1100 0B 02 0E7A 02 01 0800 06 0400 01 40 0000 364B; the zigbee command for chroma and saturation adjustment: FE 1100 0B 02 0E7A 02 01 0030 06 0400 01 40 0000364B.

[0072] It should be noted that the zigbee command refers to the serial port protocol command.

[0073] S102: Send the at least one bus command to a master gateway, where the master gateway performs attribute combination and protocol conversion on the bus command to generate a corresponding link command.

[0074] A gateway can be understood as an internetwork connector or protocol converter, which implements network interconnection above the network layer. Figure 2 As shown, the master gateway 12 is connected to the control device 11 via a bus, the slave gateway 13 is connected to the target device 14 via a bus, and the master gateway 12 and the slave gateway 13 are connected in communication (wired or wireless). After the control device 11 generates the corresponding bus command according to the control instruction input by the user, it is sent to the master gateway 12 via the corresponding bus, so that the master gateway 12 can perform attribute combination and protocol conversion to generate the corresponding link command. It should be noted that the bus command is a serial port protocol command, and the master gateway 12 is used to convert the bus command into the corresponding standard protocol link.

[0075] It should be noted that when sending bus commands to the main gateway 12, they can be sent sequentially, or the command type quantity limit can be preset, and the corresponding preset command type and quantity can be obtained and sent together. For example, it is preset that the brightness adjustment bus command and the color saturation adjustment bus command must be sent together.

[0076] In the main gateway 12, at least one received bus command is cached, and the bus commands cached within a time window are combined and protocol converted to generate a corresponding link command. When combining, the bus commands of corresponding attributes are packaged according to the attributes of the received bus commands and the preset attribute combination to obtain a bus command combination, which includes at least two bus commands. At least two bus commands in the packaged bus command combination are converted to a standard link protocol to obtain a link command.

[0077] Exemplarily, the main gateway 12 receives a brightness adjustment bus command from the control device 11 through the bus and caches it. The preset attribute combination A includes three attributes, namely, brightness attribute, chromaticity attribute and saturation attribute, as a combination. When the main gateway 12 receives the chromaticity and saturation adjustment bus instruction, it obtains the chromaticity and saturation attributes according to the preset attribute combination A, reads the cached brightness adjustment bus command of the brightness attribute, and converts it into a link command through a preset protocol conversion algorithm. The link command is three values ​​of the rgb attribute, and the link command is expressed as:

[0078] {"id":"123","objects":[{"sid":"00010213CF8BBE02010100060000","status":[{"rgb":"100,100,100"}]}],"time_stamp":"1603281282000"}.

[0079] In one embodiment, in the master gateway 12, based on the received bus command, according to the attribute of the first bus command, according to the preset attribute combination, the first preset attribute combination corresponding to the attribute is determined, and according to the first preset attribute combination, the second bus command of the corresponding attribute is obtained. The first bus command and the second bus command are packaged and processed to obtain a bus command combination.

[0080] It should be noted that the second bus command may be one bus command or multiple bus commands.

[0081] In one embodiment, in the master gateway 12, the bus commands cached in a time window are matched with the existing link command attributes in sequence according to the preset attribute combination, and each preset attribute combination corresponds to a link command attribute. If the bus command matches the existing link command attribute, the bus command is updated to the corresponding link command. If the bus command does not match the existing link command attribute, a new link command attribute is created according to the attribute of the bus command and the preset attribute combination, and a corresponding new link command is generated.

[0082] For example, the zigbee bus control is used as an example for explanation. In the main gateway 12, multiple zigbee commands (zigbee attribute commands) are collected in a time window, and each zigbee command is judged in turn whether it has the same standard protocol link attribute according to the preset attribute combination. If the same standard protocol link attribute exists, it is updated to the corresponding link attribute, and the corresponding link command is updated according to the zigbee command. If there is no same standard protocol link attribute, a new link attribute is created, and a new link command is generated according to the zigbee command.

[0083] Exemplarily, in the main gateway 12, a time window receives a chromaticity adjustment bus command, a brightness adjustment bus command, a saturation adjustment bus command, and a color temperature adjustment bus command, and the preset attribute combination A is a chromaticity attribute, a brightness attribute, and a saturation attribute, and the color temperature attribute belongs to the preset attribute combination B. When a chromaticity adjustment bus command is received, if the preset attribute combination A does not have a corresponding link command attribute, a link command attribute a corresponding to the preset attribute combination A is created, and a corresponding link command A1 is generated by performing protocol conversion based on the chromaticity adjustment bus command. When a brightness adjustment bus command and a saturation adjustment bus command are received, based on the link command attribute a corresponding to the preset attribute combination A, the brightness adjustment bus command and the saturation adjustment bus command are converted into a protocol and then the link command A1 is updated. When a color temperature adjustment bus command is received and no corresponding link command (link attribute command) is matched, a new link command attribute b is created according to the preset attribute combination B corresponding to the color temperature adjustment bus command, and a corresponding new link command B1 is generated.

[0084] As described above, by converting multiple bus commands according to attribute combinations and protocols in the master gateway 12 to generate a corresponding link command (for example, link command A1), and then directly sending the link command to the slave gateway 13 (or target device 14), the types and number of commands are reduced, which is equivalent to integrating and packaging the bus commands, so that multiple bus commands (bus attribute commands) can be sent through one command (link command), thereby improving the work efficiency of bus command transmission.

[0085] S103: Send the link command to a slave gateway, where the slave gateway is used to perform protocol conversion on the link command to obtain at least one corresponding bus command.

[0086] The link command generated by the master gateway 12 is sent to the slave gateway 13 , and the slave gateway 13 performs protocol conversion on the link command to generate a corresponding bus command, wherein the generated bus command corresponds to the bus command generated by the control device 11 .

[0087] Exemplarily, link commands corresponding to three values ​​of the standard link protocol RGB attribute are received from the gateway 13:

[0088] {"id":"123","objects":[{"sid":"00010213CF8BBE02010100060000","status":[{"rgb":"100,100,100"}]}],"time_stamp":"1603281282000"}, which are converted into chroma and saturation adjustment bus commands and brightness adjustment bus commands through the protocol conversion algorithm. The brightness adjustment bus command is expressed as:

[0089] {"DeviceAddr":"60a423fffe92460a","Epoint":8,"Cluster_ID":8,"Command":4,"SendMode":2,"Data":{"Level":150,"TransitionTime":0}};

[0090] The hue and saturation adjustment bus commands are expressed as:

[0091] {"DeviceAddr":"60a423fffe92460a","Epoint":8,"Cluster_ID":768,"Command":6,"SendMode":2,"Data":{"Hue":150,"Saturation":150,"TransitionTime":0}}.

[0092] As described above, by converting the link command from the gateway 13 into a corresponding bus command corresponding to the control device 11, effective transmission of the bus command of the control device 11 is achieved, providing a data basis for subsequently sending the bus command from the gateway 13 to the corresponding target device 14 through the corresponding bus.

[0093] S104: Send the at least one bus command to the target device through the slave gateway.

[0094] By acquiring the device ID information in the bus command from the gateway 13 , the corresponding bus command is sent to the target device 14 according to the device ID information, so as to realize the operation control of the target device 14 and change the operation state of the target device 14 .

[0095] In one embodiment, Figure 3 This is a schematic diagram of a bus control of an air conditioning device protocol attribute conversion according to an embodiment of the present application, referring to Figure 3, the control device 11 is a four-inch screen air conditioning control device, and the bus is a zigbee bus. The user clicks on the interface corresponding to the four-inch screen air conditioning control device once, and the background triggers two zigbee commands (zigbee attribute commands), including mode attribute commands and temperature attribute commands. For example, if the air conditioning mode is cooling mode (cool), the corresponding mode attribute command is expressed as: FE 1200 03 02 2F29 01 00 0102 55 0500 01 1C00 30 01 3711, and the temperature is set to 25 degrees, then the temperature attribute command is expressed as: FE 1200 03 02 2F29 01 00 0102 55 0500 011C00 30 01 3711. The mode attribute command and the temperature attribute command are sent to the main gateway 12 through the zigbee bus. In the master gateway 12, the mode attribute command generates two standard protocol link commands (link attribute commands) according to the preset protocol conversion algorithm, which are {"on_off":"on"} and {"mode":"cool"}, and the temperature attribute command generates one standard protocol link command (link attribute command) according to the preset protocol conversion algorithm, which is {"set_temp":"25.0"}. The three standard protocol link commands (link attribute commands) are sent to the slave gateway 13. In the slave gateway 13, the collective link protocol is synthesized within a time window (for example, within 2 seconds):

[0096] {"on_off":"on","mode":"cool","set_temp":"25.0"}.

[0097] It should be noted that after receiving the standard protocol link command (link attribute command) from the gateway 13, three standard protocol link commands (link attribute commands) are received within a time window. If multiple identical link commands (link attribute commands) are received within a time window, the same link command (link attribute command) will be updated with different new attribute commands, and the last link command (link attribute command) will be read after another time window.

[0098] The gateway 13 splits the obtained collective link protocol (or the last link attribute command) into multiple zigbee attribute commands and sends them to the target device 14 (coolbox). For example, the zigbee command for setting the temperature after splitting is:

[0099] {"DeviceAddr":"60a423fffe92460a","Epoint":8,"Cluster_ID":513,"Command":120,"SendMode":2,"Data":{"Undivided":0,"Attributeld":17,"AttributeDataType":41,"AttributeData":0}};

[0100] The zigbee commands for mode control are:

[0101] {"DeviceAddr":"60a423fffe92460a","Epoint":8,"Cluster_ID":513,"Command":120,"SendMode":2,"Data":{"Undivided":0,"Attributeld":28,"AttributeDataType":41,"AttributeData":0}}.

[0102] As mentioned above, the standard protocol link is for air conditioning control. Generally, a standard protocol interface will contain multiple control commands, such as the switch, mode selection, wind speed selection and temperature setting value of the air conditioner, but for the zigbee bus or knx bus or Bluetooth (mesh) bus, it needs to be split into multiple independent bus commands. Through the above implementation method, multiple zigbee commands can be collected within a time window. If there is the same standard protocol link attribute, it is updated to the link attribute. If there is no same standard protocol link attribute, a new link attribute is created, and the collection is completed after the timeout and sent for execution. The standard protocol link command is split into multiple zigbee commands and sent to the target device 14 (zigbee bus device, or knx bus device or Bluetooth (mesh) bus device). By converting the bus protocol attributes into the standard protocol, stable and reliable protocol mutual control can be achieved.

[0103] It should be noted that the above implementation is illustrated by using the ZigBee bus as an example, and the specific implementation is also applicable when applied to the KNX bus or the Bluetooth (mesh) bus.

[0104] In the above, by receiving the control instruction input by the user, at least one bus command is generated according to the control instruction, and at least one bus command is sent to the main gateway. In the main gateway, the bus command is attribute combined and protocol converted to generate a corresponding link command, and the link command is sent to the slave gateway. The slave gateway is used to perform protocol conversion on the link command to obtain at least one corresponding bus command, and at least one bus command is sent to the target device through the slave gateway. By adopting the above technical means, the bus command can be attribute combined and protocol converted to generate a corresponding link command and transmitted to the corresponding slave gateway, so that the slave gateway can perform protocol conversion to generate the corresponding bus command and transmit it to the target device, thereby avoiding the problem of low efficiency of bus command transmission. In the process of transmission from the main gateway to the slave gateway, the types and number of commands are reduced, thereby improving the transmission efficiency of bus control commands. In addition, the protocol conversion is performed through attribute combination, which improves the reliability of protocol conversion.

[0105] Based on the above embodiments, Figure 4 A schematic diagram of the structure of a protocol attribute conversion bus control device provided in an embodiment of the present application. Figure 4 The protocol attribute conversion bus control device provided in this embodiment specifically includes: a bus command generating unit 21, a first conversion unit 22, a second conversion unit 23 and an instruction sending unit 24.

[0106] The bus command generating unit 21 is used to receive a control instruction input by a user, and generate at least one bus command according to the control instruction, wherein the bus command includes a zigbee command, a knx command or a Bluetooth command;

[0107] A first conversion unit 22, configured to send the at least one bus command to a master gateway, where the master gateway performs attribute combination and protocol conversion on the bus command to generate a corresponding link command;

[0108] A second conversion unit 23, configured to send the link command to a slave gateway, wherein the slave gateway is configured to perform protocol conversion on the link command to obtain at least one corresponding bus command;

[0109] The instruction sending unit 24 is used to send the at least one bus command to the target device through the slave gateway.

[0110] Furthermore, the first conversion unit 22 is further configured to package bus commands with corresponding attributes according to the attributes of the bus commands and the preset attribute combination to obtain a bus command combination, wherein the bus command combination includes at least two bus commands;

[0111] At least two bus commands in the bus command combination are subjected to protocol conversion to obtain a link command.

[0112] Furthermore, the first conversion unit 22 is further configured to determine a corresponding first preset attribute combination according to an attribute of the first bus command;

[0113] According to the first preset attribute combination, obtaining a second bus command of a corresponding attribute;

[0114] The first bus command and the second bus command are packaged to obtain the bus command combination.

[0115] Furthermore, the bus command generating unit 21 is further configured to receive at least one control instruction input by a user;

[0116] At least one corresponding bus command is generated according to the control instruction, and each control instruction corresponds to a bus command.

[0117] Further, the first conversion unit 22 is further configured to cache the at least one received bus command in the master gateway;

[0118] The bus commands cached within a time window are combined and converted into protocols to generate corresponding link commands.

[0119] Further, the link command includes link command attributes;

[0120] The first conversion unit 22 is further used to match the bus commands cached in a time window with the existing link command attributes in sequence according to preset attribute combinations, each preset attribute combination corresponding to a link command attribute;

[0121] If the bus command matches an existing link command attribute, the bus command is updated to the corresponding link command;

[0122] If the bus command does not match the existing link command attribute, a new link command attribute is created according to the attribute of the bus command and the preset attribute combination, and a corresponding new link command is generated.

[0123] Furthermore, the instruction sending unit 24 is further configured to obtain the device ID information in the bus command from the gateway;

[0124] The corresponding bus command is sent to the corresponding target device according to the device ID information.

[0125] In the above, by receiving the control instruction input by the user, at least one bus command is generated according to the control instruction, and at least one bus command is sent to the main gateway. In the main gateway, the bus command is attribute combined and protocol converted to generate a corresponding link command, and the link command is sent to the slave gateway. The slave gateway is used to perform protocol conversion on the link command to obtain at least one corresponding bus command, and at least one bus command is sent to the target device through the slave gateway. By adopting the above technical means, the bus command can be attribute combined and protocol converted to generate a corresponding link command and transmitted to the corresponding slave gateway, so that the slave gateway can perform protocol conversion to generate the corresponding bus command and transmit it to the target device, thereby avoiding the problem of low efficiency of bus command transmission. In the process of transmission from the main gateway to the slave gateway, the types and number of commands are reduced, thereby improving the transmission efficiency of bus control commands. In addition, the protocol conversion is performed through attribute combination, which improves the reliability of protocol conversion.

[0126] The protocol attribute conversion bus control device provided in the embodiment of the present application can be used to execute the protocol attribute conversion bus control method provided in the above embodiment, and has corresponding functions and beneficial effects.

[0127] The present application embodiment provides a protocol attribute conversion bus control device, referring to Figure 5 The protocol attribute conversion bus control device includes: a processor 31, a memory 32, a communication module 33, an input device 34 and an output device 35. The number of processors in the protocol attribute conversion bus control device can be one or more, and the number of memories in the protocol attribute conversion bus control device can be one or more. The processor, memory, communication module, input device and output device of the protocol attribute conversion bus control device can be connected through a bus or other methods.

[0128] The memory 32, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as the program instructions / modules corresponding to the protocol attribute conversion bus control method described in any embodiment of the present application (for example, the bus command generation unit, the first conversion unit, the second conversion unit and the instruction sending unit in the protocol attribute conversion bus control device). The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to the use of the device, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.

[0129] The communication module 33 is used for data transmission.

[0130] The processor 31 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory, that is, implements the above-mentioned protocol attribute conversion bus control method.

[0131] The input device 34 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the device. The output device 35 may include a display device such as a display screen.

[0132] The protocol attribute conversion bus control device provided above can be used to execute the protocol attribute conversion bus control method provided in the above embodiment, and has corresponding functions and beneficial effects.

[0133] An embodiment of the present application also provides a storage medium storing computer executable instructions, which are used to execute a protocol attribute conversion bus control method when executed by a computer processor. The protocol attribute conversion bus control method includes: receiving a control instruction input by a user, generating at least one bus command according to the control instruction, and the bus command includes a zigbee command, a knx command or a Bluetooth command; sending the at least one bus command to a master gateway, and performing attribute combination and protocol conversion on the bus command in the master gateway to generate a corresponding link command; sending the link command to a slave gateway, and the slave gateway is used to perform protocol conversion on the link command to obtain the corresponding at least one bus command; sending the at least one bus command to a target device through the slave gateway.

[0134] Storage medium - any of various types of memory devices or storage devices. The term "storage medium" is intended to include: installation media, such as CD-ROM, floppy disk or tape device; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (such as hard disk or optical storage); registers or other similar types of memory elements, etc. Storage media may also include other types of memory or combinations thereof. In addition, the storage medium may be located in the first computer system in which the program is executed, or may be located in a different second computer system, which is connected to the first computer system via a network (such as the Internet). The second computer system can provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media residing in different locations (for example, in different computer systems connected by a network). The storage medium may store program instructions (for example, embodied as a computer program) that can be executed by one or more processors.

[0135] Of course, the computer executable instructions of a storage medium storing computer executable instructions provided in an embodiment of the present application are not limited to the protocol attribute conversion bus control method described above, and can also execute related operations in the protocol attribute conversion bus control method provided in any embodiment of the present application.

[0136] The protocol attribute conversion bus control device, storage medium and protocol attribute conversion bus control device provided in the above embodiments can execute the protocol attribute conversion bus control method provided in any embodiment of the present application. For technical details not described in detail in the above embodiments, please refer to the protocol attribute conversion bus control method provided in any embodiment of the present application.

[0137] The above are only preferred embodiments of the present application and the technical principles used. The present application is not limited to the specific embodiments described herein, and various obvious changes, readjustments and substitutions that can be made by those skilled in the art will not deviate from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the claims.

Claims

1. A protocol attribute conversion bus control method, characterized in that: include: Receive a control instruction input by a user, and generate at least one bus command according to the control instruction, wherein the bus command includes a zigbee command, a knx command or a Bluetooth command; Sending the at least one bus command to a master gateway, where the master gateway performs attribute combination and protocol conversion on the bus command to generate a corresponding link command; Sending the link command to a slave gateway, where the slave gateway is used to perform protocol conversion on the link command to obtain at least one corresponding bus command; sending the at least one bus command to the target device through the slave gateway; After sending the at least one bus command to the main gateway, the method further comprises: In the master gateway, the at least one received bus command is cached; Combining and protocol converting bus commands cached in a time window to generate corresponding link commands, wherein the link commands include link command attributes; The bus commands cached in a time window are combined and converted into protocols to generate corresponding link commands, including: Match the bus commands cached in a time window with the existing link command attributes in sequence according to preset attribute combinations, where each preset attribute combination corresponds to a link command attribute; If the bus command matches an existing link command attribute, the bus command is updated to the corresponding link command; If the bus command does not match the existing link command attribute, a new link command attribute is created according to the attribute of the bus command and the preset attribute combination, and a corresponding new link command is generated.

2. The method according to claim 1, characterized in that The performing attribute combination and protocol conversion on the at least one bus command to generate a corresponding link command includes: According to the attributes of the bus commands and the preset attribute combination, bus commands with corresponding attributes are packaged to obtain a bus command combination, wherein the bus command combination includes at least two bus commands; At least two bus commands in the bus command combination are subjected to protocol conversion to obtain a link command.

3. The method according to claim 2, characterized in that The method of packaging bus commands with corresponding attributes according to the attributes of the bus commands and the preset attribute combination to obtain a bus command combination includes: Determining a corresponding first preset attribute combination according to an attribute of the first bus command; According to the first preset attribute combination, obtaining a second bus command of a corresponding attribute; The first bus command and the second bus command are packaged to obtain the bus command combination.

4. The method according to claim 1, characterized in that: The receiving a control instruction input by a user and generating at least one bus command according to the control instruction comprises: receiving at least one control instruction input by a user; At least one corresponding bus command is generated according to the control instruction, and each control instruction corresponds to a bus command.

5. The method according to claim 1, characterized in that The sending the at least one bus command to the target device through the slave gateway comprises: Acquire the device ID information in the bus command from the gateway; The corresponding bus command is sent to the corresponding target device according to the device ID information.

6. A protocol attribute conversion bus control device, characterized in that: include: A bus command generating unit, configured to receive a control instruction input by a user, and generate at least one bus command according to the control instruction, wherein the bus command includes a zigbee command, a knx command or a Bluetooth command; A first conversion unit, configured to send the at least one bus command to a master gateway, where the master gateway performs attribute combination and protocol conversion on the bus command to generate a corresponding link command; A second conversion unit, configured to send the link command to a slave gateway, wherein the slave gateway is configured to perform protocol conversion on the link command to obtain at least one corresponding bus command; an instruction sending unit, configured to send the at least one bus command to a target device via the slave gateway; The first conversion unit is further configured to cache the at least one received bus command in the master gateway; Combining and protocol converting bus commands cached in a time window to generate corresponding link commands, wherein the link commands include link command attributes; The first conversion unit is further used to match the bus commands cached in a time window with the existing link command attributes in sequence according to preset attribute combinations, each preset attribute combination corresponding to a link command attribute; If the bus command matches an existing link command attribute, the bus command is updated to the corresponding link command; If the bus command does not match the existing link command attribute, a new link command attribute is created according to the attribute of the bus command and the preset attribute combination, and a corresponding new link command is generated.

7. A protocol attribute conversion bus control device, characterized in that: include: memory and one or more processors; The memory is used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.

8. A storage medium storing computer executable instructions, characterized in that: When the computer executable instructions are executed by a processor, they are used to perform the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Thing Internet gateway of heterogeneous wireless network and control method thereof

    CN101951693A

  • Remote control method and system for multi-terminal Internet of Things and readable medium

    CN110351392A

  • Method, device and equipment for collecting data of multiple PLCs (Programmable Logic Controller) and readable storage medium

    CN114528319A