Device control method and apparatus, electronic device, and computer-readable storage medium

By determining the target action identification information in the host computer, instead of the traditional specific action control instructions, the problem of lost and untimely issuance of motion control instructions for the equipment's motion mechanism is solved, achieving the effects of simplifying instruction issuance and improving motion reliability and real-time performance.

CN119739070BActive Publication Date: 2026-02-03SHENZHEN TCL NEW-TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411824049.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2026-02-03
Estimated Expiration
2044-12-11

AI Technical Summary

Technical Problem

In existing technologies, the motion control commands of the equipment's motion mechanism are numerous, which can easily lead to loss or delays in issuance, affecting the reliability and real-time performance of the motion.

Method used

By defining the target motion identifier information in the host computer, instead of the traditional specific motion control instructions, the information is sent to the slave computer to control the motion mechanism, simplifying motion control instructions and reducing the amount of data.

Benefits of technology

It effectively alleviates the problems of lost and untimely motion control commands, and improves the reliability and real-time performance of motion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119739070B_ABST
    Figure CN119739070B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a device control method and device, an electronic device and a computer readable storage medium. The method comprises: a host computer determining target motion information of a target motion mechanism in a slave computer in response to a control operation on the target motion mechanism; determining target action identification information corresponding to a group of action control instructions according to the target motion information; and issuing the target action identification information to the slave computer, so that the target motion mechanism in the slave computer moves based on the action control instructions corresponding to the target action identification information. By issuing the target action identification information corresponding to the action control instructions, the target action identification information is used to replace the specific and large amount of data action control instructions, the motion control instructions to be issued are simplified, the amount of data to be issued is reduced, and the problems of loss and untimeliness of the motion control instructions are alleviated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of equipment control technology, specifically to an equipment control method, apparatus, electronic device, and computer-readable storage medium. Background Technology

[0002] Currently, controlling the motion mechanism of a device requires setting multiple motion control commands. For example, for a single axis of a single motion mechanism, the movement to 10 degrees needs to be achieved by using the 8-point acceleration and deceleration curve control of the stepper motor driver TMC5272. This requires setting A1, A2, AM, DM, D2, D1, Vstart, V1, V2, VM, and Vstop one by one, and finally setting the absolute position to 10 degrees. A total of 12 motion control commands are needed to complete one movement.

[0003] When the motion mechanism or number of axes of a device (such as a robot) increases, the motion control commands that need to be set increase exponentially. This often leads to problems such as lost or untimely issuance of motion control commands, resulting in poor motion reliability and real-time performance. Summary of the Invention

[0004] This application provides a device control method, apparatus, electronic device, and computer-readable storage medium, which can simplify the issuance of motion control commands, reduce the amount of data issued, and alleviate the problems of lost and untimely issuance of motion control commands.

[0005] In a first aspect, embodiments of this application provide a device control method applied to a host computer, the method comprising:

[0006] In response to a control operation on a target motion mechanism in a lower-level machine, the target motion information of the target motion mechanism is determined;

[0007] Target motion identification information is determined based on the target motion information, and the target motion identification information corresponds to a set of motion control commands;

[0008] The target motion identifier information is sent to the lower-level machine so that the target motion mechanism in the lower-level machine can move based on the motion control command corresponding to the target motion identifier information.

[0009] Secondly, embodiments of this application also provide a device control apparatus applied to a host computer, the apparatus comprising:

[0010] The response module is used to respond to control operations on the target motion mechanism in the lower-level machine and determine the target motion information of the target motion mechanism.

[0011] The determination module is used to determine target motion identification information based on the target motion information, wherein the target motion identification information corresponds to a set of motion control commands;

[0012] The sending module is used to send the target action identification information to the lower-level machine, so that the target motion mechanism in the lower-level machine can move based on the action control command corresponding to the target action identification information.

[0013] Optionally, in some embodiments of this application, determining the target motion identification information based on the target motion information includes:

[0014] Identify the motion scene identification information corresponding to the target motion information;

[0015] At least one preset action identifier corresponding to the motion scene identifier is used as the target action identifier.

[0016] Optionally, in some embodiments of this application, the target motion mechanism includes at least two, and the step of sending the target motion identification information to the lower-level machine so that the target motion mechanism in the lower-level machine moves based on the motion control command corresponding to the target motion identification information includes:

[0017] Based on the control operation, determine the coordinated control information between the target motion information of each of the target motion mechanisms;

[0018] The collaborative control information and the target motion identification information of each target motion mechanism are sent to the lower-level machine, so that the lower-level machine can perform collaborative motion control on each target motion mechanism based on the motion control instructions corresponding to the collaborative control information and the target motion identification information of each target motion mechanism.

[0019] Optionally, in some embodiments of this application, the step of sending the collaborative control information and the target motion identification information of each of the target motion mechanisms to the lower-level machine, so that the lower-level machine performs collaborative motion control on each of the target motion mechanisms based on the motion control commands corresponding to the collaborative control information and the target motion identification information of each of the target motion mechanisms, includes:

[0020] Determine the transmission and reception time information of each of the target motion mechanisms, and generate synchronization control information for each of the target motion mechanisms based on the transmission and reception time information;

