Control method for control synchronization of master control equipment and slave control equipment

By real-time synchronization of control actions and feedback between master and slave control devices, and using a finite state machine to update the device status, the problem of insufficient control synchronization capabilities of multi-control terminals is solved, task and state consistency of multiple terminals is achieved, and collaborative control and seamless switching are supported.

CN120103692APending Publication Date: 2025-06-06BEIJING MECHANICAL EQUIP INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311643975.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-04
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

The existing multi-control terminals have insufficient control synchronization capabilities, resulting in inconsistent operation and status, and it is impossible to achieve seamless access to dual local control or remote control.

Method used

By real-time synchronization of manipulation actions and feedback between the master control device and the slave control device, the device status is updated using a finite state machine, and synchronize data and response data through a unified data format and random code association, ensuring task and state consistency of multiple terminals.

Benefits of technology

It realizes task and status consistency between multi-terminal control devices, supports coordinated control of both parties or multi-party control devices, ensures seamless switching of control permissions and high-quality switching, and solves the problem of operation and status synchronization in redundant control of multi-terminals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120103692A_ABST
    Figure CN120103692A_ABST
Patent Text Reader

Abstract

The invention relates to a control method for control synchronization of master and slave control equipment, belongs to the technical field of cooperative control, and solves the problem of inconsistent operation and state caused by insufficient control synchronization capability of existing multiple control terminals. The master controller converts the control action into a command, sends the command to the controlled device, converts the command into first synchronization data, sends the first synchronization data to the slave control device, and receives first response data returned by the slave control device to complete synchronization; an execution result returned by the controlled equipment is converted into control feedback to be displayed on an interface, meanwhile, the control feedback is converted into second synchronization data to be sent to the slave control equipment, and first response data returned by the slave control equipment is received to complete synchronization; the slave control equipment converts the first synchronous data into a command for the controlled equipment, adds a random code, and returns the command as first response data to the master control equipment; and converting the second synchronous data into control feedback, adding a random code, and returning the control feedback as second response data to the main control equipment. And cooperative control and seamless switching are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of collaborative control technology, and in particular to a control method for synchronous manipulation of master and slave control devices. Background Art

[0002] Multi-device control synchronization technology is an important branch of the field of automated control technology. Especially in the application scenario of multi-device collaborative control under human-in-the-loop, control synchronization technology determines the fundamental properties of control coordination and consistency.

[0003] At present, the technical approaches for control synchronization mainly include two methods: capturing and compressing images of the control interface and streaming screen recorded videos. However, the other control device as the receiving end can only play a monitoring role and cannot achieve seamless access to control tasks.

[0004] For systems that require both remote control and local control or dual local control, since the control objects of multiple control devices are the same, in order to ensure control coordination, the control devices must have the ability to synchronize control and be compatible with both real-time synchronization and anytime synchronization. However, the existing single-direction interface synchronization technology cannot solve this problem. Summary of the invention

[0005] In view of the above analysis, an embodiment of the present invention aims to provide a control method for synchronous control of master and slave control devices, so as to solve the problem of inconsistent operation and status caused by insufficient control synchronization capability of existing multiple control terminals.

[0006] On the one hand, an embodiment of the present invention provides a control method for master control device manipulation synchronization, comprising the following steps:

[0007] Set control actions through the human-computer interaction interface;

[0008] When the manipulation action is determined to be legal, the manipulation action is converted into a command, the command is packaged into a communication message and sent to the controlled device, and the manipulation action is converted into first synchronization data and sent to the slave control device, and the first response data returned from the slave control device is received to complete the synchronization of the manipulation action;

[0009] Receive the execution result returned by the controlled device, convert the execution result into control feedback and display it on the human-computer interaction interface, convert the execution result into second synchronization data and send it to the slave control device, and receive the first response data returned from the slave control device to complete the control feedback synchronization.

[0010] Based on the further improvement of the above method, the main control device has a built-in finite state machine, which updates its own state according to the control action and execution result to promote the flow of business processes; the main control device writes each operation step into the log in chronological order.

