A method, system, control device, and storage medium for controlling the operation of multiple devices.

By communicating with multiple controllable devices through the control box, a device address database is built and data verification and calculation are performed, which solves the problem of high cost of MCU management of multiple devices and realizes low-cost multi-device control.

CN116225528BActive Publication Date: 2026-11-17SHENZHEN STEP ELECTRONIC & LIGHTING CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310156234.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-16
Publication Date
2026-11-17
Estimated Expiration
2043-02-16

AI Technical Summary

Technical Problem

In existing technologies, a single MCU can only manage one device, resulting in high costs and complex manufacturing processes for device control systems that require the integration of multiple MCUs. Furthermore, the use of standard databases necessitates the use of high-level chips, further increasing costs.

Method used

A method and system for controlling multiple devices with a single MCU is developed by using a control box to communicate with multiple controllable devices, constructing a device address database, and performing data verification and temporary memory operations. This includes the construction of the device address database and the design of its index.

Benefits of technology

It effectively reduces the control and manufacturing costs of multi-device control systems and enables one MCU to manage multiple devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116225528B_ABST
    Figure CN116225528B_ABST
Patent Text Reader

Abstract

This invention discloses a method, system, control device, and storage medium for controlling the operation of multiple devices. The method includes: performing initialization operations; constructing a device address database, which stores device parameter attribute information for multiple controllable devices, with each controllable device's device parameter attribute information stored at a specific storage address in the device address database; receiving protocol data sent by at least one controllable device and performing data verification on the protocol data; when the protocol data passes the data verification, requesting temporary memory according to preset rules, with the temporary memory used to store temporary running data; obtaining the target running logic; retrieving temporary running data from the device address database according to the target running logic and performing calculations in the temporary memory; after the calculations are completed, checking the validity of the temporary running data in the temporary memory and copying the verified temporary running data to the device address database. This invention can effectively reduce the manufacturing cost of a control system for controlling multiple devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of equipment control technology, and in particular to a method, system, control device, and storage medium for controlling the operation of multiple devices. Background Technology

[0002] In existing equipment control technologies, each device corresponds to a set of parameter attributes, and a single MCU (Microcontroller Unit) can only manage the parameter attributes of one device. If multiple devices need to be managed, multiple MCUs need to be integrated, which is costly and complex in manufacturing process. Furthermore, standard databases such as MySQL and Oracle, which can support the management of multiple devices, require high-level chips with operating systems, which also increases costs. Summary of the Invention

[0003] Therefore, it is necessary to propose a method, system, control device, and storage medium for controlling the operation of multiple devices to address the above problems, which can effectively reduce manufacturing costs.

[0004] A method for controlling the operation of multiple devices, using a device control system, the device control system including a control box and multiple controllable devices, the control box being able to communicate with each of the controllable devices;

[0005] The steps of the method for controlling the operation of multiple devices include: The control box performs an initialization operation to build a device address database. The device address database stores the device parameter attribute information of the multiple controllable devices. The device parameter attribute information of each controllable device is stored at a storage address in the device address database. The control box receives protocol data sent by at least one of the controllable devices and performs data verification on the protocol data; When the protocol data passes the data verification, temporary memory is requested according to preset rules. The temporary memory is used to store temporary running data. Obtain the target operating logic, retrieve the temporary operating data from the device address database according to the target operating logic, and perform calculations in the temporary memory; After the operation is completed, the validity of the temporary running data in the temporary memory is checked, and the temporary running data that passes the check is copied to the device address database.

[0006] The step of constructing the device address database includes: Obtain the device attribute list and dynamic operating parameters of the multiple controllable devices, allocate a fixed memory space, and construct the device address database within the fixed memory space based on the device attribute list and the dynamic operating parameters.

[0007] The step of constructing the device address database includes: Construct a database index, which includes a primary index and a secondary index; The primary index is used to indicate the address flag of the controllable device and is represented by a bit variable; The secondary index is used to indicate at least one of the following: device attributes, device storage, device factory settings, firmware identification code, and extended attributes, and is represented by a data partition opcode.