[0021] The collaborative control information, the synchronization control information, and the target motion identification information of each target motion mechanism are sent to the lower-level machine, so that the lower-level machine can perform collaborative and synchronous motion control on each target motion mechanism based on the motion control instructions corresponding to the collaborative control information, the synchronization control information, and the target motion identification information of each target motion mechanism.

[0022] Optionally, in some embodiments of this application, determining the target motion information of the target motion mechanism in response to a control operation on the target motion mechanism in the lower-level machine includes:

[0023] In response to a control operation on the target motion mechanism in the lower-level machine, the priority of the control operation is determined;

[0024] If the priority is lower than the preset threshold, the execution status information of the previous control operation is obtained;

[0025] If the execution status information indicates that the previous control operation has ended, then the step of filtering out at least one target action identifier from the preset action identifier information is triggered;

[0026] If the execution status information indicates that the previous control operation has not been completed, then the step of selecting at least one target action identifier from the preset action identifier information is paused.

[0027] Optionally, in some embodiments of this application, after determining the priority of the control operation in response to the control operation on the target motion mechanism in the lower-level machine, the method further includes:

[0028] If the priority is higher than or equal to the preset threshold, then the step of filtering out at least one target action identifier from the preset action identifier information is directly triggered.

[0029] Thirdly, embodiments of this application provide a device control method applied to a lower-level machine, the method comprising:

[0030] Receive target motion identification information sent by the host computer, wherein the target motion identification information is determined by the host computer in response to a control operation on the target motion mechanism and based on the target motion information corresponding to the control operation;

[0031] Send the target motion identification information to the target motion mechanism;

[0032] The motion control command corresponding to the target motion identifier information is determined by the target motion mechanism, and the motion of the target motion mechanism is controlled based on the motion control command.

[0033] Fourthly, embodiments of this application provide a device control apparatus applied to a lower-level machine, the apparatus comprising:

[0034] The receiving module is used to receive target motion identification information sent by the host computer. The target motion identification information is determined by the host computer in response to a control operation on the target motion mechanism and based on the target motion information corresponding to the control operation.

[0035] A sending module is used to send the target motion identification information to the target motion mechanism;

[0036] The control module is used to determine the motion control command corresponding to the target motion identification information through the target motion mechanism, and control the movement of the target motion mechanism based on the motion control command.

[0037] Fifthly, embodiments of this application also provide an electronic device (including the aforementioned host computer or slave computer). The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps in the aforementioned device control method.

[0038] Sixthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the device control method described above.

[0039] In a seventh aspect, embodiments of this application also provide a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations described in embodiments of this application.

[0040] In this embodiment of the application, the host computer responds to the control operation of the target motion mechanism in the slave computer, determines the target motion information of the target motion mechanism, determines the target action identification information based on the target motion information, the target action identification information corresponds to a set of action control instructions, and sends the target action identification information to the slave computer so that the target motion mechanism in the slave computer can move based on the action control instructions corresponding to the target action identification information.

[0041] In this embodiment, the target action identifier information corresponding to the motion control command is issued, thereby replacing the issuance of specific, data-intensive motion control commands with the target action identifier information. This simplifies the required motion control commands and reduces the amount of data to be issued. When the amount of data to be issued is small, it can alleviate the problems of lost or untimely motion control command issuance. For example, it prevents the issuance of motion control commands from being disordered or failing to be issued to the corresponding motion mechanisms in a timely manner due to a large amount of data required. Attached Figure Description

[0042] To more clearly illustrate the technical solutions in this application, the accompanying drawings used in the description of the embodiments 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.

[0043] Figure 1 This is a schematic diagram of a scenario in which a host computer executes the device control method according to an embodiment of this application;

[0044] Figure 2 This is a schematic flowchart of the device control method provided in the embodiments of this application;

[0045] Figure 3 This is a flowchart of the lower-level machine executing the device control method provided in an embodiment of this application;

[0046] Figure 4 This is a schematic diagram of the structure of the device control apparatus provided in the embodiments of this application;

[0047] Figure 5 This is another structural schematic diagram of the device control apparatus provided in the embodiments of this application;

[0048] Figure 6 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0049] The technical solutions of this application will now be clearly and completely described 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.

[0050] This application provides a device control method, apparatus, electronic device, and computer-readable storage medium. Specifically, this application provides a device control apparatus suitable for electronic devices (such as host computers), used to respond to control operations on a target motion mechanism in a slave device, determine the target action identification information corresponding to the control operation, and send the target action identification information to the slave device to replace the issuance of specific, large-data-volume action control instructions, thereby reducing the amount of data to be sent and simplifying the issued instructions. The electronic device includes a host computer, which includes, but is not limited to, mobile phones, tablet computers, desktop computers, servers, or industrial control computers (such as industrial computers). Furthermore, this application also provides a device control apparatus suitable for electronic devices (such as slave devices), used to receive target action identification information issued by a host computer, and convert the target action identification information into specific action control instructions, thereby controlling the movement of the target motion mechanism. The electronic device includes a slave device, which includes, but is not limited to, robots, programmable logic controllers, etc., and may specifically refer to microcontroller units (MCUs) in these devices.

[0051] Please see Figure 1 , Figure 1 This is a schematic diagram illustrating a scenario where a host computer executes the device control method according to an embodiment of this application. The specific execution process of the host computer executing the device control method is as follows:

