Control method, chip, electronic device and computer storage medium

By working together with the main program and the slave program, the problem of inconsistent states of intelligent control devices is solved, and the synchronization and consistency of device states on different control terminals are achieved, thereby improving the accuracy of user control and the reliability of device operation.

CN122160412APending Publication Date: 2026-06-05DREAM INNOVATION TECH (SUZHOU) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
DREAM INNOVATION TECH (SUZHOU) CO LTD
Filing Date
2026-03-06
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

In the field of intelligent control, due to the lack of an efficient and reliable internal state synchronization mechanism on the device side, when multiple control sources initiate operations on the device, the device status is displayed inconsistently on different control terminals, and users cannot accurately control it.

Method used

The device status information is obtained by the main program and synchronized to the first control terminal. Updated information is obtained from the main program by the slave program and synchronized to the second control terminal, ensuring that the device status is consistent across different control terminals.

Benefits of technology

It enables the synchronization of equipment status across different control terminals, ensuring that users can accurately control the equipment based on its status, thereby improving the reliability and consistency of equipment operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122160412A_ABST
    Figure CN122160412A_ABST
Patent Text Reader

Abstract

The application discloses a control method, a chip, an electronic device and a computer storage medium. The method is applied to an electronic device and includes the following steps: receiving a control instruction through a main program, and controlling the electronic device to perform a corresponding action according to the control instruction; acquiring state information of the electronic device through the main program, and synchronizing the state of the electronic device to a first control end for controlling the electronic device according to the state information; acquiring update information from the main program through a slave program, and synchronizing the state of the electronic device to a second control end for controlling the electronic device according to the update information through the slave program, wherein the update information is generated according to the state information, the second control end is used for controlling the electronic device through a protocol provided by the slave program, and the first control end and the second control end control the electronic device through different protocols. The application can accurately synchronize the device state to multiple control ends, and avoids the problem that the device state is inconsistent in different control ends.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer processing technology, and more particularly to a control method, a chip, an electronic device, and a computer storage medium. Background Technology

[0002] Currently, in the field of intelligent control, such as smart homes, multiple control sources are usually set up for collaborative management to meet the different needs of users. Therefore, the corresponding control terminals need to be compatible with the multi-controller ecosystem so that multiple control sources can control the devices accordingly.

[0003] However, due to the lack of an efficient and reliable internal state synchronization mechanism on the device side, and the absence of a clear single benchmark for state management and collaborative rules for instruction execution, when multiple control sources initiate operations on the device, the device state may be inconsistently displayed on different control terminals, causing users to be unable to accurately control the device based on its state. Summary of the Invention

[0004] In view of this, this application provides a control method, a chip, an electronic device, and a computer storage medium to solve the problems in conventional solutions.

[0005] This application provides a control method for an electronic device, comprising: receiving control instructions through a main program and controlling the electronic device to perform corresponding actions according to the control instructions; acquiring state information of the electronic device through the main program and synchronizing the state of the electronic device to a first control terminal for controlling the electronic device according to the state information; acquiring update information from the main program through a slave program and synchronizing the state of the electronic device to a second control terminal for controlling the electronic device according to the update information, wherein the update information is generated based on the state information, and the second control terminal is used to control the electronic device through a protocol provided by the slave program, wherein the first control terminal and the second control terminal control the electronic device through different protocols.

[0006] Optionally, receiving control commands through the main program includes at least one of the following operations: i. receiving control commands generated by the triggering of control buttons on the electronic device through the main program; ii. receiving control commands from the first control terminal through the main program; iii. receiving control commands from the slave program through the main program, wherein the control commands are sent to the slave program by the second control terminal.

[0007] Optionally, obtaining the update information from the main program via the slave program includes: receiving the update information sent by the main program via the slave program, or obtaining the update information from the main program periodically via the slave program or when the electronic device needs to report its status.

[0008] Optionally, receiving control instructions through the main program includes: receiving control instructions from the instruction distribution unit through the main program, wherein the instruction distribution unit sorts the received control instructions and sends them sequentially to the main program, and the control instructions received by the instruction distribution unit include one or more of the following instructions: control instructions generated when the control button is triggered, control instructions sent by the first control terminal, and control instructions sent by the second control terminal to the slave program and then forwarded by the slave program.