[0008] The step of constructing the database index includes: The serial number of the primary index represents the number of the virtual address of the controllable device in the device address database; The data partitioning opcode ranges from 0 to 255, and each data partitioning opcode can support 0 to 255 register reads and writes.

[0009] The initialization steps of the control box include: Check whether the device parameter attribute information of the controllable device is valid; If so, then construct the device address database; The runtime sequence for establishing the device address database is used to check the device status of the controllable device corresponding to the virtual address in the device address database, the first-level index, the second-level index, and the storage address storing the device parameter attribute information of the controllable device.

[0010] The step of constructing the device address database includes: Modify the controllable device address flag in the primary index and store it in flash memory. When the control box is detected to be powered on, read the data stored in the flash memory and initialize the device address database; or The data corresponding to the data partition opcode is modified according to the data partition opcode and the register number.

[0011] Among them, the controllable devices corresponding to the device parameter attribute information stored in the device address database are devices of the same type.

[0012] An apparatus for controlling the operation of multiple devices, employing an equipment control system, the equipment control system comprising a control box and multiple controllable devices, the control box being capable of communicating with each of the controllable devices; The device for controlling the operation of multiple devices includes: The initial module is used to perform initialization operations and build a device address database, which stores the device parameter attribute information of the multiple controllable devices; A receiving module is configured to receive protocol data sent by at least one of the controllable devices and to perform data verification on the protocol data; A temporary module is used to request temporary memory according to preset rules when the protocol data passes the data verification. The temporary memory is used to store temporary running data. The computation module is used to obtain the target running logic, retrieve the temporary running data from the device address database according to the target running logic, and perform computation in the temporary memory; The storage module is used to check the validity of the temporary running data in the temporary memory after the operation is completed, and copy the temporary running data that passes the check to the device address database.

[0013] A computer device includes a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps described above.

[0014] A computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the steps described above.

[0015] The embodiments of the present invention have the following beneficial effects: The device address database stores the device parameter attribute information of the multiple controllable devices. According to the target operation logic, the temporary operation data is obtained from the device address database and processed in the temporary memory. This enables one MCU to control the operation of multiple controllable devices, effectively reducing the control cost and manufacturing cost of the control system for multiple controllable devices. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] in: Figure 1 This is a flowchart illustrating the first embodiment of the method for controlling the operation of multiple devices provided by the present invention; Figure 2This is a schematic diagram of the structure of the equipment control system provided by the present invention; Figure 3 This is a flowchart illustrating a second embodiment of the method for controlling the operation of multiple devices provided by the present invention; Figure 4 This is a schematic diagram of the device attribute list provided by the present invention; Figure 5 This is a schematic diagram of the database index structure provided by the present invention; Figure 6 This is a schematic diagram of the structure of the device for controlling the operation of multiple devices provided by the present invention; Figure 7 An internal structural diagram of a computer device in one embodiment is shown. Detailed Implementation

[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0019] Please refer to the following: Figure 1 and Figure 2 , Figure 1 This is a flowchart illustrating the first embodiment of the method for controlling the operation of multiple devices provided by the present invention. Figure 2 This is a schematic diagram of the structure of the equipment control system provided by the present invention. The equipment control system 10 includes a control box 11 and controllable devices 12. The control box 11 can control the operation of the controllable devices 12 according to a preset program. For example, if the controllable device 12 is a lamp, and the equipment control system 10 is a lighting system, the control box 11 controls multiple lamps to light up according to preset rules. The control box 11 can communicate with each controllable device 12, for example, via Bluetooth or a wireless network. Each controllable device 12 corresponds to a set of parameter attributes, and these parameter attributes are known.

[0020] The method for controlling the operation of multiple devices provided by this invention includes the following steps: S101: The control box performs initialization operations and builds a device address database, which stores the device parameter attribute information of multiple controllable devices.

[0021] In a specific implementation scenario, after the control box is powered on, it performs an initialization operation. This initialization includes building a device address database, which stores device parameter attribute information for multiple controllable devices. The device parameter attribute information for each controllable device is stored in a corresponding storage address according to preset storage rules. Each controllable device's device parameter attribute information is stored at a specific storage address within the device address database. When the control box needs to control one or more controllable devices, it can extract the corresponding device parameter attributes, perform calculations, and thus control these devices.