[0052] In response to the control operation on the target motion mechanism 12 in the lower computer 11, the host computer 10 determines the target motion information of the target motion mechanism 12, determines the target action identification information based on the target motion information, the target action identification information corresponds to a set of action control instructions, and sends the target action identification information to the lower computer 11 so that the target motion mechanism 12 in the lower computer 11 can move based on the action control instructions corresponding to the target action identification information.

[0053] It is understood that, in the embodiments of this application, the target motion mechanism includes a microcontroller unit (MCU) and associated hardware (such as motion axes) and interfaces. That is, in the embodiments of this application, the host computer sends target motion identification information to the microcontroller unit in the slave computer. Then, the microcontroller unit parses the corresponding motion control command based on the target motion identification information, and then controls the related hardware or interface actions based on the motion control command, such as controlling the motion axis or controlling the interface to distribute commands.

[0054] In summary, this application's embodiments simplify the required motion control commands and reduce the amount of data transmitted by issuing target motion identifier information corresponding to the motion control commands. Specifically, when the amount of data to be transmitted is small, it alleviates the problems of lost or untimely motion control command transmission. For example, it prevents the transmission of motion control commands from being disordered or failing to reach the corresponding motion mechanisms in a timely manner due to a large amount of data.

[0055] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the priority of the embodiments.

[0056] Please see Figure 2 , Figure 2 This is a flowchart illustrating a device control method provided in an embodiment of this application. Although a logical sequence is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown in the flowchart. Specifically, this device control method is applied to a host computer, and the process of the host computer executing the device control method specifically includes:

[0057] 101. In response to a control operation on a target motion mechanism in a lower-level machine, determine the target motion information of the target motion mechanism.

[0058] In this context, control operations are performed by the host computer on the slave computer. For example, the host computer issues commands to control the movement of the target motion mechanism in the slave computer. Target motion information refers to the operational information that the target motion mechanism corresponding to the control operation needs to execute. For example, this target motion information includes using the 8-point acceleration / deceleration curve control of the driver TMC5272 to achieve movement to 10 degrees, and then to 20 degrees, etc.

[0059] In this embodiment of the application, the target motion information corresponding to the control operation can be obtained based on the mapping relationship between the control operation and the motion information. For example, the control operation is identified, and the target motion information corresponding to the control operation is determined from the mapping relationship.

[0060] In a control system, the host computer and the slave computer play different roles, working together to control and manage complex systems. The host computer is responsible for high-level control and management tasks, such as data processing, algorithm calculation, user interface, system monitoring, and decision-making. Typical host computer devices include personal computers (PCs), single-board computers (SBCs), industrial computers (IPCs), and servers. The slave computer is responsible for executing specific control tasks, such as sensor data acquisition, motor control, and actuator driving. Typical slave computers include robots, microcontroller units (MCUs), programmable logic controllers (PLCs), embedded systems, and field-programmable gate arrays (FPGAs).

[0061] The target motion mechanism is the motion mechanism in the lower-level machine. For example, the target motion mechanism includes a microcontroller unit (MCU) and related hardware and interfaces.

[0062] 102. Determine target motion identification information based on the target motion information, wherein the target motion identification information corresponds to a set of motion control instructions.

[0063] In traditional methods, a set of motion control commands is determined based on target motion information and then directly sent to the target motion mechanism in the lower-level computer. However, since a single motion of the motion mechanism requires many motion control commands, the upper-level computer sends out a large number of motion control commands, which can easily lead to problems such as incorrect or untimely command issuance. Therefore, in this embodiment, target motion identification information corresponding to the motion control commands is used to replace the issuance of specific motion control commands, simplifying the content of the issued commands, reducing the amount of data issued, and alleviating the problems of incorrect and untimely command issuance.

[0064] That is, in this embodiment of the application, the action identification information is determined based on the action control command corresponding to the target motion information. In this embodiment of the application, a set of action control commands corresponding to each action identification information can be pre-configured. Based on the actual needs of the target motion information, the action control commands are matched, and then the corresponding target action identification information is determined.

[0065] 103. Send the target motion identification information to the lower-level machine so that the target motion mechanism in the lower-level machine can move based on the motion control command corresponding to the target motion identification information.

[0066] Specifically, after receiving the target action identifier information, the lower-level computer sends the target action identifier information to the corresponding target motion mechanism. The target motion mechanism parses the specific motion control command based on the target action identifier, and then controls the hardware (such as motion axis) to move based on the specific motion control command.

[0067] In summary, this application's embodiments simplify the required motion control commands and reduce the amount of data transmitted by issuing target motion identifier information corresponding to the motion control commands. Specifically, when the amount of data to be transmitted is small, it alleviates the problems of lost or untimely motion control command transmission. For example, it prevents the transmission of motion control commands from being disordered or failing to reach the corresponding motion mechanisms in a timely manner due to a large amount of data.

[0068] Optionally, in this embodiment, target action identification information for each control operation can be pre-configured so that after a control operation is detected, the target action identification information can be quickly matched based on the control operation. That is, optionally, in some embodiments of this application, the step "determine the target action identification information based on the target motion information" includes:

