Device control method, system, device, and storage medium
By including status flags in status reporting messages or utilizing multi-control group status record data, the problem of cyclic execution of multi-control group devices in weak network environments was solved, achieving stable control of multi-control group devices and improving user experience and device stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-26
- Publication Date
- 2026-03-20
AI Technical Summary
In weak network environments, the control of multi-control group equipment suffers from the problem of cyclical switching of equipment, resulting in poor user experience and equipment stability.
By including a status flag in the status reporting message, it can be distinguished whether the device status change is triggered by user operation or by a control command issued by the server. If it is triggered by a control command issued by the server, no status change command will be issued to the other devices in the multi-control group. For devices that do not support status flags, the status record data of the multi-control group is used for synchronous control.
This reduces the cyclic execution of multi-control group devices, ensures stable control under weak network conditions, and improves user experience and device stability.
Smart Images

Figure CN121217776B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to a device control method, system, device and storage medium. BACKGROUND
[0002] With the continuous progress of Internet of Things technology, smart home is increasingly popular. In actual application, users often need to associate and control multiple devices to achieve the effect of synchronous switching.
[0003] Taking device switching as an example, in the control process of a conventional multi-control group, the last switching state of the multi-control group is recorded. When receiving a device state report inconsistent with the last switching state, a command to change the state is sent to other devices in the multi-control group. This operation is normal when the network delay is low, but when the network delay is high, multiple device switching cycles will be executed. SUMMARY
[0004] The present application provides a device control method, system, device and storage medium, which can solve the problem of multiple control group device cycle execution, and further ensure stable control of multiple control group devices under weak network conditions.
[0005] To solve the above technical problems, one technical solution adopted by the present application is to provide a device control method, which comprises: detecting whether a state flag bit is carried in a currently received reporting state message; wherein the reporting state message is reported by a message reporting device in a multi-control device group, and the state flag bit is used to indicate whether the reporting of the reporting state message is triggered by a control command issued by a server; in response to the reporting state message carrying the state flag bit, and the state flag bit indicating that the reporting state message is triggered by the control command, no state change command is issued to the remaining devices in the multi-control device group.
[0006] To solve the above technical problems, another technical solution adopted by the present application is to provide a control system, which comprises a multi-control device group and a server; the multi-control device group comprises multiple devices, and the multi-control device group and the server are in communication connection, and the server is used to execute the above method.
[0007] To solve the above technical problems, still another technical solution adopted by the present application is to provide an electronic device, comprising a memory and a processor coupled to each other, the memory storing program instructions; the processor is used to execute the program instructions stored in the memory to realize the above method.
[0008] To solve the above technical problems, still another technical solution adopted by the present application is to provide a computer readable storage medium for storing program instructions, which can be executed to realize the above method.
[0009] The above scheme, if the current received report state message with the state flag bit is detected, and the state flag bit indicates that the report state message is triggered by the control command issued by the server, no state change command is issued to the remaining devices in the multi-control group. Compared with the way of receiving the device state report inconsistent with the last switch state, the state change command is sent to the other devices in the multi-control group. The application does not respond to the state report triggered by the control command issued by the server. The way can reduce the cyclic execution of the multi-control group device, and further ensure the stable control of the multi-control group device under weak network condition. BRIEF DESCRIPTION OF DRAWINGS
[0010] Figure 1 is a flowchart of an embodiment of the device control method provided by the application;
[0011] Figure 2 is a flowchart of another embodiment of the device control method provided by the application;
[0012] Figure 3 is a flowchart of an embodiment of the device control system provided by the application;
[0013] Figure 4 is a framework diagram of an embodiment of the electronic device provided by the application;
[0014] Figure 5 is a framework diagram of the computer readable storage medium provided by the application. DETAILED DESCRIPTION
[0015] In order to make the purpose, technical scheme and effect of the application more clear and explicit, the application is further described in detail below with reference to the drawings and embodiments.
[0016] In addition, if the description of "first", "second" and the like is involved in the embodiments of the application, the description of "first", "second" and the like is only for the purpose of description, and cannot be understood as indicating or implying the relative importance of the technical features indicated or the number of the technical features indicated. Therefore, the features limited by "first", "second" can be explicitly or implicitly included at least one of the features. In addition, the technical solutions of each embodiment can be combined with each other, but it must be based on the realization of ordinary skilled in the art. When the combination of technical solutions appears contradictory or unachievable, it should be considered that the combination of technical solutions does not exist, and is not within the protection scope required by the application.
[0017] It should be noted that the control method of a general multi-control group (multi-control device group in this paper) is to record the last switch state of the multi-control group, and when receiving a device state report inconsistent with the last switch state, a command to change the state is sent to other devices in the multi-control group. This operation is normal when the network delay is low, and problems will occur when the network delay is high.
[0018] As shown in the following table, assume there are two switches: A, B. When the network delay is high (i.e. in a weak network environment), the user turns on switch A and then turns off switch A immediately. According to the switch state reported by the device, the cloud issues a corresponding command to switch B to ensure that the states of switch A and switch B are consistent.
[0019]
[0020] At this point, switches A and B execute the received command in a loop until the delay is reduced to break the loop. If the number of devices in the multi-control group increases, the timing will be more complex and more likely to trigger a loop execution. Even if the delay is reduced to terminate the loop, the user will still find that a limited number of operations will cause many device controls.
[0021] As can be seen, in the prior art, the multi-control group control based on the cloud has problems such as control command loop, device frequent triggering, etc. in a weak network high delay environment, which seriously affects the user experience and device stability.
[0022] Among them, the inventors found that the main reason for the above-mentioned loop control command problem is that it is impossible to distinguish whether the device state report is triggered by user operation or by control command issued by the server, thereby causing each device state report to trigger a new control command, and ultimately causing the command to be executed in a loop.
[0023] To solve this problem, the inventors creatively provide a solution, which can set each device to carry a state flag bit in the message body when reporting the message, and use the state flag bit to indicate whether the message reporting behavior is triggered by the control command issued by the server; if the state flag bit indicates that the message reporting behavior is triggered by the control command issued by the server, the message is ignored, and the change of the multi-control group state is not triggered, i.e. no state change command is issued to other devices in the multi-control group.
[0024] It should be noted that the method is applicable to devices supporting the function of adding a state flag bit in the reported information, and is not applicable to devices not supporting the state flag bit function. In order to solve the problem of the above-mentioned cyclic execution command of the device not supporting the state flag bit function, the inventor also proposes a synchronization mechanism for the state of a multi-control group device based on state record data. After obtaining the reported state message of the device, the state of the device carried in the message is checked according to the state record data of the multi-control group, and then according to the checking result, it is determined whether to issue a state change command to the remaining devices in the multi-control device group. Specifically:
[0025] Please refer to Figure 1 , Figure 1 is a flowchart of an embodiment of the device control method provided by the present application. It should be noted that the present embodiment is not limited to the order of the flowchart shown in Figure 1 . As shown in Figure 1 , the present embodiment includes:
[0026] S11: detecting whether the current received reported state message carries a state flag bit; wherein the reported state message is reported by a message reporting device in a multi-control device group, and the state flag bit is used to indicate whether the reporting of the reported state message is triggered by a control command issued by a server.
[0027] It should be noted that the device control method of the present embodiment is used for synchronously controlling the states of multiple devices in a multi-control group.
[0028] The multi-control device group (referred to as multi-control group) includes multiple devices that need to be synchronously controlled. In addition, the control command issued by the server and the manual operation of the user can both trigger the change of the state of the device in the multi-control group.
[0029] S12: in response to the reported state message carrying the state flag bit and the state flag bit indicating that the reported state message is triggered by the control command, no state change command is issued to the remaining devices in the multi-control device group.
[0030] In the present embodiment, if the reported state message carries the state flag bit and the state flag bit indicates that the reported state message is triggered by the control command issued by the server, the message is ignored and the change of the state of the multi-control group is not triggered, that is, no state change command is issued to the other devices in the multi-control group. That is, even if the reported state message of the device is received, if the message reporting is triggered by the control command issued by the server, no state change command is issued to the remaining devices in the multi-control device group, so that the cyclic control command can be avoided.
[0031] In an embodiment, if the received report state message carries a state flag bit, and the state flag bit indicates that the report of the report state message is not triggered by the control command issued by the server, it means that the report state message is triggered by user operation, at this time, a state change command can be issued to the remaining devices in the multi-control device group, so that the device states of the remaining devices are consistent with the current report state of the message reporting device.
[0032] It should be noted that the device is the report state message reported after the state change, and the report state message reported by the message reporting device includes the current report state of the message reporting device. In an embodiment, after determining that the report state message is triggered by user operation, it is further determined whether the current report state of the message reporting device is consistent with the current target state of the multi-control device group; in response to the current report state being inconsistent with the target state, the target state is updated to the current report state of the message reporting device; and a corresponding state change command is issued to the remaining devices in the multi-control device group.
[0033] For example, as shown in the following table, after the user turns on switch A and then turns off switch A, at T3, the cloud receives the opening message of device A, and compares the current opening state with the current target state of the multi-control group (the switch A at T2 is in the closed state). The target state is updated to open, and a corresponding state change command is issued to the remaining devices in the multi-control device group, so that the state of the remaining devices (switch B in the table) is open.
[0034]
[0035] Of course, in some embodiments, after receiving the report state message, it is also necessary to determine the multi-control group associated with the message reporting device, so as to determine whether a state change command needs to be issued to the remaining devices of the multi-control group according to the report state message.
[0036] In some implementation scenarios, the message reporting device does not support the state flag bit function, for such devices, the corresponding state record data of the multi-control device group can be used for control. Specifically:
[0037] Please refer to Figure 2 , Figure 2 is a flowchart of another embodiment of the device control method provided by the present application. The embodiment includes:
[0038] S21: in response to the state reporting message not carrying the state flag bit, checking the state record data of the multi-control device group based on the state reporting message to obtain a checking result of the state record data; wherein the state record data is used to record at least one state data group, and the state data group comprises: a change timestamp of an expected state of the multi-control device group, a corresponding expected state, and a first consistency result of each device in the multi-control device group, wherein the first consistency result is used to represent whether the historical state of the corresponding device is consistent with the expected state.
[0039] In the embodiment, before checking whether the target state data group exists in each state data group based on the state reporting message, the multi-control device group to which the message reporting device belongs needs to be obtained, and the state record data of the multi-control device group needs to be obtained.
[0040] In an embodiment, the data of each state data group in the state record data is recorded and arranged in chronological order of the change timestamp in each state data group, and the change timestamp of the most recent state data group is later than that of the other state data groups.
[0041] In a specific implementation scenario, the state record data is a state record table. The data recorded in the state record data of the multi-control group can refer to the following table, wherein each row in the table corresponds to a state data group, and the change timestamp of the most recent state data group (the last row) is later than that of the other state data groups:
[0042]
[0043] The following describes how to check the state record data of the multi-control device group based on the state reporting message to obtain a checking result of the state record data.
[0044] In the embodiment, based on the current reporting state of the message reporting device, it is checked whether the target state data group exists in each state data group to obtain a corresponding checking result; wherein the target state data group is the first state data group with the earliest change timestamp in all the first state data groups, the expected state of each first state data group is consistent with the current reporting state, and the first consistency result corresponding to the message reporting device represents that the historical state of the message reporting device is inconsistent with the expected state.
[0045] It can be understood that the present checking is to check whether the first state data group with the earliest change timestamp exists in each first state data group in the current state record data, wherein the expected state of the first state data group is consistent with the current reporting state, and the first consistency result corresponding to the message reporting device is inconsistent.
[0046] Then, based on the checking result, it is determined whether to issue a state change command to the remaining devices in the multi-control device group.
[0047] In some embodiments, the target state data group can be searched in each state data group in order of the change time stamp from recent to remote, and a corresponding checking result can be obtained.
[0048] In an embodiment, all first state data groups can be searched in each state data group in order of the change time stamp from recent to remote, and the first state data group with the earliest change time stamp in all the first state data groups can be taken as the target state data group.
[0049] Taking the state record data as the state record table as an example, the state record table is arranged in order of the change time stamp, and each row in the table corresponds to a state data group. In this embodiment, the last row of the table can be scanned upwards, the line (first candidate line) with the same expected state and current reported state can be searched from the table based on the current reported state, then the line (second candidate line) with the first consistency result of the message reporting device being inconsistent can be searched from the first candidate lines, then the second candidate line with the earliest change time stamp can be searched from the second candidate lines as the target line, and the state data group corresponding to the target line is the target state data group.
[0050] Alternatively, the line with the same expected state and current reported state but the first consistency result of the message reporting device being inconsistent can be directly searched from the table as the first state data group, and the first state data group with the earliest change time stamp in each first state data group can be taken as the target state data group.
[0051] In another embodiment, each state data group can be searched in order of the change time stamp from recent to remote until a second state data group meeting the requirement is found, the second state data group is taken as the search starting point, and the search is performed in the direction of the change time stamp later than the second state data group until a state data group with the same expected state as the expected state of the second state data group is found and taken as the target state data group, wherein the expected state of the second state data group is consistent with the current reported state, and the first consistency result of the message reporting device indicates that the historical state of the message reporting device is consistent with the expected state.
[0052] Continuing the above example of the state record table, in this embodiment, the last row of the table can be scanned upwards, the line (third candidate line) with the same expected state and current reported state and the first consistency result of the message reporting device indicating that the historical state of the message reporting device is consistent with the expected state can be searched from the table based on the current reported state, then the third candidate line is taken as the search starting point, and the search is performed downwards until a fourth candidate line with the same expected state as the expected state of the third candidate line is found and taken as the target line, wherein the state data group corresponding to the target line is the target state data group.
[0053] S22: determining whether to issue a state change command to the remaining devices in the multi-control device group based on the checking result.
[0054] It can be understood that the checking result of the target state data group includes two cases: the target state data group exists, and the target state data group does not exist.
[0055] In this embodiment, if the checking result indicates that the target state data group exists, the first consistency result of the message reporting device in the target state data group is modified to consistent based on the current reported state.
[0056] In this embodiment, only the modification of the first consistency result is performed, and no other operation is performed. It can be understood that in this embodiment, even if the message reported by the message reporting device is received, no state change command is issued to other devices.
[0057] If the checking result indicates that the target state data group does not exist, the second consistency result is obtained, and based on the second consistency result, it is determined whether to issue a state change command to the remaining devices; wherein the second consistency result is used to indicate whether the expected state of the latest state data group and the current reported state are consistent, and the change timestamp corresponding to the latest state data group is later than that of other state data groups.
[0058] In a specific embodiment, if the second consistency result indicates that the expected state of the latest state data group and the current reported state are consistent, no state change command is issued to the remaining devices; if the second consistency result indicates that the expected state of the latest state data group and the current reported state are inconsistent, a state data group is added to the state record data, and a state change command is issued to the remaining devices, so that the changed state of the remaining devices is consistent with the expected state of the added state data group; wherein the change timestamp of the added state data group is the adding time of the state data group, and the corresponding expected state is the current reported state.
[0059] For example, if there is no row in the state record table that the expected state and the current reported state are consistent, and the first consistency result of the message reporting device is inconsistent, it is determined whether the current reported state and the expected state of the last row in the state record table are consistent, if consistent, no state change command is issued, and the reported state message is completely ignored; but if inconsistent, a row is added to the state record table, the change timestamp in the row is the adding time of the row, the expected state is the current reported state, and in the process of adding the row, a state change command is issued to the remaining devices, so that the changed state of the remaining devices is consistent with the expected state of the added state data group.
[0060] It should be noted that for each change timestamp, the expected state of the multi-control group is triggered by part of the devices in the multi-control group, for example, triggered by the message reported by device A, at this time device B may not have performed the corresponding state change operation, that is, device B has not performed message reporting, in this case, the first consistency result of device B can be recorded as inconsistent, and subsequently, after receiving the reporting message of device B, whether the first consistency result of device B needs to be modified to consistent can be determined according to the reporting message of device B.
[0061] In order to facilitate understanding of the present application, the following explains how to perform state synchronization control of the multi-control group device based on the state record data and the reporting state message reported by the message reporting device according to the table and specific embodiments:
[0062] In an embodiment, it is assumed that device A reports a switch opening message, the expected state of the multi-control group is changed to "on", and the state record table of the multi-control group is recorded as follows:
[0063]
[0064] If device A reports a switch closing message again, since all the first consistency results of device A in the table are consistent, and the current target state of the multi-control group is "on", the multi-control group controller will update the target state to "off", issue a closing command to device B, and add a new row in the state record table:
[0065]
[0066] After device B receives the command at T1, the state is changed and reported. After the system receives the switch opening message reported by device B, it is detected that there is a row with inconsistent first consistency result of device B, and then only the first consistency result of device B at T1 is modified to "consistent", the expected state of the multi-control group is not changed, and no command is issued:
[0067]
[0068] After device B receives the command at T2, the state is changed and reported. After the system receives the switch closing message reported by device B, it is detected that there is a row with inconsistent first consistency result of device B, and only the first consistency result of device B at T2 is modified to consistent, the target state of the multi-control group is not changed, and no command is issued:
[0069]
[0070] It should be noted that the device control method provided in the present application can be executed by a server or one of the devices in the multi-control group.
[0071] The above scheme, if it is detected that the current received reporting state message carries the state flag bit, and the state flag bit indicates that the reporting state message is triggered by the control command issued by the server, no state change command is issued to the remaining devices in the multi-control group. Compared with the way of sending a state change command to other devices in the multi-control group when receiving a device state report inconsistent with the last switch state, the way of not responding to the state report triggered by the control command issued by the server can reduce the cyclic execution of the multi-control group devices, thereby ensuring stable control of the multi-control group devices under weak network conditions.
[0072] Referring to Figure 3 , Figure 3 is a flowchart of an embodiment of the device control system provided by the present application. In this embodiment, the device control system 30 includes a multi-control device group 31 and a server 32. The multi-control device group 31 is in communication connection with the server 32, and the server is configured to execute the device control method of any of the above embodiments.
[0073] Referring to Figure 4 , Figure 4 is a block diagram of an embodiment of the electronic device provided by the present application. In this embodiment, the electronic device 40 includes a memory 41 and a processor 42 coupled to each other.
[0074] The memory 41 stores program instructions, and the processor 42 is configured to execute the program instructions stored in the memory 41 to implement the steps of any of the above method embodiments. In a specific implementation scenario, the electronic device 40 can include but is not limited to a microcomputer, a server, and in addition, the electronic device 40 can also include a notebook computer, a tablet computer, and the like, without limitation.
[0075] Specifically, the processor 42 is configured to control itself and the memory 41 to implement the steps of any of the above embodiments. The processor 42 can also be referred to as a CPU (Central Processing Unit). The processor 42 can be an integrated circuit chip with signal processing capability. The processor 42 can also be a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. In addition, the processor 42 can be implemented by an integrated circuit chip.
[0076] Referring to Figure 5 , Figure 5 is a schematic diagram of the framework of the computer readable storage medium provided by the present application. The computer readable storage medium 50 of the embodiments of the present application stores program instructions 51, which, when executed, implement the method provided by any embodiment of the above method and any non-conflicting combination. Among them, the program instructions 51 can form a program file and be stored in the above computer readable storage medium 50 in the form of a software product, so that a computer device (which can be a personal computer, a server, or a network device, etc.) executes all or part of the steps of the method of each embodiment of the present application. The aforementioned computer readable storage medium 50 includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes, or a computer, a server, a mobile phone, a tablet, and other terminal devices.
[0077] The above scheme, if it is detected that the current received reporting state message carries the state flag bit, and the state flag bit indicates that the reporting state message is triggered by the control command issued by the server, no state change command is issued to the remaining devices in the multi-control group. Compared with the way of sending a state change command to other devices in the multi-control group when receiving a device state report inconsistent with the last switch state, the way of not responding to the state report triggered by the control command issued by the server can reduce the cyclic execution of the multi-control group devices, and further ensure the stable control of the multi-control group devices under weak network conditions.
[0078] In some embodiments, the apparatus provided by the embodiments of the present disclosure has functions or includes modules that can be used to execute the methods described in the above method embodiment descriptions, and the specific implementation can refer to the descriptions of the above method embodiments. For the sake of brevity, they will not be described here.
[0079] The above description of each embodiment tends to emphasize the differences between each embodiment, and the same or similar parts can be mutually referred to. For the sake of brevity, they will not be described here.
[0080] In several embodiments provided in the present application, it should be understood that the disclosed methods and apparatuses can be implemented in other manners. For example, the division of the apparatus embodiments is merely an example, and the division of the modules or units can be different, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections can be indirect couplings or communication connections through some interfaces, devices or units, and can be in electrical, mechanical or other forms.
[0081] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they can be located in one place or distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the present embodiment.
[0082] In addition, the functional units in each embodiment of the present application can be integrated into a processing unit, or each unit can be physically present separately, or two or more units can be integrated into one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0083] If the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for making a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) execute all or part of the steps of the methods of the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0084] The above description is merely an embodiment of the present application, and does not limit the patent scope of the present application, and any equivalent structure or equivalent process transformation using the contents of the present application specification and drawings, or direct or indirect application in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A device control method, characterized in that, The method includes: Detect whether the currently received reporting status message contains a status flag bit; wherein, the reporting status message is reported by the message reporting device in the multi-control device group, and the status flag bit is used to indicate whether the reporting of the reporting status message is triggered by a control command issued by the server; the reporting status message includes the current reporting status of the message reporting device; In response to the status flag bit in the reported status message, and the status flag bit indicating that the reported status message was triggered by the control command, no status change command is sent to the other devices in the multi-control device group; In response to the absence of the status flag in the reported status message, the status record data of the multi-control device group is checked based on the reported status message to obtain the check result of the status record data; based on the check result, it is determined whether to issue a status change command to the remaining devices in the multi-control device group; wherein, the status record data is used to record at least one status data group, the status data group including: the change timestamp of the expected status of the multi-control device group, the corresponding expected status, and the first consistency result of each device in the multi-control device group, the first consistency result being used to characterize whether the historical status of the corresponding device is consistent with the expected status; The step of determining whether to issue a status change command to the remaining devices in the multi-control device group based on the inspection results includes: If the inspection result indicates the existence of a target state data group, based on the current reported state, the first consistency result of the message reporting device in the target state data group is modified to be consistent, and no state change command is issued to the other devices; the target state data group is the first state data group with the earliest change timestamp among all first state data groups, the expected state of each first state data group is consistent with the current reported state, and the first consistency result corresponding to the message reporting device indicates that the historical state of the message reporting device is inconsistent with the expected state.
2. The method according to claim 1, characterized in that, The reporting status message includes the current reporting status of the message reporting device; The method further includes: In response to the status flag being present in the reported status message, and the status flag indicating that the reporting of the reported status message was not triggered by the control command, a status change command is issued to the remaining devices in the multi-control device group so that the device status of the remaining devices is consistent with the current reported status of the message reporting device.
3. The method according to claim 2, characterized in that, The step of issuing status change commands to the remaining devices in the multi-control device group includes: Determine whether the current reporting status of the message reporting device and the current target status of the multi-control device group are consistent; In response to the inconsistency between the current reporting status and the target status, the target status is updated to the current reporting status of the message reporting device; Send the corresponding status change command to the other devices in the multi-control device group.
4. The method according to claim 1, characterized in that, The step of checking the status record data of the multi-control device group based on the reported status message to obtain the check result of the status record data includes: Based on the current reporting status of the message reporting device, check whether the target status data group exists in each of the status data groups, and obtain the corresponding check results.
5. The method according to claim 4, characterized in that, The step of determining whether to issue a status change command to the remaining devices in the multi-control device group based on the inspection results further includes: If the inspection result indicates that the target state data group does not exist, a second consistency result is obtained, and based on the second consistency result, it is determined whether to issue a state change command to the remaining devices; wherein, the second consistency result is used to indicate whether the expected state of the most recent state data group is consistent with the currently reported state, and the change timestamp corresponding to the most recent state data group is later than that of other state data groups.
6. The method according to claim 5, characterized in that, The step of determining whether to issue a state change command to the remaining devices based on the second consistency result includes: In response to the second consistency result indicating that the expected state of the most recent state data group is consistent with the currently reported state, no state change command is issued to the other devices; In response to the second consistency result indicating that the expected state of the most recent state data group is inconsistent with the current reported state, a new state data group is added to the state record data, and a state change command is issued to the other devices so that the changed state of the other devices is consistent with the expected state of the newly added state data group; wherein, the change timestamp of the newly added state data group is the time when the state data group was added, and the corresponding expected state is the current reported state.
7. The method according to claim 4, characterized in that, Based on the current reporting status of the message reporting device, the process of checking whether a target status data group exists in each of the status data groups and obtaining the corresponding check results includes: According to the change timestamps of each state data group in ascending order, check whether the target state data group exists in each state data group, and obtain the corresponding check results.
8. The method according to claim 4 or 7, characterized in that, The status record data is a status record table; And / or, before checking whether a target state data group exists in each of the state data groups based on the current reporting status of the message reporting device, the method further includes: obtaining the multi-control device group to which the message reporting device belongs, and obtaining the state record data of the multi-control device group; the data of each state data group in the state record data is arranged in chronological order of the change timestamps in each state data group, and the change timestamp of the most recent state data group is later than that of other state data groups; and, checking whether a target state data group exists in each of the state data groups based on the current reporting status of the message reporting device includes: checking each state data group in chronological order of the change timestamps from most recent to oldest, and finding all the first state data groups. The system firstly selects the first state data group with the earliest change timestamp among all first state data groups as the target state data group; or, it checks each state data group in ascending order of change timestamps until a second state data group that meets the requirements is found; using the second state data group as the starting point, it searches in the direction of change timestamps later than the second state data group until a state data group whose expected state is consistent with the expected state of the second state data group is found, and this is taken as the target state data group; wherein, the expected state of the second state data group is consistent with the current reported state, and the first consistency result corresponding to the message reporting device indicates that the historical state of the message reporting device is consistent with the expected state.
9. A control system, characterized in that, The system includes a multi-control device group and a server; the multi-control device group includes multiple devices, the multi-control device group and the server are communicatively connected, and the server is used to execute the method according to any one of claims 1-8.
10. An electronic device, characterized in that, Including interconnected memory and processor, The memory stores program instructions; The processor is used to execute program instructions stored in the memory to implement the method according to any one of claims 1-8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program instructions that can be executed by a processor to implement the method of any one of claims 1-8.
Citation Information
Patent Citations
Equipment state display method, system and device and electronic equipment
CN114679347A
Control instruction issuing method and device, storage medium and electronic equipment
CN116136775A