[0011] Based on further improvements to the above method, manipulation actions, commands, execution results, manipulation feedback, synchronization data and response data have a unified data format.

[0012] Based on the further improvement of the above method, the data format includes a subject and an attribute list, wherein the subject is obtained by concatenating the sender device, the subject type and the subject attribute according to a preset separator; the attribute list stores the attribute name and the attribute value in the form of a key-value pair; the subject type includes commands and feedback; different subject types correspond to different subject attributes.

[0013] Based on the further improvement of the above method, when converting the command into the first synchronization data and converting the execution result into the second synchronization data, a random code is added to the attribute list in the form of a key-value pair for associating with the corresponding first response data and second response data respectively.

[0014] On the other hand, an embodiment of the present invention provides a control method for controlling synchronization from a control device, comprising the following steps:

[0015] receiving first synchronization data sent by the main control device, extracting a first random code, converting the first synchronization data into a command to the controlled device, and adding the first random code to return the command as first response data to the main control device;

[0016] Receive the second synchronization data sent by the main control device, extract the second random code, convert the second synchronization data into control feedback, add the second random code and return it to the main control device as the second response data, and display the control feedback on the human-computer interaction interface.

[0017] Based on the further improvement of the above method, the slave control device has a built-in finite state machine, which updates its own state according to commands and control feedback to promote the flow of business processes; the slave control device writes each operation step into the log in chronological order.

[0018] Based on the further improvement of the above method, when the slave control device switches to the new master control device, the last response data is read from the log and sent to the original master control device. The original master control device obtains the control action and execution result to be synchronized from the log according to the response data, converts them into the third synchronization data and the fourth synchronization data respectively, and then sends them to the new master control device in sequence. The new master control device updates its own state according to the control action in the third synchronization data and the execution result in the fourth synchronization data, and converts the fourth synchronization data into control feedback and displays it on the human-computer interaction interface.

[0019] Based on the further improvement of the above method, the original master control device obtains the control action and execution result to be synchronized from the log according to the response data, including:

[0020] If there is response data in the log of the original master control device, all control actions and execution results after the corresponding time of the response data are obtained; otherwise, all control actions and execution results after the original master control device is currently powered on are obtained.

[0021] Based on the further improvement of the above method, when the slave control device switches to the new master control device, when the new master control device does not receive any synchronization data for more than 1 second, or the timestamp in any synchronization data differs from the time when the switch to the new master control device by more than 100 milliseconds, the new master control device completes the synchronization.

[0022] Compared with the prior art, the present invention can achieve at least one of the following beneficial effects: the master control device converts the control action and control feedback into different synchronization data in real time during the process of controlling the controlled device and sends it to the slave control device, reasonably organizes the data synchronization process, and associates the synchronization data of the master control device and the response data of the slave control device through the same random code, so that the task and state consistency is maintained between the control devices of multiple terminals. The slave control device has seamless access to the control task, and is compatible with both real-time synchronization and synchronization at any time. It effectively supports the coordinated control of the controlled device by two or more control devices, ensures seamless switching and high-quality switching of control authority, and solves the operation and state synchronization problems in multi-terminal redundant control.

[0023] In the present invention, the above-mentioned technical solutions can also be combined with each other to achieve more preferred combination solutions. Other features and advantages of the present invention will be described in the subsequent description, and some advantages can become obvious from the description, or can be understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained through the contents particularly pointed out in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The drawings are only for the purpose of illustrating particular embodiments and are not to be considered limiting of the present invention. Like reference symbols denote like components throughout the drawings.

[0025] Figure 1 This is a flow chart of a control method for controlling synchronization of a main control device in Embodiment 1 of the present invention;

[0026] Figure 2 This is a flow chart of a control method for controlling synchronization from a control device in Embodiment 2 of the present invention. DETAILED DESCRIPTION

[0027] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not used to limit the scope of the present invention.