[0009] Optionally, synchronizing the state of the electronic device to a first control terminal for controlling the electronic device based on the state information includes: generating an incremental change set based on the difference between historical state information of the last time the state of the electronic device was synchronized to the first control terminal and the current state information of the electronic device; synchronizing the state of the electronic device to the first control terminal for controlling the electronic device based on the incremental change set; the step of obtaining update information from the main program through a slave program and synchronizing the state of the electronic device to a second control terminal for controlling the electronic device based on the update information through the slave program includes: obtaining update information determined by the incremental change set from the main program through a slave program, and synchronizing the state of the electronic device to the second control terminal for controlling the electronic device based on the update information through the slave program.

[0010] Optionally, controlling the electronic device to perform the corresponding action according to the control instruction includes: controlling the electronic device to perform the corresponding action sequentially according to the order in which the main program receives multiple control instructions.

[0011] Optionally, the main program and the slave program are different processes, or the main program and the slave program are different threads included in the same process.

[0012] A second aspect of this application provides a chip for use in an electronic device, comprising: the chip including a master control unit and a slave control unit; the master control unit being configured to receive control commands and control the electronic device to perform corresponding actions according to the control commands, and to acquire status information of the electronic device and synchronize the status of the electronic device to a first control terminal for controlling the electronic device according to the status information; the slave control unit being configured to acquire update information from the master control unit and synchronize the status of the electronic device to a second control terminal for controlling the electronic device according to the update information, wherein the update information is generated based on the status information, and the second control terminal is configured to control the electronic device through a protocol provided by the slave control unit, wherein the first control terminal and the second control terminal control the electronic device through different protocols.

[0013] A third aspect of this application provides a chip, comprising: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus; the memory is used to store at least one executable instruction, which causes the processor to perform the operation corresponding to the method described in the first aspect of the embodiment.

[0014] A fourth aspect of this application provides an electronic device including a chip as described in the second or third aspect of the embodiments.

[0015] The fourth aspect of this application provides a computer storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect of the embodiments.

[0016] The fifth aspect of this application provides a computer program product including computer instructions that instruct a computing device to perform an operation corresponding to the method described in the first aspect of the embodiments.

[0017] In this application, status information is obtained through the main program to synchronize the device status to the first control terminal, and update information is obtained from the main program through the sub-program to synchronize the device status to the second control terminal. This ensures that the status of the electronic device after receiving control commands and executing corresponding actions can be synchronously updated to the first and second control terminals, so that the device status is displayed consistently on different control terminals. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings.

[0019] Figure 1 This is an exemplary system for a control method applicable to embodiments of this application; Figure 2 This is a flowchart of the steps of a control method according to an embodiment of this application; Figure 3 This is another exemplary system for a control method applicable to embodiments of this application; Figure 4 This is a schematic diagram of a chip according to an embodiment of this application; Figure 5 This is a schematic diagram of a chip according to another embodiment of this application. Detailed Implementation

[0020] To enable those skilled in the art to better understand the technical solutions in the embodiments of this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art should fall within the protection scope of the embodiments of this application.

[0021] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.

[0022] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0023] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. Unless otherwise specified, the following embodiments and their technical features can be combined with each other.

[0024] Figure 1An exemplary system for a control method applicable to embodiments of this application is shown. For example... Figure 1 As shown, the system 100 may include a first control terminal 101, a second control terminal 102, and an electronic device 103.