[0022] Once the device address database is built, its corresponding storage space remains occupied by the database. The size of the device address database, or the amount of device parameter attribute information it can store, is determined by the performance of the MCU in the control box. Within the limits of the MCU's memory, users can add or delete device parameter attribute information in the device address database according to actual needs, thereby adding or deleting controllable devices that the control box can control. For example, if the control box no longer controls a controllable device, it retrieves the storage address corresponding to that device, deletes the data at that address, and thus deletes the controllable device. As another example, if the control box needs to add a controllable device, it allocates a storage address for that device according to preset rules, stores the device's parameter attribute information at that address, and thus adds the controllable device. Furthermore, if it is necessary to modify the device parameter attribute information of a controllable device for some reason, the storage address of that device can be found, the data stored at that address can be modified, and the device parameter attribute information of that controllable device can be modified.

[0023] It should be noted that in this implementation scenario, the controllable devices corresponding to the device parameter attribute information stored in a device address database are all of the same type. Different types of devices have different hardware, and their device parameter attribute information structures are also different. Therefore, they cannot be stored using a uniform storage method, which would also be detrimental to subsequent reading of device parameter attribute information for calculation.

[0024] S102: The control box receives protocol data sent by at least one controllable device and performs data verification on the protocol data.

[0025] In a specific implementation scenario, the control box receives protocol data sent by at least one controllable device. When the controllable device is in working condition, it sends its own protocol data, such as Bluetooth protocol data, to the outside world. The protocol data includes at least one of the following: frame header, frame number, channel number, opcode, operation data, register, JSON length, and JSON data.

[0026] The control box verifies each received protocol data. If the verification passes, a communication connection is established with the controllable device. Upon receiving protocol data, the control box first determines whether the device sending the data is the controllable device to be controlled, for example, by checking if the device's parameter information is stored in the device address database. If the device is not the controllable device, the protocol data is discarded. If the device is the controllable device, the protocol data is verified. Verification can be performed by checking if the protocol data matches pre-stored protocol detection data in the control box; if they match, the verification passes.

[0027] S103: When the protocol data passes the data verification, temporary memory is requested according to the preset rules. The temporary memory is used to store temporary running data.

[0028] In a specific implementation scenario, once all received protocol data passes data verification, temporary memory is allocated according to preset rules. This temporary memory is used to store temporary runtime data. The preset rules include selecting the size of the temporary memory based on the number of controllable devices to be controlled or the complexity of the logic controlling the controllable devices. The temporary memory will be released after the operation is completed.

[0029] S104: Obtain the target operating logic, retrieve temporary operating data from the device address database according to the target operating logic, and perform calculations in temporary memory.

[0030] In a specific implementation scenario, the target operating logic is obtained. This target operating logic can be pre-edited by the user and stored in the control box, or it can be edited by the user and transmitted to the control box based on current usage requirements. Temporary operating data is retrieved from the device address database according to the target operating logic and processed in temporary memory. This temporary operating data can be at least the device parameter attribute information of one or more controllable devices.

[0031] S105: After the operation is completed, check the validity of the temporary running data in the temporary memory, and copy the temporary running data that passes the check to the device address database.

[0032] In a specific implementation scenario, after the calculation is completed, the control box's control over the controllable device ends, and temporary memory needs to be released. Before releasing the temporary memory, the validity and completeness of the temporary running data in the temporary memory need to be checked. It is necessary to detect whether the data corresponding to the device parameter attribute information in the temporary running data has changed. If it has changed, the changed device parameter attribute information is copied to the device address database to replace the original device parameter data.

[0033] As described above, in this embodiment, the device address database stores the device parameter attribute information of multiple controllable devices. Temporary operating data is obtained from the device address database according to the target operating logic and processed in temporary memory. This enables one MCU to control the operation of multiple controllable devices, effectively reducing the control cost and manufacturing cost of the control system for multiple controllable devices.

[0034] Please see Figure 3 , Figure 3 This is a flowchart illustrating a second embodiment of the method for controlling the operation of multiple devices provided by the present invention. Figure 3 The steps shown are applied to Figure 2 The equipment control system shown.