[0028] Example 1

[0029] A specific embodiment of the present invention discloses a control method for controlling synchronization of a main control device, such as Figure 1 As shown, the following steps are included:

[0030] S11. Setting the control action through the human-computer interaction interface;

[0031] S12, when the manipulation action is determined to be legal, converting the manipulation action into a command, packaging the command into a communication message and sending it to the controlled device, converting the manipulation action into first synchronization data and sending it to the slave control device, and receiving first response data returned from the slave control device, thereby completing the synchronization of the manipulation action;

[0032] S13, receiving the execution result returned by the controlled device, converting the execution result into control feedback and displaying it on the human-computer interaction interface, converting the execution result into second synchronization data and sending it to the slave control device, and receiving the first response data returned from the slave control device, thereby completing the control feedback synchronization.

[0033] Taking the vehicle control scenario as an example, the cab and the equipment compartment beside the vehicle are each equipped with a display and control terminal, which serve as the master control device and the slave control device respectively. The controlled devices are the leveling device, the erection device, and the descending device. When the operator completes the leveling control on the display and control terminal in the cab, the control action and control feedback can be seen synchronously in the equipment compartment.

[0034] In this embodiment, there is only one master control device and at least one slave control device. The master control device and the slave control device are obtained by automatic negotiation and manual designation. Among them, automatic negotiation depends on the running time sequence of the control system in each control device. The control device that runs first broadcasts its own device ID to the outside to apply for master control. If there is no response after timeout, it automatically obtains the master control and becomes the master control device; if the response shows that the master control is already occupied, it automatically gives up the master control; if it receives other devices applying for master control while waiting for the response, it compares the other device ID with its own device ID, and according to the preset priority rules, it seizes the master control and becomes the master control device, or does not respond and tacitly allows the other party to obtain the master control and become the master control device.

[0035] Manual designation means that after completing the automatic negotiation, a control device is manually designated to obtain the master control right and become the master control device. The designated control device broadcasts its own device ID and indicates that it is currently manually designated. After receiving the broadcast message, the original master control device switches to a slave control device and sends a response message to clearly hand over the master control right. Then the designated control device becomes the new master control device.

[0036] Continuing with the above vehicle control as an example, the initial display and control terminal in the cab becomes the main control device through automatic negotiation. After the operator completes the leveling control in the cab, when he goes to the equipment cabin next to the vehicle to perform vertical control and downward descent, he manually designates the display and control device in the equipment cabin as the new main control device, and the display and control terminal in the cab becomes the new slave control device.

[0037] It should be noted that the main control device has a built-in finite state machine and is designed with a business process flow method based on the finite state machine. According to the received control actions and execution results, the main control device's own state is updated according to the preset state transfer rules to promote the execution of the business process corresponding to the control and execution results.

[0038] The master control device writes each operation step into the log in chronological order, including the master control device's own operation, the data interaction operation between the master control device and the controlled device, and the interaction operation between the master control device and the slave control device. For example, the recorded log includes: the master control device power-on operation, the operation of converting the control action into a command, the operation of changing its own state, the operation of packaging the command into a communication message, the operation of converting the command into the first synchronization data, the operation of receiving the first response data, the operation of receiving the execution result, the operation of converting the execution result into the control feedback, the operation of converting the execution result into the second synchronization data, and the operation of receiving the second response data.

[0039] It is worth noting that any control device and controlled device are designed with methods to determine whether the control action is legal to ensure the safety of the control action. For example, in the vehicle control scenario, vertical adjustment is not allowed before leveling is completed, and downward movement is not allowed before vertical adjustment is completed.

[0040] It should be noted that the manipulation actions, commands, execution results, manipulation feedback, synchronization data and response data have a unified data format, which is convenient for data recording and analysis. The data format includes a subject and an attribute list, where the subject is obtained by splicing the sender device, subject type and subject attribute according to the preset separator; the attribute list stores the attribute name and attribute value in the form of a key-value pair; the subject type includes a command type and a feedback type; different subject types correspond to different subject attributes. When the subject type is a command, the subject attribute is a specific command identifier, including create, delete, test, query, control, set, configure and display; when the subject type is feedback, the subject attribute is a specific feedback identifier, including status, fault and data.