[0069] Identify the motion scene identification information corresponding to the target motion information;

[0070] At least one preset action identifier corresponding to the motion scene identifier is used as the target action identifier.

[0071] The motion scene identification information is for different motion scenes, i.e., different control operations. For example, motion scene identification information includes identification information such as 101, 202, and 303. Different motion scene identification information corresponds to different action identification information, and the motion identification information corresponding to each motion scene identification information can be pre-configured. For example, different motion scene identifications can be configured based on different control operations, and action identification information can be configured using the content of the control operations. Each action identification information also corresponds to the motion information of the motion mechanism.

[0072] For example, if the lower-level machine includes two motion mechanisms, namely motion mechanism MCU1 and motion mechanism MCU2, and MCU1 has two axes, namely axis 1 and axis 2, and MCU2 has three axes, namely axis 3, axis 4 and axis 5, then 16 points (i.e. motion identification information) are provided for each axis. Specifically, points 0x01-0x10 belong to the 16 motions of axis 1, 0x11-0x20 belong to the 16 motions of axis 2, 0x21-0x30 belong to the 16 motions of axis 3, 0x31-0x40 belong to the 16 motions of axis 4, and 0x41-0x50 belong to the 16 motions of axis 5.

[0073] Furthermore, each point on each axis can be configured. For example, the motion information for point 1 (0x01) of axis 1 is "to move to 10 degrees by controlling the 8-point acceleration / deceleration curve of the driver TMC5272, where A1, A2, and AM are all 900, DM, D2, and D1 are all 1800, Vstart is 5, V1 is 30, V2 is 60, V3 is 90, Vstop is 6, and after execution, wait at this point for 3000ms." The corresponding set of motion control instructions is: [1, 10, 3000, 5, 900, 30, 900, 60, 900, 90, 1800, 1800, 1800, 6]. Similarly, each point corresponding to each motion information of each axis can be pre-configured.

[0074] Specifically, the aforementioned action control commands are as follows:

[0075] Vstart: Motor starting speed; V1: Threshold speed for the first acceleration / deceleration phase; V2: Threshold speed for the second acceleration / deceleration phase; V3: Target speed for the motion ramp; Vstop: Motor stopping speed; A1: Acceleration between Vstart and V1; A2: Acceleration between V1 and V2; AM: Acceleration between V2 and V3; DM: Deceleration between V3 and V2; D2: Deceleration between V2 and V1; D1: Deceleration between V1 and Vstop.

[0076] Furthermore, a correspondence or binding relationship between motion scene identifier information and each action identifier information can be established based on motion information (which may include multiple action information of multiple axes). For example, if the motion scene identifier information corresponding to the motion information is 101, and the motion information includes multiple action information, and the point corresponding to each action information, i.e. the action identifier information is [0x01, 0x11, 0, 0x02, 0x12, 0, 0x01, 0x11, 0, 0x02, 0x12, 0, 0x01, 0x11, 0, 0x02, 0x12, 0], then a binding relationship can be established between the motion scene identifier information 101 and the multiple action identifier information [0x01, 0x11, 0, 0x02, 0x12, 0, 0x01, 0x11, 0, 0x02, 0x12, 0].

[0077] That is, once the motion scene identifier information corresponding to the target motion information is identified as 101, its motion identifier information [0x01, 0x11, 0, 0x02, 0x12, 0, 0x01, 0x11, 0, 0x02, 0x12, 0, 0x01, 0x11, 0, 0x02, 0x12, 0] can be obtained based on this binding relationship, which is the target motion identifier information. As can be seen from the above, this target motion identifier information corresponds to multiple motion information on multiple axes. Based on the point names, it can be known that this target motion identifier information contains motion information of "axis 1 point 1 / axis 2 point 1, axis 1 point 2 / axis 2 point 2, repeating 3 times".

[0078] In some scenarios, the motion information (i.e., action combination) corresponding to the motion scene identifier 101 is also referred to as the action point matrix for MCU1, which describes how MCU1 completes an action point matrix by combining various points on various axes. In other words, it can be understood as a set of actions for MCU1. It is understood that control operations for lower-level machines usually involve multiple target motion mechanisms. Therefore, based on the control operations, target motion information for multiple target motion mechanisms can be determined, and then motion scene identification information for multiple target motion information can be identified. For example, in the embodiments of this application, motion scene identification information 101 and motion scene identification information 202 can be determined based on the control operations. Accordingly, two sets of target action identification information are obtained, namely [0x01, 0x11, 0, 0x02, 0x12, 0, 0x01, 0x11, 0, 0x02, 0x12, 0, 0x01, 0x11, 0, 0x02, 0x12, 0] for motion scene identification information 101 and [0x21, 0x31, 0x41, 0x23, 0x33, 0x43, 0x25, 0x35, 0] for motion scene identification information 202.