[0035] The method for controlling the operation of multiple devices provided by this invention includes the following steps: S201: Check whether the device parameter attribute information of the controllable device is valid.

[0036] In a specific implementation scenario, based on factory settings, customer requirements, and other information, check the validity of the controllable device parameter attribute information stored in the control box. If it is necessary to modify the device parameter attribute information, then modify the corresponding device parameter attribute information in the device attribute list. Please refer to [reference needed]. Figure 4 , Figure 4 This is a schematic diagram of the device attribute list provided by the present invention.

[0037] S202: Build a device address database and build database indexes, which include primary and secondary indexes.

[0038] In a specific implementation scenario, a device address database is established based on a list of device attributes and the dynamic operating parameters of each controllable device. When storing device parameter attribute information in the device address database, a database index is constructed, including a primary index and a secondary index. The primary index indicates the controllable device address flag, represented by a bit variable; the secondary index indicates at least one of the following: device attributes (unique identifier, address, group information), device storage (scenario data), device factory settings (factory setting data), firmware identifier (device firmware data), and extended attributes (device programming data), represented by a data partitioning opcode. In this implementation scenario, the aforementioned device parameter attribute information is converted into strings according to fixed rules and then stored at the corresponding addresses in the device address database based on the primary and secondary indexes. Please refer to [reference needed]. Figure 5 , Figure 5 This is a schematic diagram of the structure of the database index provided by the present invention.

[0039] In subsequent calculations, if it is necessary to use or modify the device parameter attribute information of one or more controllable devices, the corresponding data can be found more quickly by searching the primary and secondary indexes, making the data management of the device address database more convenient and efficient.

[0040] In this implementation scenario, the first-level index uses bit-variable lookup to minimize memory usage. Simultaneously, the bit-variables have built-in sorting capabilities, reducing storage workload. The sequence number represents the virtual address number in the device address database. For example, the first byte represents 8 bits, sorted from 0 to 7, with synchronized virtual address numbers; the second byte represents 8 bits, sorted from 8 to 15, with synchronized virtual address numbers; the 128th byte represents 8 bits, sorted from 1015 to 1023, with synchronized virtual address numbers.

[0041] In this implementation scenario, the secondary index is a data partition opcode, which reduces the number of data traversal queries and speeds up read and write operations. The data partition opcode ranges from 0 to 255, and each opcode can support 0-255 register reads and writes at the backend. The maximum number of bytes in a single device's database is 255. 255 = 65535.

[0042] In other implementation scenarios, if it is necessary to add or delete controllable devices controlled by the control box, the controllable device address flag in the first-level index can be modified and the modification result can be stored in flash memory. After the control box is detected to be powered on and started, the data stored in flash memory is read and the device address database is initialized.

[0043] In other implementation scenarios, if it is necessary to modify the device parameter attribute information of a controllable device, it can be processed based on the data partition opcode of the secondary index. The corresponding data can be modified according to the corresponding data partition opcode + register number (JSON string).

[0044] S203: Establish the runtime sequence of the device address database, and check the device status, primary index, secondary index, and storage address of the controllable device corresponding to the virtual address in the device address database according to the runtime sequence.

[0045] In a specific implementation scenario, the runtime sequence for establishing the device address database is such that the scan interval between the storage addresses corresponding to each controllable device is a minimum of 0.01ms and a maximum of 10ms. The scan is performed sequentially / time-sequentially, continuously monitoring the operating status of the controllable devices. In this implementation scenario, the runtime sequence checks the device status, primary index, secondary index, and storage address containing the device parameter attribute information of the controllable devices corresponding to the virtual addresses in the device address database.

[0046] S204: Receive protocol data sent by at least one controllable device and perform data verification on the protocol data.

[0047] S205: When the protocol data passes the data verification, temporary memory is requested according to the preset rules. The temporary memory is used to store temporary running data.

[0048] S206: Obtain the target operating logic, retrieve temporary operating data from the device address database according to the target operating logic, and perform calculations in temporary memory.