[0025] The first control terminal 101 and the second control terminal 102 control the electronic device 103 through different protocols. The electronic device 103 can be a controlled product in a smart home scenario, such as a robot vacuum cleaner, smart lights, air conditioners, door locks, etc. The electronic device 103 can also be an industrial IoT sensor, smart wearable device, etc. that requires cross-platform and cross-ecosystem collaboration. The first control terminal 101 can be the manufacturer's proprietary control software or the control buttons on the electronic device 103. The second control terminal 102 can be third-party control software, such as applications that support the Matter protocol, such as Apple Home, Google Home, etc. Since both the first control terminal 101 and the second control terminal 102 can control the electronic device 103, when the first control terminal 101 and the second control terminal 102 send commands to the electronic device 103, due to different communication protocols, the device status may be inconsistent on different control terminals. This can cause users to be unable to accurately control the device based on its status. For example, if the electronic device 103 is a curtain in a smart home scenario, its initial state is closed. The first control terminal 101 sends a command to the electronic device 103 to open the curtain, and the electronic device 103 opens the curtain according to the command. However, at this time, the second control terminal 102 has not sent a command and therefore has not updated the device status. As a result, the device status on the second control terminal 102 is still the closed state. When the second control terminal 102 sends a command to the electronic device 103 to open the curtain, the electronic device 103 cannot execute it, resulting in the device status on the second control terminal 102 still being the closed state, which affects the user experience. Therefore, a main program 104 and a slave program 105 can be set in the electronic device 103. The second control terminal 102 is used to control the electronic device 103 through the protocol provided by the slave program 105. The main program 104 and the slave program 105 process the instructions sent to the electronic device 103 by the first control terminal 101 and the second control terminal 102, and synchronize the device status respectively, so as to solve the problem of inconsistent display of device status on different control terminals.

[0026] Specifically, the main program 104 and the slave program 105 are different processes, or the main program 104 and the slave program 105 are different threads included in the same process. By using independent main programs 104 and 105, each carrying different core functions, synchronization delays and conflicts caused by functional coupling are avoided.

[0027] Specifically, Figure 2 This is a flowchart of the control method according to an embodiment of this application, as follows: Figure 2 As shown, the control method applied to electronic device 103 includes the following steps: Step 201: Receive control commands through the main program and control the electronic device to perform corresponding actions according to the control commands.

[0028] Electronic device 103 receives control commands through main program 104, and after receiving the control commands, controls the electronic device to perform corresponding actions according to the control commands.

[0029] Step 202: Obtain the status information of the electronic device through the main program, and synchronize the status of the electronic device to the first control terminal used to control the electronic device according to the status information.

[0030] The main program 104 serves as the sole source of state information. The main program 104 obtains the state information of the electronic device and synchronizes the state of the electronic device 103 to the first control terminal 101 used to control the electronic device based on the state information.

[0031] Step 203: Obtain update information from the main program through the slave program, and synchronize the status of the electronic device to the second control terminal used to control the electronic device based on the update information through the slave program.

[0032] As a program that communicates with the second control terminal, after obtaining the status information from the main program 104, the program 105 obtains the update information from the main program 104. The update information is generated by the main program 104 based on the status information.

[0033] Taking electronic device 103 as a curtain in a smart home scenario as an example, the first control terminal 101 sends a control command to electronic device 103 to open the curtain. Electronic device 103 receives the control command through the main program 104, and then controls electronic device 103 to open the curtain according to the control command. Next, the main program 104 obtains the status information of the electronic device. At this time, the status information indicates that the curtain is open. After obtaining the status information indicating that the curtain is open, the main program 104 synchronizes the status of the electronic device to the first control terminal 101 used to control electronic device 103. At this time, the status of electronic device 103 in the first control terminal 101 is that the curtain is open. The main program 104 generates update information based on the status information. The slave program 105 obtains the update information from the main program 104, and then synchronizes the status of electronic device 103 to the second control terminal 102 according to the update information. At this time, the status of electronic device 103 in the second control terminal 102 is that the curtain is open. The device status in the first control terminal 101 and the second control terminal 102 is synchronized.

[0034] In this embodiment, the main program obtains status information to synchronize the device status to the first control terminal, and the program obtains update information from the main program to synchronize the device status to the second control terminal. This ensures that the status of the electronic device after receiving control commands and executing corresponding actions can be synchronously updated to the first and second control terminals, so that the device status is displayed consistently on different control terminals.

[0035] In one possible implementation, receiving control instructions via the main program 104 includes at least one of the following operations: i. The main program 104 receives control commands generated by the control buttons set on the electronic device 103 being triggered.