[0041] It should be noted that when the master control device converts a command into the first synchronization data, and converts the execution result into the second synchronization data, it adds a random code in the form of a key-value pair in the attribute list, extracts the random code from the control device, and feeds back response data with the same random code as the synchronization data to the master control device, so that the master control device can confirm that the slave control device has completed synchronization based on the consistency of the random code.

[0042] Specifically, in step S11, the sending device of the manipulation action is a human-computer interaction interface, and the subject type is a command. Exemplarily, the manipulation action is set to: erection control, and the subject of the corresponding manipulation action is "interface1 / Command / Control", where interface1 represents the human-computer interaction interface coded as Interface1 in the interface plug-in, Command represents the subject type is a command, and Control represents a control command; the attribute list is "<"flag","master">, <"device","erect">, <"action","erecting">, <"angle",90>", where flag and its attribute values ​​represent that it is sent by the master control device, device and its attribute values ​​represent that the controlled device is an erection device erect, action and its attribute values ​​represent that the action is erecting erecting, and angle and its attribute values ​​represent erection 90 degrees.

[0043] In step S12, ① when converting the manipulation action into a command, the sender device in the subject of the command is the code of the current main control device, such as ControlDevice1, and the other information is the same as the manipulation action.

[0044] ② When converting the manipulation action into the first synchronization data, the sender device in the subject of the first synchronization data is the synchronization interface Synchronize, and a random code is added to the attribute list in the form of a key-value pair, such as <"random", E143D6C2H>", the random code uses a 32-bit UUID, and other information is the same as the manipulation action.

[0045] ③ Receive the first response data returned from the control device, and associate the first response data with the first synchronization data according to the random code in the attribute list. The first response data is different from the first synchronization data only in the value of the device identification attribute in the attribute list. For example, if the value of the device identification attribute flag in the first synchronization data is "master", it means that it is sent by the master control device, and if the value of the device identification attribute flag in the first response data is "slave", it means that it is sent by the slave control device.

[0046] In step S13, ① receive the execution result returned by the controlled device, the sender device of the execution result is the controlled device, and the subject type is feedback. Exemplarily, the execution result is: the state is normal, and the subject of the corresponding execution result is "erect / Response / State", where erect indicates that the sender device is the erection device, Response indicates that the subject type is feedback, and State indicates the state; the attribute list is "<"result","ok">", indicating that the state is normal.

[0047] ② Convert the execution result into control feedback, the sender device of the control feedback is the main control device, and the subject type is command. For example, the subject of the control feedback is "ControlDevice1 / Command / Display", where ControlDevice1 represents the code of the main control device as the sender, Command represents the subject type is command, Display represents the subject attribute is display, and the attribute list is "<"device","erect">,<"action","erecting">,<"result","ok">", indicating that the erecting device erect is in a normal state when executing the erecting action.

[0048] ③ Convert the execution result into the second synchronization data and send it to the slave control device. The second synchronization data is similar to the first synchronization data. The sending device in the topic is the synchronization interface Synchronize. The value of the device identification attribute flag in the attribute list indicates that it is sent by the master control device, and the random code is added through the random attribute.

[0049] ④ Receive the first response data returned from the control device. Similarly, the second response data is different from the second synchronization data only in that the value of the device identification attribute in the attribute list is different.

[0050] Compared with the prior art, this embodiment provides a control method for the control synchronization of a master control device, which converts control actions and control feedback into different synchronization data and sends them to the slave control device in real time during the process of controlling the controlled device, reasonably organizes the data synchronization process, and associates the synchronization data of the master control device and the response data of the slave control device through the same random code, so as to maintain task and status consistency between control devices of multiple terminals.

[0051] Example 2