[0049] S207: After the operation is completed, check the validity of the temporary running data in the temporary memory, and copy the temporary running data that passes the check to the device address database.

[0050] In a specific implementation scenario, steps S204-S207 are basically the same as steps S102-S105 of the method for controlling the operation of multiple devices provided by the present invention, and will not be described again here.

[0051] As described above, in this embodiment, the device address database is equipped with a database index, which includes a primary index and a secondary index. The primary index is used to indicate the address flag of the controllable device and is represented by a bit variable. The secondary index is used to indicate at least one of the following: device attributes, device storage, device factory settings, firmware identification code, and extended attributes. It is represented by a data partitioning operation code, which facilitates data management such as adding, deleting, and modifying data in the device address database.

[0052] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of the device for controlling the operation of multiple devices provided by the present invention. The device 20 for controlling the operation of multiple devices is applied to... Figure 2 The equipment control system shown. The device 20 for controlling the operation of multiple devices includes: an initialization module 21, a receiving module 22, a temporary module 23, a calculation module 24, and a storage module 25.

[0053] The initialization module 21 is used to perform initialization operations and build a device address database, which stores device parameter attribute information of multiple controllable devices; the receiving module 22 is used to receive protocol data sent by at least one controllable device and perform data verification on the protocol data; the temporary module 23 is used to request temporary memory according to preset rules when the protocol data passes the data verification, and the temporary memory is used to store temporary running data; the calculation module 24 is used to obtain the target running logic, obtain temporary running data from the device address database according to the target running logic, and perform calculations in the temporary memory; the storage module 25 is used to check the validity of the temporary running data in the temporary memory after the calculation is completed, and copy the temporary running data that passes the check to the device address database.

[0054] The initial module 21 is used to obtain a list of device attributes and dynamic operating parameters of multiple controllable devices, allocate a fixed memory space, and construct a device address database within the fixed memory space based on the list of device attributes and dynamic operating parameters.

[0055] The initial module 21 is used to construct a database index, which includes a primary index and a secondary index. The primary index is used to indicate the address flag of the controllable device and is represented by a bit variable. The secondary index is used to indicate at least one of the following: device attributes, device storage, device factory settings, firmware identification code, and extended attributes, and is represented by a data partition opcode.

[0056] The initial module 21 uses the serial number of the first-level index to represent the number of the virtual address of the controllable device in the device address database; the data partition opcode ranges from 0 to 255, and each data partition opcode can support 0 to 255 register reads and writes.

[0057] The initial module 21 is used to check whether the device parameter attribute information of the controllable device is valid; if so, a device address database is constructed; the runtime sequence of the device address database is established, and the device status, first-level index, second-level index and storage address of the controllable device corresponding to the virtual address in the device address database are checked according to the runtime sequence.

[0058] The initial module 21 is used to modify the controllable device address flag in the first-level index and store it in flash memory. When the control box is detected to be powered on, it reads the data stored in flash memory and initializes the device address database; or it modifies the data corresponding to the data partition opcode according to the data partition opcode and register number.

[0059] The initial module 21 is used to store the controllable devices corresponding to the device parameter attribute information in a device address database, which are devices of the same type.

[0060] As described above, in this embodiment, the device for controlling the operation of multiple devices stores the device parameter attribute information of multiple controllable devices in the device address database. According to the target operation logic, it obtains temporary operation data from the device address database and performs calculations in temporary memory. This enables one MCU to control the operation of multiple controllable devices, effectively reducing the control cost and manufacturing cost of the control system for multiple controllable devices.

[0061] Figure 7 An internal structural diagram of a computer device in one embodiment is shown. This computer device can specifically be a terminal or a server. Figure 7 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and may also store a computer program that, when executed by the processor, enables the processor to implement an age recognition method. The internal memory may also store a computer program that, when executed by the processor, enables the processor to implement the age recognition method. Those skilled in the art will understand that... Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0062] In one embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps described above.

[0063] In one embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, causes the processor to perform the steps described above.

[0064] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.

[0065] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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.