[0036] The electronic device 103 may be equipped with one or more control buttons. When a user triggers at least one control button, the electronic device 103 will generate a control command, which will then be received by the main program 104.

[0037] ii. Receive control commands from the first control terminal 101 through the main program 104.

[0038] The first control terminal 101, such as the manufacturer's own control software, can directly send control commands to the main program 104.

[0039] iii. The main program 104 receives control commands from the slave program 105. The control commands are sent to the slave program 105 by the second control terminal 102.

[0040] Since the communication protocol of the second control terminal 102 is different from that of the first control terminal 101, the second control terminal 102 first receives the control command sent by the slave program 105, and then the slave program 105 sends the control command to the main program 104.

[0041] In this embodiment, the main program 104 receives control commands generated by the control buttons on the electronic device 103 being triggered and control commands from the first control terminal 101. The program 105 receives control commands sent by the second control terminal 102 and sends them to the main program 104. Ultimately, the main program 104 receives all the commands, which can avoid command conflicts caused by concurrent operation of multiple control sources and improve the reliability of device operation.

[0042] In one possible implementation, the process of obtaining update information from main program 104 via program 105 may include: The update information is received from the main program 104 by the program 105, or by the program 105 periodically or the electronic device 103 needs to report its status by the main program 104.

[0043] In this embodiment, the main program 104 can actively send update information to the slave program 105, and the slave program 105 can also obtain update information from the main program 104 under specific conditions to ensure that the device status can be synchronized to the second control terminal 102 in a timely manner.

[0044] Figure 3 This is another exemplary system applicable to the control method of this application embodiment, such as... Figure 3 As shown, the electronic device 103 may also include an instruction distribution unit 106. In one possible implementation, the process of receiving control instructions through the main program 104 may further include: The main program 104 receives control commands from the instruction distribution unit 106. The instruction distribution unit 106 sorts the received control commands and sends them to the main program 104 in sequence. The control commands received by the instruction distribution unit 106 include one or more of the following: control commands generated when a control button is triggered, control commands sent by the first control terminal 101, and control commands sent by the second control terminal 102 to the slave program 105 and then forwarded by the slave program 105.

[0045] Electronic device 103 may receive multiple control commands simultaneously. These commands can first enter command distribution unit 106, which then sorts the received commands and sends them sequentially to main program 104. This allows main program 104 to execute the multiple control commands serially according to the order in which they were received by electronic device 103. For example, if electronic device 103 receives control commands to open and close the curtains sequentially, after sorting by command distribution unit 106, the command to open the curtains will precede the command to close the curtains in the sequence. After main program 104 obtains the commands to open and close the curtains, it will execute the command to open the curtains first, followed by the command to close the curtains, thus avoiding conflicts.

[0046] In this embodiment of the application, by setting up the instruction distribution unit 106, multiple control instructions can be sorted upon receipt to avoid conflicts caused by multiple instructions not being executed in the order of receipt.

[0047] In one possible implementation, the process of synchronizing the state of electronic device 103 to the first control terminal 101 for controlling electronic device 103 based on state information may further include: generating an incremental change set based on the difference between historical state information of the last time the state of electronic device 103 was synchronized to the first control terminal 101 and the current state information of electronic device 103. The state of electronic device 103 is then synchronized to the first control terminal 101 for controlling electronic device 103 based on the incremental change set.

[0048] The process of obtaining update information from the main program 104 via program 105 and synchronizing the state of electronic device 103 to the second control terminal 102 for controlling electronic device 103 based on the update information via program 105 includes: obtaining update information determined by the incremental change set from the main program 104 via program 105 and synchronizing the state of electronic device 103 to the second control terminal 102 for controlling electronic device 103 based on the update information via program 105.