[0079] It is understood that, in this embodiment of the application, the host computer sends [0x01, 0x11, 0, 0x02, 0x12, 0, 0x01, 0x11, 0, 0x02, 0x12, 0, 0x01, 0x11, 0, 0x02, 0x12, 0] and [0x21, 0x31, 0x41, 0x23, 0x33, 0x43, 0x25, 0x35, 0] to the slave computer, and the slave computer, based on the target... For the target motion mechanism, [0x01, 0x11, 0, 0x02, 0x12, 0, 0x01, 0x11, 0, 0x02, 0x12, 0, 0x01, 0x11, 0, 0x02, 0x12, 0] is sent to motion mechanism MCU1, and [0x21, 0x31, 0x41, 0x23, 0x33, 0x43, 0x25, 0x35, 0] is sent to motion mechanism MCU2. It is understood that, in this embodiment, although the transmitted content contains multiple action identifiers, compared to directly transmitting the action control commands corresponding to each action identifier, this embodiment has achieved a significant reduction in data volume, simplifying the execution of the transmitted content, reducing data volume, and alleviating the problems of lost and untimely transmission of motion control commands.

[0080] Correspondingly, the lower-level machine or the motion mechanism in the lower-level machine can parse the motion control instructions contained in each motion identifier information based on the pre-configured point information stored in the memory, and then perform motion control.

[0081] It is understood that, in this embodiment of the application, in order to further reduce the amount of data sent, the target action identifier information sent can also be directly motion scene identifier information. That is, the lower-level machine or the motion mechanism of the lower-level machine stores the correspondence between motion scene identifier information and action identifier information, as well as the correspondence between action identifier information and motion control commands. Then, after the motion mechanism receives the motion scene identifier information, it can parse the action identifier information based on the aforementioned stored correspondence, and further parse the specific motion control commands. That is, the motion scene identifier information is sent instead of the target action identifier information, and then the motion mechanism parses out the points and parses out the motion control commands based on the points.

[0082] Optionally, when multiple target motion mechanisms are involved, the effective and reasonable movement of each target motion mechanism can be ensured by coordinating the movement of each target motion mechanism. That is, optionally, in some embodiments of this application, the target motion mechanism includes at least two, and the step "sending the target motion identification information to the lower-level machine so that the target motion mechanism in the lower-level machine moves based on the motion control command corresponding to the target motion identification information" includes:

[0083] Based on the control operation, determine the coordinated control information between the target motion information of each of the target motion mechanisms;

[0084] The collaborative control information and the target motion identification information of each target motion mechanism are sent to the lower-level machine, so that the lower-level machine can perform collaborative motion control on each target motion mechanism based on the motion control instructions corresponding to the collaborative control information and the target motion identification information of each target motion mechanism.

[0085] Among them, the collaborative control information is the information for collaboratively controlling the movement of multiple target motion mechanisms. For example, if it is determined based on the control operation that motion mechanism MCU1 needs to move first, and motion mechanism MCU2 will move after an interval of 1000ms, then the collaborative control information is sent to the lower-level machine, so that the lower-level machine can use the collaborative control information to collaboratively control each target motion mechanism.

[0086] Optionally, when multiple target motion mechanisms are involved, in order to accurately coordinate and control each target motion mechanism, it is also necessary to perform synchronous control on the multiple target motion mechanisms. That is, optionally, in some embodiments of this application, the step "sending the coordinated control information and the target action identification information of each target motion mechanism to the lower-level machine, so that the lower-level machine performs coordinated motion control on each target motion mechanism based on the motion control instructions corresponding to the coordinated control information and the target action identification information of each target motion mechanism" includes:

[0087] Determine the transmission and reception time information of each of the target motion mechanisms, and generate synchronization control information for each of the target motion mechanisms based on the transmission and reception time information;

[0088] The collaborative control information, the synchronization control information, and the target motion identification information of each target motion mechanism are sent to the lower-level machine, so that the lower-level machine can perform collaborative and synchronous motion control on each target motion mechanism based on the motion control instructions corresponding to the collaborative control information, the synchronization control information, and the target motion identification information of each target motion mechanism.

[0089] The transmit / receive time information refers to the time difference between issuing a command and receiving a response for each target motion mechanism. Synchronization control information is used to control the synchronous movement of multiple target motion mechanisms. Based on the transmit / receive time information of each target motion mechanism, corresponding synchronization control information can be generated. For example, if the target motion mechanisms include MCU1 and MCU2, and the transmit / receive time information for MCU1 and MCU2 are 20ms and 50ms respectively, then to synchronously control MCU1 and MCU2, the control command for MCU1 can be issued 30ms after the control command for MCU2 (corresponding to the transmit / receive time difference information). This ensures that MCU1 and MCU2 receive their respective control commands simultaneously and thus move synchronously. Accordingly, the transmit / receive time difference information for each target motion mechanism constitutes the synchronization control information.

[0090] Optionally, to ensure the effective movement of each target motion mechanism, conflict detection can be set to ensure that the movement corresponding to the previous control operation is completed before the movement of the current control operation is executed. That is, optionally, in some embodiments of this application, the step "in response to the control operation on the target motion mechanism in the lower-level machine, determine the target motion information of the target motion mechanism" includes:

[0091] In response to a control operation on the target motion mechanism in the lower-level machine, the priority of the control operation is determined;

[0092] If the priority is lower than the preset threshold, the execution status information of the previous control operation is obtained;

[0093] If the execution status information indicates that the previous control operation has ended, then the step of filtering out at least one target action identifier from the preset action identifier information is triggered;

[0094] If the execution status information indicates that the previous control operation has not been completed, then the step of selecting at least one target action identifier from the preset action identifier information is paused.