[0066] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for controlling the operation of multiple devices, characterized in that, An application equipment control system is provided, which includes a control box and multiple controllable devices, wherein the control box is capable of communicating with each of the controllable devices. The steps of the method for controlling the operation of multiple devices include: The control box performs an initialization operation to build a device address database. The device address database stores the device parameter attribute information of the multiple controllable devices. The device parameter attribute information of each controllable device is stored at a storage address in the device address database. The control box receives protocol data sent by at least one of the controllable devices and performs data verification on the protocol data; When the protocol data passes the data verification, temporary memory is requested according to preset rules. The temporary memory is used to store temporary running data. Obtain the target operating logic, retrieve the temporary operating data from the device address database according to the target operating logic, and perform calculations in the temporary memory; After the operation is completed, the validity of the temporary running data in the temporary memory is checked, and the temporary running data that passes the check is copied to the device address database; The step of constructing the device address database includes: Obtain the device attribute list and dynamic operating parameters of the multiple controllable devices, allocate a fixed memory space, and construct the device address database within the fixed memory space based on the device attribute list and the dynamic operating parameters; Construct a database index, which includes a primary index and a secondary index; The primary index is used to indicate the address flag of the controllable device and is represented by a bit variable; The secondary index is used to indicate at least one of the following: device attributes, device storage, device factory settings, firmware identification code, and extended attributes, and is represented by a data partition opcode.

2. The method for controlling the operation of multiple devices according to claim 1, characterized in that, The steps for constructing the database index include: The serial number of the primary index represents the number of the virtual address of the controllable device in the device address database; The data partitioning opcode ranges from 0 to 255, and each data partitioning opcode can support 0 to 255 register reads and writes.

3. The method for controlling the operation of multiple devices according to claim 1, characterized in that, The initialization steps of the control box include: Check whether the device parameter attribute information of the controllable device is valid; If so, then construct the device address database; The runtime sequence for establishing the device address database is used to check the device status of the controllable device corresponding to the virtual address in the device address database, the first-level index, the second-level index, and the storage address storing the device parameter attribute information of the controllable device.

4. The method for controlling the operation of multiple devices according to claim 3, characterized in that, After the step of constructing the device address database, the following steps are included: Modify the controllable device address flag in the primary index and store it in flash memory. When the control box is detected to be powered on, read the data stored in the flash memory and initialize the device address database; or The data corresponding to the data partition opcode is modified according to the data partition opcode and the register number.

5. The method for controlling the operation of multiple devices according to claim 1, characterized in that, The controllable devices corresponding to the device parameter attribute information stored in the device address database are of the same type.

6. A device for controlling the operation of multiple devices, characterized in that, An application equipment control system is provided, which includes a control box and multiple controllable devices, wherein the control box is capable of communicating with each of the controllable devices. The device for controlling the operation of multiple devices includes: The initial module is used to perform initialization operations and build a device address database, which stores the device parameter attribute information of the multiple controllable devices; A receiving module is configured to receive protocol data sent by at least one of the controllable devices and to perform data verification on the protocol data; A temporary module is used to request temporary memory according to preset rules when the protocol data passes the data verification. The temporary memory is used to store temporary running data. The computation module is used to obtain the target running logic, retrieve the temporary running data from the device address database according to the target running logic, and perform computation in the temporary memory; The storage module is used to check the validity of the temporary running data in the temporary memory after the operation is completed, and copy the temporary running data that passes the check to the device address database; The step of constructing the device address database includes: Obtain the device attribute list and dynamic operating parameters of the multiple controllable devices, allocate a fixed memory space, and construct the device address database within the fixed memory space based on the device attribute list and the dynamic operating parameters; Construct a database index, which includes a primary index and a secondary index; The primary index is used to indicate the address flag of the controllable device and is represented by a bit variable; The secondary index is used to indicate at least one of the following: device attributes, device storage, device factory settings, firmware identification code, and extended attributes, and is represented by a data partition opcode.

7. A computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the steps of the method as claimed in any one of claims 1 to 5.

8. A control device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method as claimed in any one of claims 1 to 5.

Citation Information

Patent Citations

  • B+ tree index-based data update method and apparatus, and storage device

    CN109690522A

  • Internet of Things equipment management method and system using memory data model

    CN113542390A