[0052] Another embodiment of the present invention discloses a control method for controlling synchronization from a control device, such as Figure 2 As shown, the following steps are included:

[0053] S21, receiving first synchronization data sent by the master control device, extracting a first random code, converting the first synchronization data into a command to the controlled device, and adding the first random code and returning it to the master control device as first response data;

[0054] S22, receiving the second synchronization data sent by the main control device, extracting the second random code, converting the second synchronization data into control feedback, adding the second random code and returning it to the main control device as the second response data, and displaying the control feedback on the human-computer interaction interface.

[0055] It should be noted that the slave control device also has a built-in finite state machine, and is designed with a business process flow method based on the finite state machine. The slave control device does not send the command converted from the first synchronization data to the controlled device. According to the received command, the slave control device updates its own state according to the preset state transfer rule to promote the execution of the business process corresponding to the command, and sends it to the master control device as response data, thereby achieving the synchronization of multi-control terminal control tasks. Similarly, the slave control device updates its own state according to the control feedback and sends the control feedback to the interface plug-in of the slave control device for display, so that the control results of the master control device on the controlled device can be seen in the interface plug-in of the slave control device at the same time, maintaining the interface synchronization of multiple control terminals.

[0056] It should be noted that when the slave control device converts the first synchronization data into a command to the controlled device, and when the second synchronization data is converted into control feedback, the sender device in the subject is the encoding of the slave control device, which is used to synchronize the sending of commands to the controlled device and display the execution results returned by the controlled device, so as to facilitate seamless switching of tasks when the authority is switched. The first response data has the same first random code as the first synchronization data, and the second response data has the same second random code as the second synchronization data, so that the master control device can associate the synchronization data and the response data according to the random code and confirm that the slave control device has completed the synchronization operation.

[0057] The slave control device also writes each operation step into the log in chronological order, including the slave control device's own operation and the data interaction operation between the slave control device and the master control device. For example, the recorded log includes: the slave control device power-on log, the operation of converting the first synchronization data into a command, the operation of converting the second synchronization data into control feedback, the operation of changing its own state, displaying the control feedback on the human-computer interaction interface, the operation of returning the first response data, and the operation of returning the second response data.

[0058] Furthermore, recording different types of data in the log also facilitates the control authority switching operation. When the slave control device is switched to the new master control device, the control authority can be switched at any time through the data synchronization process between the master control device and the slave control device, and the control tasks can be seamlessly connected, including the following steps:

[0059] 1) The control service plug-in of the new master control device reads the last response data from the log and sends it to the original master control device (new slave control device).

[0060] It should be noted that the last response data read includes a timestamp and specific response data.

[0061] 2) The original master control device obtains the control action and execution result to be synchronized from the log according to the response data.

[0062] Specifically, if there is response data in the log plug-in of the original master control device, all control actions and execution results after the corresponding time of the response data are obtained; otherwise, all control actions and execution results after the current power-on of the original master control device are obtained.

[0063] 3) The original master control device converts the control action to be synchronized and the execution result into third synchronization data and fourth synchronization data respectively, and sends them to the new master control device in sequence.

[0064] 4) The new master control device updates its own state according to the manipulation action in the third synchronization data and the execution result in the fourth synchronization data, and converts the fourth synchronization data into manipulation feedback and displays it on the human-computer interaction interface.

[0065] It should be noted that if the new master control device has multiple rounds of control synchronization compared to the original master control device, then the control actions and execution results to be synchronized obtained in step 2) are multiple, and the state is updated one by one through the finite state machine according to steps 3)-4) to make the state of the new master control device consistent with that of the original master control device. When the new master control device does not receive any synchronization data for more than 1 second, or the timestamp in any synchronization data differs from the time when the switch to the new master control device by more than 100 milliseconds, the new master control device completes synchronization.