[0095] Among them, priority refers to the priority of control operation, which serves as the basis for whether the movement of the previous control operation can be interrupted. When the priority is lower than the preset threshold, it is considered to be low priority, and the target action identification information corresponding to the current control operation must be issued after the previous control operation is completed.

[0096] Correspondingly, when the priority is high, the action of the previous control operation can be interrupted directly to achieve a rapid response in motion control. That is, optionally, in some embodiments of this application, after the step "determining the priority of the control operation in response to the control operation of the target motion mechanism in the lower-level machine", the method further includes:

[0097] If the priority is higher than or equal to the preset threshold, then the step of filtering out at least one target action identifier from the preset action identifier information is directly triggered.

[0098] For example, if a user urgently needs the target motion mechanism to execute an action quickly, the execution of the previous control operation can be stopped and the action corresponding to the current control operation can be executed.

[0099] In this embodiment, the priority can be based on the type of control operation, which includes normal operation, reset operation, or power-off operation, etc. No limitation is made on how the priority of the control operation is determined.

[0100] In summary, this application's embodiments simplify the required motion control commands and reduce the amount of data transmitted by issuing target motion identifier information corresponding to the motion control commands. Specifically, when the amount of data to be transmitted is small, it alleviates the problems of lost or untimely motion control command transmission. For example, it prevents the transmission of motion control commands from being disordered or failing to reach the corresponding motion mechanisms in a timely manner due to a large amount of data.

[0101] Specifically, collaborative control of multiple target motion mechanisms is achieved by issuing collaborative control information, synchronous control of multiple target motion mechanisms is achieved by issuing synchronous control information, and effective and orderly response of multiple control operations is ensured by priority-based analysis and control based on whether the current control operation command is directly triggered, thus avoiding control conflicts.

[0102] Therefore, the target motion mechanism in the lower-level machine needs to receive the target motion identifier information sent by the upper-level machine, and parse out the specific motion control instructions based on the target motion identifier information, thereby controlling the execution of the corresponding actions. See also... Figure 3 As shown, Figure 3 This is a flowchart of the lower-level machine executing the device control method according to an embodiment of this application. Specifically, the process of the lower-level machine executing the device control method includes:

[0103] 111. Receive target motion identification information sent by the host computer, wherein the target motion identification information is determined by the host computer in response to a control operation on the target motion mechanism and based on the target motion information corresponding to the control operation;

[0104] 112. Send the target motion identification information to the target motion mechanism;

[0105] 113. Determine the motion control command corresponding to the target motion identifier information through the target motion mechanism, and control the movement of the target motion mechanism based on the motion control command.

[0106] For example, in this embodiment of the application, the motion mechanism of the lower-level machine also stores the point configuration information described above. Then, after the target motion mechanism receives the target action identification information, it can determine the action control command corresponding to the target action identification information based on the point configuration information.

[0107] To facilitate better implementation of the equipment control method of this application, this application also provides an equipment control device based on the above-described equipment control method. The meanings of the terms used are the same as in the above-described equipment control method, and specific implementation details can be found in the descriptions of the method embodiments.

[0108] Please see Figure 4 , Figure 4 This is a schematic diagram of the device control apparatus provided in an embodiment of this application. The device control apparatus is applied to a host computer and can be specifically described as follows:

[0109] Response module 201 is used to determine the target motion information of the target motion mechanism in response to a control operation on the target motion mechanism in the lower-level machine;

[0110] The determining module 202 is used to determine target motion identification information based on the target motion information, wherein the target motion identification information corresponds to a set of motion control commands;

[0111] The sending module 203 is used to send the target action identification information to the lower-level machine, so that the target motion mechanism in the lower-level machine can move based on the action control command corresponding to the target action identification information.

[0112] Optionally, in some embodiments of this application, determining the target motion identification information based on the target motion information includes:

[0113] Identify the motion scene identification information corresponding to the target motion information;

[0114] At least one preset action identifier corresponding to the motion scene identifier is used as the target action identifier.

[0115] Optionally, in some embodiments of this application, the target motion mechanism includes at least two, and the step of sending the target motion identification information to the lower-level machine so that the target motion mechanism in the lower-level machine moves based on the motion control command corresponding to the target motion identification information includes:

[0116] Based on the control operation, determine the coordinated control information between the target motion information of each of the target motion mechanisms;

[0117] The collaborative control information and the target motion identification information of each target motion mechanism are sent to the lower-level machine, so that the lower-level machine can perform collaborative motion control on each target motion mechanism based on the motion control instructions corresponding to the collaborative control information and the target motion identification information of each target motion mechanism.

[0118] Optionally, in some embodiments of this application, the step of sending the collaborative control information and the target motion identification information of each of the target motion mechanisms to the lower-level machine, so that the lower-level machine performs collaborative motion control on each of the target motion mechanisms based on the motion control commands corresponding to the collaborative control information and the target motion identification information of each of the target motion mechanisms, includes:

[0119] Determine the transmission and reception time information of each of the target motion mechanisms, and generate synchronization control information for each of the target motion mechanisms based on the transmission and reception time information;