[0049] After the electronic device 103 establishes communication with the first control terminal 101 and the second control terminal 102 for the first time, it will synchronize a full status list containing all synchronizeable attributes of the electronic device 103 to the first control terminal 101 and the second control terminal 102. Taking the electronic device 103 as a robot vacuum cleaner as an example, the full status list can include synchronizeable attributes such as the robot vacuum cleaner's operating status, remaining battery power, and cleaned area, and each attribute is marked with a version number and / or timestamp. Therefore, during status synchronization, the main program 104 can generate an incremental change set based on the difference between the historical status information of the electronic device 103 that was last synchronized to the first control terminal 101 and the current status information of the electronic device 103, so that the first control terminal 101 and the second control terminal 102 can synchronize their status according to the incremental change set.

[0050] In this embodiment, an incremental change set is generated by comparing the historical state information of the electronic device 103 that was previously synchronized to the first control terminal 101 with the current state information of the electronic device 103. When updating the state, only the changed data is updated, which reduces the amount of data transmission and improves the efficiency of state update.

[0051] In one possible implementation, the process of controlling the electronic device 103 to perform corresponding actions according to control instructions may further include: According to the order in which the main program 104 receives multiple control commands, the electronic device 103 is controlled to perform the corresponding actions in turn according to the control commands.

[0052] In this embodiment of the application, by controlling the electronic device to perform corresponding actions according to the control instructions in sequence, the correctness of the instruction execution can be ensured.

[0053] Figure 4 This is a schematic diagram of a chip according to an embodiment of this application, as shown below. Figure 4 As shown, the chip 400 used in the electronic device 103 includes: The system includes a master control unit 401 and a slave control unit 402. The master control unit 401 is used to receive control commands and control the electronic device 103 to perform corresponding actions according to the control commands, as well as to obtain the status information of the electronic device 103 and synchronize the status of the electronic device 103 to the first control terminal 101 used to control the electronic device 103 according to the status information.

[0054] The slave control unit 402 is used to obtain update information from the master control unit 401 and synchronize the status of the electronic device 103 to the second control terminal 102 for controlling the electronic device 103 according to the update information. The update information is generated according to the status information. The second control terminal 102 is used to control the electronic device 103 through the protocol provided by the slave control unit 402. The first control terminal 101 and the second control terminal 102 control the electronic device 103 through different protocols.

[0055] Taking electronic device 103 as a lighting fixture in a smart home scenario as an example, the first control terminal 101 sends a control command to electronic device 103 to turn on the light. Electronic device 103 receives the control command through the main control unit 401, and then controls electronic device 103 to turn on the light according to the control command. Then, the main control unit 401 obtains the status information of the electronic device. At this time, the status information indicator shows that the light is on. After obtaining the status information that the light is on, the main control unit 401 synchronizes the status of the electronic device to the first control terminal 101 used to control electronic device 103. At this time, the status of electronic device 103 in the first control terminal 101 is that the light is on. The main control unit 401 generates update information based on the status information. The slave control unit 402 obtains the update information from the main control unit 401, and then synchronizes the status of electronic device 103 to the second control terminal 102 according to the update information. At this time, the status of electronic device 103 in the second control terminal 102 is that the light is on. The device status in the first control terminal 101 and the second control terminal 102 is synchronized.

[0056] In this embodiment, the main control unit 401 obtains status information to synchronize the device status to the first control terminal 101, and the slave control unit 402 obtains update information from the main control unit 401 to synchronize the device status to the second control terminal 102. This ensures that the status of the electronic device 103 after receiving control commands and executing corresponding actions can be synchronously updated to the first control terminal 101 and the second control terminal 102, so that the device status is displayed consistently on different control terminals.

[0057] In this embodiment, a chip 500 is provided, such as... Figure 5 As shown, the chip 500 may include: a processor 501, a communications interface 502, a memory 503, and a communication bus 504. Wherein: The processor 501, communication interface 502, and memory 503 communicate with each other through the communication bus 504.

[0058] Communication interface 502 is used for communication with other electronic devices or servers.

[0059] The processor 501 is used to execute program 505, which can specifically execute the relevant steps in the aforementioned control method embodiments.

[0060] Specifically, program 505 may include program code that includes computer operation instructions.