[0066] Compared with the prior art, the control method for control synchronization from a control device provided in this embodiment has the advantage of seamless access to control tasks, and is compatible with both real-time synchronization and anytime synchronization. It effectively supports the collaborative control of controlled devices by two or more control devices, ensures seamless and high-quality switching of control authority, and solves the operation and status synchronization problems in multi-terminal redundant control.

[0067] Those skilled in the art will appreciate that all or part of the processes of the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, wherein the computer-readable storage medium is a disk, an optical disk, a read-only storage memory, or a random access memory, etc.

[0068] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.

Claims

1. A control method for controlling synchronization of a main control device, It is characterized in that The following steps are involved: Set control actions through the human-computer interaction interface; When the manipulation action is determined to be legal, the manipulation action is converted into a command, the command is packaged into a communication message and sent to the controlled device, and the manipulation action is converted into first synchronization data and sent to the slave control device, and the first response data returned from the slave control device is received to complete the synchronization of the manipulation action; Receive the execution result returned by the controlled device, convert the execution result into control feedback and display it on the human-computer interaction interface, convert the execution result into second synchronization data and send it to the slave control device, and receive the first response data returned from the slave control device to complete the control feedback synchronization.

2. The control method for master control device manipulation synchronization according to claim 1, It is characterized in that The main control device has a built-in finite state machine, which updates its own state according to the control action and execution result to promote the flow of business processes; the main control device writes each operation step into the log in chronological order.

3. The control method for master control device manipulation synchronization according to claim 1 or 2, It is characterized in that The manipulation actions, commands, execution results, manipulation feedback, synchronization data and response data have a unified data format.

4. The control method for master control device manipulation synchronization according to claim 3, It is characterized in that The data format includes a subject and an attribute list, wherein the subject is obtained by concatenating the sender device, subject type and subject attribute according to a preset separator; the attribute list stores attribute names and attribute values ​​in the form of key-value pairs; the subject type includes commands and feedback; different subject types correspond to different subject attributes.

5. The control method for master control device manipulation synchronization according to claim 4, It is characterized in that When converting the command into the first synchronization data and converting the execution result into the second synchronization data, a random code is added to the attribute list in the form of a key-value pair for associating with the corresponding first response data and second response data respectively.

6. A control method for controlling synchronization from a control device, It is characterized in that The following steps are involved: receiving first synchronization data sent by the main control device, extracting a first random code, converting the first synchronization data into a command to the controlled device, and adding the first random code to return the command as first response data to the main control device; Receive the second synchronization data sent by the main control device, extract the second random code, convert the second synchronization data into control feedback, add the second random code and return it to the main control device as the second response data, and display the control feedback on the human-computer interaction interface.

7. The control method for controlling synchronization from a control device according to claim 6, It is characterized in that The slave control device has a built-in finite state machine, which updates its own state according to commands and control feedback to promote the flow of business processes; the slave control device writes each operation step into the log in chronological order.

8. The control method for controlling synchronization from a control device according to claim 7, It is characterized in that When the slave control device is switched to the new master control device, the last response data is read from the log and sent to the original master control device. The original master control device obtains the control action and execution result to be synchronized from the log according to the response data, converts them into third synchronization data and fourth synchronization data respectively, and then sends them to the new master control device in sequence. The new master control device updates its own state according to the control action in the third synchronization data and the execution result in the fourth synchronization data, and converts the fourth synchronization data into control feedback and displays it on the human-computer interaction interface.

9. The control method for controlling synchronization from a control device according to claim 8, It is characterized in that The original master control device obtains the control action to be synchronized and the execution result according to the response data from the log, including: If there is response data in the log of the original master control device, all control actions and execution results after the corresponding time of the response data are obtained; otherwise, all control actions and execution results after the original master control device is currently powered on are obtained.

10. The control method for controlling synchronization from a control device according to claim 8, It is characterized in that When the slave control device switches to the new master control device, the new master control device completes synchronization when the new master control device does not receive any synchronization data for more than 1 second, or the timestamp in any synchronization data differs from the time when the slave control device switches to the new master control device by more than 100 milliseconds.