[0120] The collaborative control information, the synchronization control information, and the target motion identification information of each target motion mechanism are sent to the lower-level machine, so that the lower-level machine can perform collaborative and synchronous motion control on each target motion mechanism based on the motion control instructions corresponding to the collaborative control information, the synchronization control information, and the target motion identification information of each target motion mechanism.

[0121] Optionally, in some embodiments of this application, determining the target motion information of the target motion mechanism in response to a control operation on the target motion mechanism in the lower-level machine includes:

[0122] In response to a control operation on the target motion mechanism in the lower-level machine, the priority of the control operation is determined;

[0123] If the priority is lower than the preset threshold, the execution status information of the previous control operation is obtained;

[0124] If the execution status information indicates that the previous control operation has ended, then the step of filtering out at least one target action identifier from the preset action identifier information is triggered;

[0125] If the execution status information indicates that the previous control operation has not been completed, then the step of selecting at least one target action identifier from the preset action identifier information is paused.

[0126] Optionally, in some embodiments of this application, after determining the priority of the control operation in response to the control operation on the target motion mechanism in the lower-level machine, the method further includes:

[0127] If the priority is higher than or equal to the preset threshold, then the step of filtering out at least one target action identifier from the preset action identifier information is directly triggered.

[0128] In this embodiment, the response module 201 responds to the control operation of the target motion mechanism in the lower-level machine, determines the target motion information of the target motion mechanism, the determination module 202 determines the target action identification information based on the target motion information, the target action identification information corresponds to a set of action control commands, and the sending module 203 sends the target action identification information to the lower-level machine so that the target motion mechanism in the lower-level machine can move based on the action control commands corresponding to the target action identification information.

[0129] In this embodiment, the target action identifier information corresponding to the motion control command is issued, thereby replacing the issuance of specific, data-intensive motion control commands with the target action identifier information. This simplifies the required motion control commands and reduces the amount of data to be issued. When the amount of data to be issued is small, it can alleviate the problems of lost or untimely motion control command issuance. For example, it prevents the issuance of motion control commands from being disordered or failing to be issued to the corresponding motion mechanisms in a timely manner due to a large amount of data required.

[0130] Please see Figure 5 , Figure 5 This is another schematic diagram of the device control device provided in the embodiments of this application. The device control device is applied to a lower-level machine, and can be specifically as follows:

[0131] The receiving module 211 is used to receive target motion identification information sent by the host computer. The target motion identification information is determined by the host computer in response to a control operation on the target motion mechanism and based on the target motion information corresponding to the control operation.

[0132] The sending module 212 is used to send the target motion identification information to the target motion mechanism;

[0133] The control module 213 is used to determine the motion control command corresponding to the target motion identification information through the target motion mechanism, and control the movement of the target motion mechanism based on the motion control command.

[0134] In summary, in this embodiment, the host computer only needs to send target action identification information with a small amount of data, instead of sending action control commands with a large amount of data. This reduces the number of commands that the slave computer needs to receive, which helps to ensure the accurate reception and execution of commands.

[0135] In addition, this application also provides an electronic device, such as Figure 6 As shown, it illustrates the structural diagram of the electronic device involved in this application, specifically:

[0136] The electronic device may include components such as a processor 301 with one or more processing cores, a memory 302 with one or more computer-readable storage media, a power supply 303, and an input unit 304. Those skilled in the art will understand that... Figure 6 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:

[0137] The processor 301 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines, and performs various functions and processes data by running or executing software programs and / or modules stored in the memory 302, and by calling data stored in the memory 302, thereby providing overall monitoring of the electronic device. Optionally, the processor 301 may include one or more processing cores; preferably, the processor 301 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 301.

[0138] The memory 302 can be used to store software programs and modules. The processor 301 executes various functional applications and data processing by running the software programs and modules stored in the memory 302. The memory 302 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 302 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 302 may also include a memory controller to provide the processor 301 with access to the memory 302.

[0139] The electronic device also includes a power supply 303 that supplies power to the various components. Preferably, the power supply 303 can be logically connected to the processor 301 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 303 may also include one or more DC or AC power supplies, recharging systems, power equipment debugging circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0140] The electronic device may also include an input unit 304, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0141] Although not shown, the electronic device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 301 in the electronic device loads the executable files corresponding to the processes of one or more applications into the memory 302 according to the following instructions, and the processor 301 runs the applications stored in the memory 302, thereby implementing the steps in any of the device control methods provided in the embodiments of this application.

[0142] In this embodiment of the application, the host computer responds to the control operation of the target motion mechanism in the slave computer, determines the target motion information of the target motion mechanism, determines the target action identification information based on the target motion information, the target action identification information corresponds to a set of action control instructions, and sends the target action identification information to the slave computer so that the target motion mechanism in the slave computer can move based on the action control instructions corresponding to the target action identification information.

[0143] In this embodiment, the target action identifier information corresponding to the motion control command is issued, thereby replacing the issuance of specific, data-intensive motion control commands with the target action identifier information. This simplifies the required motion control commands and reduces the amount of data to be issued. When the amount of data to be issued is small, it can alleviate the problems of lost or untimely motion control command issuance. For example, it prevents the issuance of motion control commands from being disordered or failing to be issued to the corresponding motion mechanisms in a timely manner due to a large amount of data required.