[0061] Processor 501 may be a CPU, an Application Specific Integrated Circuit (ASIC), or configured as one or more integrated circuits. A smart device may include one or more processors, which can be of the same type, such as one or more CPUs; or they may be of different types, such as one or more CPUs and one or more ASICs.

[0062] Memory 503 is used to store program 505. Memory 503 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.

[0063] Specifically, program 505 can be used to cause processor 501 to execute the control method in the foregoing embodiments.

[0064] The specific implementation of each step in program 505 can be found in the corresponding steps and units described in the foregoing control method embodiments, and will not be repeated here. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the devices and modules described above can be referred to the corresponding process descriptions in the foregoing method embodiments, and will not be repeated here.

[0065] The chip 500 in this embodiment obtains status information through the main program to synchronize the device status to the first control terminal, and obtains update information from the main program through the subprogram to synchronize the device status to the second control terminal. This ensures that the status of the electronic device after receiving control commands and executing corresponding actions can be synchronously updated to the first and second control terminals, so that the device status is displayed consistently on different control terminals.

[0066] In this embodiment, a computer-readable storage medium is provided to store instructions for causing a machine to perform the control methods described herein. Specifically, a system or apparatus equipped with a storage medium may be provided, on which software program code implementing the functions of any of the embodiments described above is stored, and the computer (or CPU or MPU) of the system or apparatus may read and execute the program code stored in the storage medium.

[0067] In this case, the program code read from the storage medium can itself implement the functions described in the above method embodiments, so the program code and the storage medium storing the program code constitute a part of this application.

[0068] Storage media embodiments for providing program code include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, program code can be downloaded from a server computer via a communication network.

[0069] In this embodiment, a computer program product is provided, including computer instructions that instruct a computing device to perform the operations corresponding to the above method embodiments.

[0070] It should be noted that, depending on the implementation needs, the various components / steps described in the embodiments of this application can be broken down into more components / steps, or two or more components / steps or parts of the operation of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of this application.

[0071] The methods described above according to embodiments of this application can be implemented in hardware, firmware, or implemented as software or computer code that can be stored in a recording medium (such as a CD-ROM, RAM, floppy disk, hard disk, or magneto-optical disk), or implemented as computer code originally stored on a remote recording medium or a non-transitory machine-readable medium and to be stored on a local recording medium after being downloaded via a network. Thus, the methods described herein can be stored on such software processing on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an ASIC or FPGA). It is understood that computers, processors, microprocessor electronic devices, or programmable hardware include storage components (e.g., RAM, ROM, flash memory, etc.) capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods described herein. Furthermore, when a general-purpose computer accesses code used to implement the methods shown herein, the execution of the code transforms the general-purpose computer into a dedicated computer for performing the methods shown herein. Although this application has been shown and described with respect to one or more implementations, equivalent variations and modifications will occur to those skilled in the art based on a reading and understanding of this specification and the accompanying drawings. This application includes all such modifications and variations and is limited only by the scope of the appended claims. In particular, with respect to the various functions performed by the aforementioned components, the terminology used to describe such components is intended to correspond to any component (unless otherwise indicated) that performs the specified function of said component (e.g., is functionally equivalent to it), even if it is not structurally equivalent to the disclosed structure that performs the functions in the exemplary implementations of this specification shown herein.

[0072] That is, the above description is only an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural changes made using the content of this application’s specification and drawings, such as the combination of technical features between different embodiments, or direct or indirect application in other related technical fields, are similarly included within the patent protection scope of this application.

[0073] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, features defined as "first" or "second" may explicitly or implicitly include one or more features. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0074] The above description is provided to enable any person skilled in the art to implement and use this application. Various details are set forth in the above description for purposes of explanation. It should be understood that those skilled in the art will recognize that this application can be implemented without using these specific details. In other embodiments, well-known processes will not be described in detail to avoid obscuring the description of this application with unnecessary detail. Therefore, this application is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed herein.

[0075] It should be noted that, without conflict, the various embodiments and / or technical features described in this application can be arbitrarily combined with each other, and the resulting technical solutions should also fall within the protection scope of this application.

[0076] It should be understood that the specific examples in the embodiments of this application are only for the purpose of helping those skilled in the art to better understand the embodiments of this application, and are not intended to limit the scope of the embodiments of this application. Those skilled in the art can make various improvements and modifications based on the above embodiments, and all such improvements or modifications fall within the protection scope of this application. The above descriptions are merely specific implementations of this application, but the protection scope of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the protection scope of this application. Therefore, the protection scope of this application should be determined by the protection scope of the claims.

Claims

1. A control method applied to electronic devices, characterized in that, The method includes: The main program receives control commands and controls the electronic device to perform corresponding actions based on the control commands. The main program obtains the status information of the electronic device and synchronizes the status of the electronic device to the first control terminal for controlling the electronic device based on the status information. The slave program obtains update information from the main program and synchronizes the state of the electronic device to a second control terminal for controlling the electronic device based on the update information. The update information is generated based on the state information. The second control terminal is used to control the electronic device through a protocol provided by the slave program. The first control terminal and the second control terminal control the electronic device through different protocols.

2. The method according to claim 1, characterized in that, Receiving control commands through the main program includes at least one of the following operations: i. Receive the control command generated by the control button set on the electronic device being triggered through the main program; ii. Receive the control command from the first control terminal through the main program; iii. The main program receives the control command from the slave program, the control command being sent to the slave program by the second control terminal.

3. The method according to claim 1, characterized in that, The step of obtaining the update information from the main program through the program includes: The slave program receives the update information sent by the master program, or the slave program periodically obtains the update information from the master program when the electronic device needs to report its status.

4. The method according to claim 2, characterized in that, The receiving of control commands through the main program includes: The main program receives control instructions from the instruction distribution unit. The instruction distribution unit sorts the received control instructions and sends them to the main program sequentially. The control instructions received by the instruction distribution unit include one or more of the following: control instructions generated when the control button is triggered, control instructions sent by the first control terminal, and control instructions sent by the second control terminal to the slave program and then forwarded by the slave program.

5. The method according to claim 1, characterized in that, The step of synchronizing the state of the electronic device to a first control terminal for controlling the electronic device based on the state information includes: Based on the historical state information of the last time the state of the electronic device was synchronized to the first control terminal, and the difference between the current state information of the electronic device, an incremental change set is generated; based on the incremental change set, the state of the electronic device is synchronized to the first control terminal used to control the electronic device; The step of obtaining update information from the main program through a slave program and synchronizing the state of the electronic device to a second control terminal for controlling the electronic device based on the update information includes: The slave program obtains the update information determined by the incremental change set from the main program, and synchronizes the state of the electronic device to the second control terminal for controlling the electronic device based on the update information.

6. The method according to claim 1, characterized in that, The step of controlling the electronic device to perform corresponding actions according to the control command includes: According to the order in which the main program receives multiple control commands, it sequentially controls the electronic device to perform corresponding actions based on the control commands.

7. The method according to any one of claims 1-6, characterized in that, The main program and the slave program are different processes, or the main program and the slave program are different threads included in the same process.

8. A chip used in electronic devices, characterized in that, The chip includes a master control unit and a slave control unit; The main control unit is used to receive control commands and control the electronic device to perform corresponding actions according to the control commands, and to obtain the status information of the electronic device and synchronize the status of the electronic device to the first control terminal for controlling the electronic device according to the status information. The slave control unit is used to obtain update information from the master control unit and synchronize the status of the electronic device to a second control terminal for controlling the electronic device according to the update information. The update information is generated based on the status information. The second control terminal is used to control the electronic device through a protocol provided by the slave control unit. The first control terminal and the second control terminal control the electronic device through different protocols.

9. A chip, characterized in that, include: The processor, communication interface, memory, and communication bus communicate with each other through the communication bus. The memory is used to store at least one executable instruction that causes the processor to perform the operation corresponding to the method as described in any one of claims 1-7.

10. An electronic device, characterized in that, Includes the chip as described in claim 8 or 9.

11. A computer storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described in any one of claims 1-7.

12. A computer program product comprising computer instructions that instruct a computing device to perform an operation corresponding to the method described in any one of claims 1-7.