[0144] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0145] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0146] Therefore, this application provides a computer-readable storage medium storing a computer program that can be loaded by a processor to execute the steps of any of the device control methods provided in this application.

[0147] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0148] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0149] Since the instructions stored in the computer-readable storage medium can execute the steps of any of the device control methods provided in this application, the beneficial effects that any of the device control methods provided in this application can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.

[0150] The above provides a detailed description of a device control method, apparatus, electronic device, and computer-readable storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, those skilled in the art will recognize that there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A device control method, characterized in that, Applied to a host computer, the method includes: In response to a control operation on a target motion mechanism in a lower-level machine, the target motion information of the target motion mechanism is determined; Target motion identification information is determined based on the target motion information, and the target motion identification information corresponds to a set of motion control commands; The target motion identification information is sent to the lower-level machine so that the target motion mechanism in the lower-level machine can move based on the motion control command corresponding to the target motion identification information; The target motion mechanism includes at least two components. The step of sending the target motion identification information to the lower-level machine, so that the target motion mechanism in the lower-level machine moves based on the motion control command corresponding to the target motion identification information, includes: Based on the control operation, determine the coordinated control information between the target motion information of each of the target motion mechanisms; Determine the transmission and reception time information of each of the target motion mechanisms, and generate synchronization control information for each of the target motion mechanisms based on the transmission and reception time information; The collaborative control information, the synchronization control information, and the target motion identification information of each target motion mechanism are sent to the lower-level machine, so that the lower-level machine can perform collaborative and synchronous motion control on each target motion mechanism based on the motion control instructions corresponding to the collaborative control information, the synchronization control information, and the target motion identification information of each target motion mechanism.

2. The equipment control method according to claim 1, characterized in that, Determining the target motion identifier information based on the target motion information includes: Identify the motion scene identification information corresponding to the target motion information; At least one preset action identifier corresponding to the motion scene identifier is used as the target action identifier.

3. The equipment control method according to claim 2, characterized in that, The step of determining the target motion information of the target motion mechanism in response to a control operation on the target motion mechanism in the lower-level machine includes: In response to a control operation on the target motion mechanism in the lower-level machine, the priority of the control operation is determined; If the priority is lower than the preset threshold, the execution status information of the previous control operation is obtained; If the execution status information indicates that the previous control operation has ended, then the step of filtering out at least one target action identifier from the preset action identifier information is triggered; If the execution status information indicates that the previous control operation has not been completed, then the step of selecting at least one target action identifier from the preset action identifier information is paused.

4. The equipment control method according to claim 3, characterized in that, After determining the priority of the control operation in response to a control operation on the target motion mechanism in the lower-level machine, the method further includes: If the priority is higher than or equal to the preset threshold, then the step of filtering out at least one target action identifier from the preset action identifier information is directly triggered.

5. A device control method, characterized in that, Applied to a lower-level machine, the method includes: The host computer receives target motion identification information sent by the host computer. The target motion identification information is determined by the host computer in response to a control operation on the target motion mechanism in the lower computer and based on the target motion information corresponding to the control operation. The target motion identification information corresponds to a set of motion control commands. Send the target motion identification information to the target motion mechanism; The motion control command corresponding to the target motion identifier information is determined by the target motion mechanism, and the movement of the target motion mechanism is controlled based on the motion control command; The target motion mechanism includes at least two, which receive collaborative control information and synchronization control information sent by the host computer. The collaborative control information is the information between the target motion information of each target motion mechanism determined by the host computer according to the control operation. The synchronization control information is generated by the host computer based on the transmission and reception time information of each target motion mechanism. The step of determining the motion control command corresponding to the target motion identifier information through the target motion mechanism includes: The motion control command is determined based on the collaborative control information, the synchronous control information, and the target motion identification information of each target motion mechanism.

6. A device control apparatus, characterized in that, Applied to a host computer, the device includes: The response module is used to respond to control operations on the target motion mechanism in the lower-level machine and determine the target motion information of the target motion mechanism. The determination module is used to determine target motion identification information based on the target motion information, wherein the target motion identification information corresponds to a set of motion control commands; The sending module is used to send the target action identification information to the lower-level machine, so that the target motion mechanism in the lower-level machine can move based on the action control command corresponding to the target action identification information; The target motion mechanism includes at least two components. The step of sending the target motion identification information to the lower-level machine, so that the target motion mechanism in the lower-level machine moves based on the motion control command corresponding to the target motion identification information, includes: Based on the control operation, determine the coordinated control information between the target motion information of each of the target motion mechanisms; Determine the transmission and reception time information of each of the target motion mechanisms, and generate synchronization control information for each of the target motion mechanisms based on the transmission and reception time information; The collaborative control information, the synchronization control information, and the target motion identification information of each target motion mechanism are sent to the lower-level machine, so that the lower-level machine can perform collaborative and synchronous motion control on each target motion mechanism based on the motion control instructions corresponding to the collaborative control information, the synchronization control information, and the target motion identification information of each target motion mechanism.

7. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the device control method as described in any one of claims 1-4, or to implement the steps of the device control method as described in claim 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the device control method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Nursing bed control system and method capable of realizing secondary development

    CN109966081A

  • AUPQ055999A0