Remote control method, electronic device, and communication system
By establishing long-term connections with the server using the secondary processor and the main processor respectively when the controlled device is powered off and powered on, and performing security authentication and password refresh, the problem of unauthorized control of the controlled device in remote control is solved, achieving higher communication security and privacy protection.
Patent Information
- Application Number
- CN202310809172.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-30
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2043-06-30
AI Technical Summary
How to prevent the controlled device from being maliciously controlled by unauthorized devices during remote control and ensure the security of remote control.
After the controlled device is powered off, a long connection is established with the server through the secondary processor. When powered on, a communication connection is established with the server through the main processor. Security authentication and regular updates of cloud account passwords are performed to ensure the security of communication information.
It improves the security of communication information between the controlled device and the master control device, protects the security of privacy information, and enhances the reliability and security of remote control.
Smart Images

Figure CN119232418B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the terminal field, and in particular to a remote control method, an electronic device and a communication system. BACKGROUND
[0002] With the development of terminal technology, users can remotely control the controlled device to perform various tasks through the master device. How to avoid the controlled device being maliciously controlled by illegal devices and ensure the security of remote control is a problem to be solved. SUMMARY
[0003] The present application discloses a remote control method, an electronic device and a communication system. The method is applied to a communication system including a first device (controlled device), a second device (master device) and a server. After the controlled device is powered off, the controlled device establishes a long connection with the server through a secondary processor. When the controlled device is in a powered-on state, the controlled device establishes a communication connection with the server through a primary processor. After the controlled device establishes a connection with the server through the primary processor / secondary processor, the remote control instruction is received and responded. In addition, before responding to the remote control instruction, the controlled device can perform any one or more of the following: security authentication with the server, security authentication with the master device, and periodically refreshing the password corresponding to the cloud account used to establish the connection with the server, and encrypting the storage of the cloud account and the password corresponding thereto, thereby improving the security of remote control.
[0004] In a first aspect, the present application provides a remote control method, which is applied to a communication system including a first device, a second device and a server. The first device includes a primary processor and a secondary processor. The method includes: the primary processor of the first device is in a working state, and the authentication information of the first device is sent to the server through the primary processor; the server sends the authentication information of the first device to the second device; the second device sends an authentication request to the first device through the server, and the authentication request carries first data encrypted by a public key of the first device. The first data is calculated by a preset algorithm on any one or more of the following data: the authentication information, a random number of the first device, and a random number of the second device; the primary processor of the first device is in a non-working state, and the first data is calculated by the secondary processor using the private key of the first device and the preset algorithm on the authentication information, and a first key is determined based on the first data; the second device sends a first instruction encrypted by the first key to the first device through the server; the first device uses the first key to decrypt the first instruction through the secondary processor, and starts the primary processor through the secondary processor in response to the first instruction.
[0005] The method described in the first aspect can ensure the security of communication information between the controlled device (the first device) and the master device (the second device), and improve the security of remote control.
[0006] According to the method described in the first aspect, the authentication information of the first device includes any one or more of the following: an authentication code of the first device, an identifier of the first device, or a public key of the first device.
[0007] In this way, the second device and the first device can subsequently negotiate the first key based on one or more pieces of data, and the reliability of the first key is ensured.
[0008] According to the method described in the first aspect, the first device determines the first key based on the first data through the secondary processor, specifically including: the first device determines the first data as the first key through the secondary processor; or the first device generates the first key through the first data and a second algorithm, and sends the second algorithm to the first device through the server.
[0009] According to the method described in the first aspect, the first device sends the authentication information of the first device to the server through the primary processor, specifically including: the first device sends a registration request to the server through the primary processor, and the registration request carries the authentication information of the first device encrypted using the public key of the server.
[0010] In this way, the security of communication information between the first device and the server is ensured.
[0011] According to the method described in the first aspect, the server decrypts the authentication information of the first device using the private key of the server in response to the registration request, and sends a first account and a first password to the first device.
[0012] According to the method described in the first aspect, after the server sends the first account and the first password to the first device, the method further includes: when the primary processor of the first device is in a working state, the first device establishes a second connection with the server using the first account and the first password through the primary processor; and when the primary processor of the first device is in a non-working state, the first device establishes a first connection with the server using the first account and the first password through the secondary processor.
[0013] In this way, the controlled device can establish a connection with the server through different processors in different states, and thus remote control can be realized in more scenarios, for example, in the scenario where the controlled device is powered off, the secondary processor can be used to remotely wake up the primary processor to control the controlled device to be powered on.
[0014] According to the method described in the first aspect, the performance of the main processor is superior to that of the secondary processor, and the second connection is established while the first connection is disconnected.
[0015] According to the method described in the first aspect, after the server sends the first account and the first password to the first device, the method further comprises: in the case that the first password is used for a time period exceeding a preset time period, the server refreshes the first password as a second password and sends the second password to the first device.
[0016] In this way, the password can be refreshed periodically, and the secure communication between the controlled device and the server is further ensured, and the security of remote control is further improved.
[0017] According to the method described in the first aspect, after the server sends the second password to the first device, the method further comprises: the first device receives the second password through the main processor and sends the second password to the secondary processor; or the first device receives the second password through the secondary processor.
[0018] According to the method described in the first aspect, after the first device receives the second password through the secondary processor, the method further comprises: in the case that the main processor of the first device is in a working state, the first device requests the server to establish the second connection through the main processor using the first account and the first password; the server determines that the first password is different from the second password; the server refreshes the second password as a third password and sends the third password to the first device; the first device receives the third password through the main processor and sends the third password to the secondary processor.
[0019] According to the method described in the first aspect, before the server refreshes the first password as a second password, the method further comprises: the first device sends verification information to the server, the verification information being generated by encrypting the server's public key; and the server verifies the verification information by using the server's private key.
[0020] According to the method described in the first aspect, before the first device starts the main processor through the secondary processor, the method further comprises: the first device further receives a device account and a password corresponding to the device account sent by the second device through the server; the first device determines that the device account is the same as the account of the first device, and the password corresponding to the device account is the same as the password corresponding to the account of the first device.
[0021] In this way, the instruction of the main control device can be further authenticated based on the device account and the corresponding password of the controlled device, and the security of remote control is further ensured.
[0022] In a second aspect, the present application provides a method applied to a first device comprising a main processor and a secondary processor, the method comprising: the main processor of the first device being in an active state, sending authentication information of the first device to a server through the main processor, so that the server sends the authentication information of the first device to a second device; the first device receiving an authentication request sent by the second device through the server, the authentication request carrying first data encrypted by a public key of the first device, the first data being calculated by a preset algorithm on any one or more of the following data: authentication information of the first device, a random number of the first device, a random number of the second device; the main processor of the first device being in an inactive state, the secondary processor calculating the first data from the authentication information by using a private key of the first device and the preset algorithm, and determining a first key based on the first data; the first device receiving a first instruction encrypted by the first key sent by the second device through the server; the first device decrypting the first instruction by using the first key through the secondary processor, and starting the main processor through the secondary processor in response to the first instruction.
[0023] In combination with the method described in the second aspect, the authentication information of the first device comprises any one or more of the following: an authentication code of the first device, an identifier of the first device.
[0024] In combination with the method described in the second aspect, the first device determines the first key based on the first data through the secondary processor, specifically comprising: the first device determines the first data as the first key through the secondary processor; or the first device generates the first key by using the first data and a second algorithm, and sends the second algorithm to the first device through the server.
[0025] In combination with the method described in the second aspect, the first device sends the authentication information of the first device to the server through the main processor, specifically comprising: the first device sends a registration request to the server through the main processor, the registration request carrying the authentication information of the first device encrypted by a public key of the server.
[0026] In combination with the method described in the second aspect, the method further comprises: in the case that the authentication information of the first device is decrypted by a private key of the server, the first device receives a first account and a first password sent by the server.
[0027] In combination with the method described in the second aspect, the first device receives the first account number and the first password sent by the server, specifically comprising: in the case that the main processor of the first device is in the working state, the first device establishes a second connection with the server by using the first account number and the first password through the main processor; in the case that the main processor of the first device is in the non-working state, the first device establishes a first connection with the server by using the first account number and the first password through the auxiliary processor.
[0028] In combination with the method described in the second aspect, the performance of the main processor is superior to the performance of the auxiliary processor, and the second connection is established while the first connection is disconnected.
[0029] In combination with the method described in the second aspect, after the server sends the first account number and the first password to the first device, the method further comprises: in the case that the first password usage duration exceeds the preset duration, the first device receives the second password sent by the server.
[0030] In combination with the method described in the second aspect, after the first device receives the second password sent by the server, specifically comprising: the first device receives the second password sent by the server through the main processor, and sends the second password to the auxiliary processor; or the first device receives the second password sent by the server through the auxiliary processor.
[0031] In combination with the method described in the second aspect, after the first device receives the second password sent by the server through the auxiliary processor, the method further comprises: in the case that the main processor of the first device is in the working state, the first device requests the server to establish the second connection by using the first account number and the first password through the main processor; the first device receives the third password sent by the server through the main processor, and sends the third password to the auxiliary processor.
[0032] In combination with the method described in the second aspect, before the first device receives the second password sent by the server, the method further comprises: the first device sends the signature verification information to the server, the signature verification information is generated by encrypting the server public key, and the signature verification information is used for the server to verify by using the server private key.
[0033] In combination with the method described in the second aspect, before the first device starts the main processor through the auxiliary processor, the method further comprises: the first device further receives the device account number and the password corresponding to the device account number sent by the second device through the server; the first device determines that the device account number is the same as the account number of the first device, and the password corresponding to the device account number is the same as the password corresponding to the account number of the first device.
[0034] In combination with the method described in the second aspect, the first device encrypts storage of any one or more of the following: authentication information of the first device, the first key, the public key of the server, the public key of the first device, the private key of the first device, the account number of the first device, or a password corresponding to the account number of the first device.
[0035] In a third aspect, the present application provides a remote control method, which is applied to a second device, and the method comprises the following steps: the second device receives authentication information of a first device forwarded by a server; the first authentication information is received by the server from the first device when a main processor of the first device is in a working state; the second device sends an authentication request to the first device through the server, the authentication request carrying first data encrypted by a public key of the first device, the first data being calculated by a preset algorithm on any one or more of the following data: the authentication information, a random number of the first device, and a random number of the second device; the authentication request is used to calculate the first data by a private key of the first device and the preset algorithm through a secondary processor of the first device when the main processor of the first device is in a non-working state, and determine a first key based on the first data; the second device sends a first instruction encrypted by the first key to the first device through the server, so that the first device decrypts the first instruction by the first key through the secondary processor, and starts the main processor through the secondary processor in response to the first instruction.
[0036] In a fourth aspect, the present application provides an electronic device, which comprises a plurality of memories and a plurality of processors; the memories are coupled with the processors, the memories are used to store computer program codes, the computer program codes comprise computer instructions, and the processors invoke the computer instructions to make the electronic device execute the method described in any one of the second aspect or the third aspect.
[0037] In a fifth aspect, the present application provides a chip, which is applied to an electronic device, and the chip is used to invoke computer instructions to make the electronic device execute the method described in any one of the second aspect or the third aspect.
[0038] In a sixth aspect, the present application provides a computer readable storage medium, which comprises instructions, and when the instructions run on an electronic device, the instructions make the electronic device execute the method described in any one of the second aspect or the third aspect.
[0039] In a seventh aspect, the present application provides a communication system, comprising a first device, a second device and a server; the first device comprises a plurality of memories and a plurality of processors; the memories are coupled with the processors, the memories are used to store computer program codes, the computer program codes comprise computer instructions, and the processors invoke the computer instructions to make the first device execute the method described in any one of the second aspect; the second device comprises a plurality of memories and a plurality of processors; the memories are coupled with the processors, the memories are used to store computer program codes, the computer program codes comprise computer instructions, and the processors invoke the computer instructions to make the second device execute the method described in any one of the third aspect. BRIEF DESCRIPTION OF DRAWINGS
[0040] Figure 1 A schematic diagram of a communication system 10 provided by an embodiment of the present application is shown in FIG. 1;
[0041] Figure 2 A schematic diagram of a hardware architecture of a master device provided by an embodiment of the present application is shown in FIG. 2;
[0042] Figure 3A A schematic diagram of a hardware architecture of a slave device provided by an embodiment of the present application is shown in FIG. 3;
[0043] Figure 3B A schematic diagram of a software architecture of a slave device provided by an embodiment of the present application is shown in FIG. 4;
[0044] Figure 4 A schematic diagram of a hardware architecture of a server provided by an embodiment of the present application is shown in FIG. 5;
[0045] Figures 5A-5D A schematic diagram of an operation interface for normal shutdown of a group of slave devices provided by an embodiment of the present application is shown in FIG. 6;
[0046] Figures 6A-6H A schematic diagram of an operation interface for remote startup of a group of slave devices by a master device provided by an embodiment of the present application is shown in FIG. 7;
[0047] Figures 7A-7C A schematic diagram of an operation interface for local startup of a group of slave devices provided by an embodiment of the present application is shown in FIG. 8;
[0048] Figures 8A-8F A schematic diagram of a scenario in which a slave device secondary processor is powered off and then powered on again provided by an embodiment of the present application is shown in FIG. 9;
[0049] Figure 9 A flowchart of a remote control method provided by the present application is shown in FIG. 10;
[0050] Figure 10 An interaction flow among devices involved in a remote control method provided by the present application is shown in FIG. 11;
[0051] Figure 11 An interactive process for remote control by the secondary processor of the master device is provided for the present application;
[0052] Figure 12 An interactive process for remote control by the main processor of the master device is provided for the present application;
[0053] Figure 13 An interactive process for information synchronization between the main processor and the secondary processor is provided for the present application. DETAILED DESCRIPTION
[0054] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text only describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which means that there are three cases of A alone, A and B together, and B alone.
[0055] Hereinafter, the terms "first" and "second" are only used for description purposes, and cannot be understood as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with "first" and "second" can explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" is two or more.
[0056] In the present application, the phrase "embodiment" means that the specific features, structures or properties described in conjunction with the embodiment can be included in at least one embodiment of the present application. The phrase appears at various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment to other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in the present application can be combined with other embodiments.
[0057] The term "user interface (UI)" in the embodiments of the present application is a medium interface for interaction and information exchange between an application program or an operating system and a user, which realizes conversion between internal forms of information and forms acceptable by the user. The user interface is source code written in a specific computer language such as Java, extensible markup language (XML), and the like. The interface source code is parsed and rendered on an electronic device, and finally presented as content recognizable by the user. A commonly used form of the user interface is a graphic user interface (GUI), which refers to a user interface displayed in a graphical manner and related to computer operation. It can be a visual interface element such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, Widgets, and the like displayed in the display screen of the electronic device.
[0058] The present application discloses a remote control method, an electronic device, and a communication system. The method is applied to a communication system including a master device, a controlled device, and a server. After the controlled device is powered off, the controlled device establishes a long connection with the server through a secondary processor. When the controlled device is in a powered-on state, the controlled device establishes a communication connection with the server through a primary processor. The controlled device can receive and respond to remote control instructions through the connection between the primary processor / secondary processor and the server. In addition, before responding to the remote control instructions, the controlled device also needs to perform security authentication with the server, security authentication with the master device, periodically refresh a password corresponding to a cloud account used to establish the connection with the server, and encrypt the storage of the cloud account and the corresponding password.
[0059] Next, several important concepts related to the present application are introduced, including:
[0060] The long connection is a relative concept of the short connection. The short connection refers to that the controlled device and the server establish a connection each time data needs to be sent, and then disconnect the connection after the data is sent, that is, each established connection is only used to complete a data sending operation. The long connection refers to that the controlled device and the server do not disconnect the connection after establishing the connection and sending the data, but continue to maintain the connection, and then directly send data on the maintained connection when subsequent data needs to be sent. In the case of maintaining the long connection between the controlled device and the server, the controlled device and the server can continuously send multiple data packets on one connection. During the long connection maintenance period, if no data packet is sent for a long time, the controlled device and the server usually need to detect the current communication link to timely discover the failure of the communication link.
[0061] The reconnection function includes that after the secondary processor is disconnected from the long connection with the server, the secondary processor can automatically request the server to establish the long connection. For example, if the secondary processor is suddenly disconnected from the long connection with the server, after being powered on again, the secondary processor can automatically trigger the request to the server to establish the long connection.
[0062] In the embodiment of the present application, in addition to the secondary processor of the controlled device establishing the long connection with the server to realize the remote start after determining that the controlled device is powered off, the secondary processor of the controlled device establishes the long connection with the server to realize the remote function as long as the secondary processor determines that the main processor is in a non-working state.
[0063] The non-working state of the main processor includes but is not limited to the state that the controlled device is powered off, hibernated, slept, or powered on but faulty. Specifically, in the hibernated or slept state, the controlled device establishes the long connection with the server through the secondary processor to realize the remote wake-up, or in the powered-on but faulty state, the controlled device establishes the long connection with the server through the secondary processor to realize the remote restart.
[0064] The working state of the main processor includes the state that the controlled device is powered on but not faulty. Specifically, when the controlled device is powered on, the main processor is powered on, so it has the working condition, and further, if the controlled device is not faulty, the main processor can work normally. Generally, whether the main processor is in the non-working state or the working state, the secondary processor is in the working state.
[0065] It can be seen that after the remote control method provided by the present application is implemented, the safety of remote control can be guaranteed in many aspects, and the following technical effects can be brought:
[0066] (1) The safety of the communication information between the controlled device and the server is guaranteed.
[0067] (2) The safety of the communication information between the controlled device and the main controlled device is guaranteed.
[0068] (3) The safety of the private information stored in the main processor and the secondary processor of the controlled device is guaranteed.
[0069] Next, the architecture schematic diagram of the communication system 10 to which the remote control method provided by the present application is applied, and the product form of each device included in the communication system 10 are introduced.
[0070] Reference Figure 1 , Figure 1 An architecture schematic diagram of a communication system 10 provided by an embodiment of the present application is exemplarily shown.
[0071] As Figure 1As shown, the communication system 10 can include a master device, a server and a slave device. Figure 1 The number of each device is only exemplified as one, but the number of the master device, the server and the slave device can be one or more respectively, and the embodiments of the present application do not limit this.
[0072] The master device is also referred to as a second device. The master device can be a portable terminal device loaded with an operating system such as Android, iOS, Windows, Linux, Mac OS, or other operating systems. The product form of the master device includes but is not limited to a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), a wearable device, a vehicle-mounted device, or other types of electronic devices, etc.
[0073] In the embodiments of the present application, the master device can establish a communication connection with the server and perform data communication based on the communication connection. Specifically, the following includes:
[0074] (1) After detecting a remote control operation input by a user, the master device can send an instruction for remotely controlling the slave device (such as an instruction for turning on, sleep wake-up, hibernate wake-up, reboot, or shutdown) to the server based on the communication connection in response to the operation.
[0075] (2) The master device can also receive state information of the slave device (such as state information of shutdown, hibernate, sleep, failure, power, etc.) forwarded by the server based on the communication connection.
[0076] The slave device is also referred to as a first device. The slave device can be a portable terminal device loaded with an operating system such as Android, iOS, Windows, Linux, Mac OS, or other operating systems. The product form of the slave device includes but is not limited to a tablet computer, a desktop computer, a laptop computer, a notebook computer, an ultra-mobile personal computer, a netbook, and an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, a vehicle-mounted device, a smart home device, and / or a smart city device, etc.
[0077] In the embodiments of the present application, the slave device can establish a communication connection with the server through the main processor / secondary processor and perform data communication based on the communication connection. Specifically, the following includes:
[0078] (1) The controlled device can establish a long connection with the server through the secondary processor, and the controlled device can also receive remote control instructions or send the status of the controlled device based on the long connection.
[0079] Specifically, in the case of the controlled device being powered off, hibernating, sleeping, or powered on but malfunctioning, the main processor of the controlled device is in a non-working state, while the secondary processor and the EC are in a working state. Therefore, the controlled device can establish a long connection with the server through the secondary processor and perform data communication based on the long connection. For example, the secondary processor can receive the remote control instructions of the master device forwarded by the server (such as the instructions of powering on, sleep wake-up, hibernation wake-up, and restarting) based on the long connection, and then the secondary processor notifies the EC to start the processor to perform the corresponding task based on the remote control instructions. For another example, the controlled device can also send the status information of the controlled device (such as the status information of power-off, hibernation, sleep, malfunction, and power) to the server based on the long connection established by the secondary processor and the server.
[0080] (2) Figure 1 The controlled device can establish a long connection with the server through the secondary processor, and the controlled device can also receive remote control instructions or send the status of the controlled device based on the long connection.
[0081] Specifically, in the case of the controlled device being powered on and not malfunctioning, the main processor of the controlled device is in a working state. Therefore, the controlled device can establish a communication connection with the server through the main processor and perform data communication based on the long connection. For example, the main processor can receive the remote control instructions of the master device forwarded by the server (such as the instructions of powering off, hibernating, sleeping, restarting, or playing music) based on the communication connection, and then the main processor directly executes the corresponding task based on the remote control instructions. For another example, the controlled device can also send the status information of the controlled device (such as the status information of power-on and power) to the server based on the communication connection established by the main processor and the server.
[0082] The specific implementation of the controlled device establishing a communication connection with the server through the secondary processor / main processor and performing the above data communication can refer to the description of the method in the following Figures 9-13 , which will not be described here in detail.
[0083] In addition, in the controlled device, the main processor and the secondary processor can be connected by a bus, the main processor and the EC can also be connected by a bus, and the secondary processor and the EC can also be connected by a bus.
[0084] Based on the bus connection between the main processor and the secondary processor, the main processor can synchronize information and send bus heartbeat messages to the secondary processor. The synchronized information includes connection configuration information and device configuration information. The synchronized information is sent in the form of bus messages, so the connection configuration information can also be referred to as a connection configuration message, and the device configuration information can also be referred to as a device configuration message. The connection configuration information is used for the secondary processor to use the same server login information as the main processor to establish a long connection with the server. The device configuration information is used for the secondary processor to access the network after obtaining the network configuration information, and is also used for the secondary processor to learn the capabilities of the controlled device, so that it can parse and respond to remote control instructions when receiving the remote control instructions.
[0085] Based on the bus connection between the main processor and the EC, the EC can control the main processor to start working based on the remote control instructions received from the secondary processor. And based on the bus connection between the main processor and the EC, the EC can query the state information of the controlled device from the main processor, including but not limited to: the states of booting, shutting down, sleeping, hibernating, failure, or the states of power, etc.
[0086] Based on the bus connection between the secondary processor and the EC, the secondary processor can send corresponding remote control instructions to the EC based on the remote control instructions received from the server. And based on the bus connection between the secondary processor and the EC, the EC can send the state information of the controlled device to the secondary processor, including but not limited to: the states of booting, shutting down, sleeping, hibernating, failure, or the states of power, etc.
[0087] Regarding the connection relationship and data interaction between various modules in the controlled device, the specific implementation can refer to the description of the software architecture of the controlled device shown in Figure 3B , and the description of the method of Figures 9-13 , which will not be described here in detail.
[0088] The server is equivalent to a remote relay device between the master device and the controlled device, and is used to provide remote control services for the master device. It includes: receiving instructions sent by the master device and sending the instructions to the controlled device, so that the controlled device can execute corresponding tasks according to the instructions. It also includes: receiving state information sent by the controlled device and sending the state information to the master device, so that the master device can show the state of the controlled device to the user.
[0089] Based on the foregoing introduction to the architecture of the communication system 10, the software and hardware architectures of each device included in the communication system 10 will be introduced next.
[0090] Referring to Figure 2 , Figure 2 , a hardware architecture schematic diagram of the master device is shown.
[0091] As Figure 2 The master device can include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headset jack 170D, a sensor module 180, a key 190, a camera 193, a display screen 194, and the like. The sensor module 180 can include a pressure sensor 180A, a touch sensor 180B.
[0092] It can be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the master device. In other embodiments of the present application, the master device can include more or fewer components than the illustration, or combine certain components, or split certain components, or different component arrangements. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.
[0093] The processor 110 can include one or more processing units, for example: the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units can be independent devices or integrated into one or more processors.
[0094] The controller can be the nerve center and command center of the master device. The controller can generate operation control signals according to instruction operation codes and timing signals to complete the control of fetching instructions and executing instructions.
[0095] The memory in the processor 110 can also be provided for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can save instructions or data that the processor 110 has just used or repeatedly uses. If the processor 110 needs to use the instructions or data again, it can directly call from the memory. This avoids repeated access and reduces the waiting time of the processor 110, thus improving the efficiency of the system.
[0096] In the embodiments of the present application, the processor 110 is configured to control the corresponding software and hardware modules to perform the following Figures 9-13 The method described can be combined with the related description of the following Figures 9-13 not described here.
[0097] In some embodiments, the processor 110 can include one or more interfaces. The interface can include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver / transmitter (universal asynchronous receiver / transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input / output (general-purpose input / output, GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and / or a universal serial bus (universal serial bus, USB) interface, etc.
[0098] The USB interface 130 is an interface that conforms to the USB standard specification, and can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the master device.
[0099] It can be understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is only illustrative and does not constitute a structural limitation of the master device. In some other embodiments of the present application, the master device can also use different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0100] The charging management module 140 is configured to receive charging input from the charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive the charging input of the wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive the wireless charging input through the wireless charging coil of the master device. The charging management module 140 can charge the battery 142 while also supplying power to the master device through the power management module 141.
[0101] The power management module 141 is configured to connect the battery 142 and the charging management module 140 to the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 can also be configured to monitor parameters such as the battery capacity, the number of battery cycles, the battery health status (leakage, impedance), and the like. In some other embodiments, the power management module 141 can also be disposed in the processor 110. In some other embodiments, the power management module 141 and the charging management module 140 can also be disposed in the same device.
[0102] The wireless communication function of the host device can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor, and the like.
[0103] The antenna 1 and the antenna 2 are configured to transmit and receive electromagnetic wave signals. Each antenna in the host device can be configured to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example, the antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in combination with a tuning switch.
[0104] The mobile communication module 150 can provide a solution for wireless communication including 2G / 3G / 4G / 5G and the like applied to the host device. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), and the like. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter, amplify, and the like the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can also amplify signals modulated by the modem processor and radiate the signals as electromagnetic waves through the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 150 can be disposed in the processor 110. In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 can be disposed in the same device.
[0105] The modem processor can include a modulator and a demodulator. The modulator is configured to modulate a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is configured to demodulate a received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low-frequency baseband signal processed by the baseband processor is transmitted to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a microphone 170B, etc.), or displays an image or a video through the display screen 194. In some embodiments, the modem processor can be a separate device. In other embodiments, the modem processor can be independent of the processor 110 and disposed in the same device as the mobile communication module 150 or other functional modules.
[0106] The wireless communication module 160 can provide a wireless communication solution applied on the host device, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc. The wireless communication module 160 can be one or more devices integrated with at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, demodulates and filters the electromagnetic wave signal, and transmits the processed signal to the processor 110. The wireless communication module 160 can also receive a signal to be transmitted from the processor 110, modulate it, amplify it, and convert it into electromagnetic wave radiation via the antenna 2.
[0107] In some embodiments, the antenna 1 of the host device is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the host device can communicate with the network and other devices through wireless communication technology. The wireless communication technology can include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS can include global positioning system (GPS), global navigation satellite system (GLONASS), beidou navigation satellite system (BDS), quasi-zenith satellite system (QZSS), and / or satellite based augmentation systems (SBAS).
[0108] In the embodiments of the present application, the host device can establish a communication connection with the server through the aforementioned mobile communication module 150 or wireless communication module 160, and then send remote control instructions for the controlled device to the server based on the communication connection.
[0109] In the embodiments of the present application, the host device realizes the display function through the GPU, the display screen 194, and the application processor, etc. The GPU is a microprocessor for image processing, connected with the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 can include one or more GPUs that execute program instructions to generate or change display information.
[0110] The display screen 194 is configured to display images, videos, and the like. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD). The display panel can also be manufactured by using an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flex light-emitting diode (FLED), a miniled, a micro Led, a micro-oled, a quantum dot light emitting diodes (QLED), and the like. In some embodiments, the host device can include one or N display screens 194, where N is a positive integer greater than 1.
[0111] In the embodiments of the present application, the host device can display, for example, a user interface such as shown in the following UI embodiments, through the display screen 194. Details are not described herein. Figures 6A-6F 、 Figure 8B 、 Figure 8D and Figure 8F The host device can display, for example, a user interface such as shown in the following UI embodiments, through the display screen 194. Details are not described herein.
[0112] The host device can implement the photographing function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, and the application processor.
[0113] The ISP is configured to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electric signal, and the camera photosensitive element transmits the electric signal to the ISP for processing, and converts it into an image visible to the naked eye. The ISP can also optimize the noise and brightness of the image through an algorithm. The ISP can also optimize the exposure, color temperature, and other parameters of the shooting scene. In some embodiments, the ISP can be arranged in the camera 193.
[0114] The camera 193 is used to capture still images or videos. Objects project optical images through the lens to the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into a standard RGB, YUV, etc. format image signal. In some embodiments, the host device can include 1 or N cameras 193, N being a positive integer greater than 1.
[0115] The digital signal processor is used to process digital signals, in addition to being able to process digital image signals, it can also process other digital signals. For example, when the host device selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, etc.
[0116] The video codec is used to compress or decompress digital video. The host device can support one or more video codecs. In this way, the host device can play or record videos in multiple encoding formats, such as: moving picture experts group (MPEG) 1, MPEG 2, MPEG 3, MPEG 4, etc.
[0117] The NPU is a neural-network (NN) computing processor, which learns from the structure of biological neural networks, such as the transmission mode between human brain neurons, and quickly processes input information, and can also continuously self-learn. Through the NPU, the host device can realize intelligent cognitive applications, such as: image recognition, face recognition, voice recognition, text understanding, etc.
[0118] The internal memory 121 can include one or more random access memories (RAMs) and one or more non-volatile memories (NVMs).
[0119] The random access memory can include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, such as the fifth generation of DDR SDRAM commonly referred to as DDR5 SDRAM), and the like.
[0120] The non-volatile memory can include a magnetic disk storage device, flash memory.
[0121] The flash memory can include NOR FLASH, NAND FLASH, 3D NAND FLASH, and the like according to the operating principle, and can include single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), and the like according to the storage unit potential order, and can include universal flash storage (UFS), embedded multi media Card (eMMC), and the like according to the storage specification.
[0122] The random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of an operating system or other programs running, and can also be used to store data of users and application programs, and the like.
[0123] The non-volatile memory can also store executable programs and store data of users and application programs, and the like, and can be loaded in advance into the random access memory for direct reading and writing by the processor 110.
[0124] The external memory interface 120 can be used to connect an external non-volatile memory to realize the expansion of the storage capacity of the host device. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, files such as music and video are saved in the external non-volatile memory.
[0125] The host device can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, the application processor, etc. For example, music playing, recording, etc.
[0126] The pressure sensor 180A is used to sense a pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be disposed on the display screen 194. The pressure sensor 180A can be of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, etc. The capacitive pressure sensor can include at least two parallel plates of conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The host device determines the intensity of the pressure according to the change in capacitance. When a touch operation is applied to the display screen 194, the host device detects the intensity of the touch operation according to the pressure sensor 180A. The host device can also calculate the position of the touch according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation instructions. For example, when a touch operation with an intensity less than a first pressure threshold is applied to the short message application icon, an instruction to view short messages is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to the short message application icon, an instruction to create a new short message is executed.
[0127] The touch sensor 180B, also referred to as a "touch panel". The touch sensor 180B can be disposed on the display screen 194, and the touch sensor 180B and the display screen 194 together form a touch screen, also referred to as a "touch panel". The touch sensor 180B is used to detect a touch operation applied thereto or in the vicinity thereof. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180B can also be disposed on the surface of the host device, which is different from the position of the display screen 194.
[0128] In this application, the host device can detect an operation applied to the display screen 194 through the pressure sensor 180A and the touch sensor 180B, such as the touch operation shown in the following Figures 6A-6F .
[0129] The keys 190 include a power-on key, a volume key, etc. The keys 190 can be mechanical keys. They can also be touch keys. The host device can receive key inputs and generate key signal inputs related to user settings and function control of the host device.
[0130] Reference Figure 3A , Figure 3A A hardware architecture schematic diagram of the controlled device is shown.
[0131] As Figure 3A The controlled device can include a main processor 201, a secondary processor 202, an EC 203, a communication module 204, a memory 205, a display screen 206, and a universal serial bus 207. It can be understood that the hardware architecture illustrated in the embodiments of the present application does not constitute a specific limitation on the controlled device. In other embodiments of the present application, the controlled device can include more or fewer components than illustrated, or combine certain components, or split certain components, or different arrangement of components. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.
[0132] The main processor 201 can include one or more processing units, for example: the main processor 201 can include an AP, a modem processor, a GPU, an ISP, a controller, a memory, a video codec, a DSP, a baseband processor, and / or an NPU, etc. Among them, different processing units can be independent devices, or can be integrated in one or more processors. Among them, the controller can be the nerve center and command center of the controlled device. The controller can generate operation control signals according to instruction operation codes and timing signals to complete the control of fetching instructions and executing instructions. Usually, in the case of shutting down, hibernating, sleeping, etc. of the controlled device, the main processor 201 is powered off, and only in the case of turning on the controlled device, the main processor 201 is powered on.
[0133] A cache memory can also be provided in the main processor 201. In some embodiments, the cache memory can store instructions or data that have just been used or are used repeatedly by the main processor 201. If the main processor 201 needs to use the instructions or data again, it can be directly called from the memory. This avoids repeated access and reduces the waiting time of the main processor 201, thereby improving the efficiency of the system.
[0134] The main processor 201 can include one or more interfaces. The interface can include an integrated circuit (inter-integrated circuit, I2C) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver / transmitter (universal asynchronous receiver / transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input / output (general-purpose input / output, GPIO) interface, and / or a universal serial bus (universal serial bus, USB) interface, etc.
[0135] The secondary processor 202 is a low-power microcontroller unit (MCU) that supports wireless communication. Generally, the secondary processor is always powered on except in the case of battery damage due to low power consumption of the controlled device. The secondary processor can be integrated with a communication module 204, which is used for the secondary processor 202 to access a network based on the communication module 204 in a non-powered-on state of the controlled device, and then establish a long connection with other devices such as a server.
[0136] The secondary processor 202 can also be provided with a flash memory, which is a non-volatile memory, i.e., the data will not be lost after power off. In some embodiments, the flash memory can save information synchronized from the primary processor 201 to the secondary processor 202, including but not limited to: connection configuration information and device configuration information. The connection configuration information and device configuration information will be described later, and will not be described here.
[0137] The EC 203 is equivalent to a single-chip microcomputer. Generally, the secondary processor is always powered on except in the case of battery damage due to low power consumption of the controlled device.
[0138] The EC 203 also includes a non-volatile memory that stores software running independently. The EC 203 is used for functions such as power management, battery management, keyboard control, and touchpad control. Specifically, the EC 203 can power the primary processor 201, the secondary processor 202, the communication module 204, the memory 205, the display screen 206, etc. The EC 203 can also be used to monitor parameters such as battery capacity.
[0139] The communication function of the controlled device can be realized through an antenna, a communication module 204, a modem processor, and a baseband processor, etc.
[0140] The antenna is used to transmit and receive electromagnetic wave signals. Each antenna in the controlled device can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antenna. For example: the antenna can be multiplexed as a diversity antenna of a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0141] The modem processor can include a modulator and a demodulator. The modulator is configured to modulate a low frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is configured to demodulate a received electromagnetic wave signal into a low frequency baseband signal. The demodulator then transmits the demodulated low frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is transmitted to the application processor after being processed by the baseband processor. The application processor outputs a sound signal through an audio device, or displays an image or a video through a display screen. In some embodiments, the modem processor can be a separate device. In other embodiments, the modem processor can be independent of the main processor 201, and be arranged in the same device as the communication module 204 or other functional modules.
[0142] The communication module 204 can include one or more, for example, one communication module 204 integrated with each of the main processor 201 and the sub-processor 202. The communication module 204 can provide a wireless communication solution including WLAN (such as Wi-Fi network), BT, GNSS, FM, NFC, IR, and the like, which can be applied to the controlled device. The communication module 204 can be one or more devices integrated with at least one communication processing module. The communication module 204 receives electromagnetic waves via an antenna, demodulates and filters the electromagnetic wave signal, and transmits the processed signal to the main processor 201 / sub-processor 202. The communication module 204 can also receive a signal to be transmitted from the main processor 201 / sub-processor 202, frequency modulate the signal, amplify the signal, and radiate the signal as an electromagnetic wave via an antenna.
[0143] In the embodiments of the present application, the antenna of the controlled device is coupled with the communication module 204, so that the controlled device can communicate with a server through a wireless communication technology. The wireless communication technology can include WLAN, BT, GNSS, NFC, FM, and / or IR technology, etc. The GNSS can include a global positioning system (GPS), a global navigation satellite system (GLONASS), a beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and / or a satellite based augmentation system (SBAS).
[0144] The controlled device implements display functions through a GPU, a display screen 206, and an application processor, etc. The GPU is a microprocessor for image processing, connected to the display screen 206 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The main processor 201 can include one or more GPUs that execute program instructions to generate or change display information.
[0145] The display screen 206 is used to display images, videos, etc. The display screen 206 includes a display panel. The display panel can be manufactured using a liquid crystal display (LCD). The display screen panel can also be manufactured using an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flex light-emitting diode (FLED), a miniled, a micro Led, a micro-oled, a quantum dot light emitting diode (QLED), etc. In some embodiments, the controlled device can include 1 or N display screens 206, N being a positive integer greater than 1.
[0146] The memory 205 can include one or more RAMs and one or more NVMs. The RAM can be directly read and written by the main processor 201, and can be used to store executable programs (such as machine instructions) of an operating system or other programs that are running, and can also be used to store data of users and application programs, etc. The NVM can also store executable programs and store data of users and application programs, etc., and can be loaded into the random access memory in advance for direct reading and writing by the main processor 201.
[0147] The RAM can include a static random-access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDR SDRAM, such as the fifth generation of DDR SDRAM commonly referred to as DDR5 SDRAM), etc.
[0148] The NVM can include a disk storage device, a flash memory. The flash memory can include NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. according to the operation principle, and can include single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc. according to the storage unit potential order, and can include universal flash storage (UFS), embedded multi media Card (eMMC), etc. according to the storage specification.
[0149] The bus 207 can be connected by any one or more types of interfaces such as the I2C interface, the PCM interface, the UART interface, the MIPI interface, the GPIO interface, and / or the USB interface. It can be understood that, Figure 3B The bus 207 connects the modules. Based on the bus connection between the main processor 201 and the secondary processor 202, the main processor 201 can synchronize information to the secondary processor 202. Based on the bus connection between the main processor 201 and the EC 203, the EC 203 can control the main processor 201 to start working based on the remote control instruction received from the secondary processor 202; and based on the bus connection between the main processor 201 and the EC 203, the EC 203 can query the status information of the controlled device from the main processor 201. Based on the bus connection between the secondary processor 202 and the EC 203, the secondary processor 202 can send the corresponding remote control instruction to the EC 203 based on the remote control instruction received from the server; and based on the bus connection between the secondary processor 202 and the EC 203, the EC 203 can send the status information of the controlled device to the secondary processor 202.
[0150] The key 208 includes a power-on key, etc. The key 208 can be a mechanical key. It can also be a touch key. The controlled device can receive key input and generate key signal input related to user settings and function control of the controlled device.
[0151] In the embodiments of the present application, the slave processor 202 / main processor 201 of the controlled device can establish a communication connection with the server through the communication module 204, and perform data communication based on the communication connection. The specific implementation of the slave processor 202 / main processor 201 of the controlled device and the server establishing a communication connection and performing data communication can be referred to the description of the method flow below, and will not be described here in detail.
[0152] Figure 3B is a software architecture schematic diagram of the controlled device in the embodiments of the present application.
[0153] As shown in Figure 3B , the software architecture of the controlled device mainly includes software modules running on the main processor, software modules running on the slave processor, and software modules running on the EC.
[0154] 1. The software modules running on the main processor include but are not limited to the following modules: bus communication management module, system housekeeper.
[0155] The bus communication management module is used to establish a bus connection with other modules such as the bus communication management module in the configuration management module, and transmits and receives bus messages based on the bus connection. Among them, the bus message includes but is not limited to the following types of messages: bus heartbeat message, connection configuration message, device configuration message and instruction, etc.
[0156] The system housekeeper is used to manage the connection between the main processor and the server. Specifically, when the controlled device is in a powered-on state, the system housekeeper can control the main processor to establish a connection with the server, and then receive the remote control instruction sent by the master control device and forwarded by the server based on the connection.
[0157] 2. The software modules running on the slave processor include but are not limited to the following modules: configuration management module, wake-up management module, remote connection management module, etc.
[0158] 2-1. The configuration management module includes but is not limited to the following sub-modules: bus communication management module, bus heartbeat management module, connection configuration module, and device configuration management module, etc.
[0159] (1) The bus communication management module is used to establish a bus connection with other modules such as the bus communication management module in the software modules running on the main processor, and transmits and receives bus messages based on the bus connection, analyzes the bus messages, and distributes the analyzed different types of messages to the corresponding modules. Specifically, it includes:
[0160] The bus communication management module distributes the bus heartbeat message parsed from the bus message to the bus heartbeat management module;
[0161] The bus communication management module also distributes the connection configuration message parsed from the bus message to the connection configuration module. Optionally, the bus communication management module also directly delivers the instruction such as the instruction of closing the reconnection function to the login module, or the instruction of closing the reconnection function is encapsulated in the connection configuration message, which needs to be delivered to the remote login management module after being parsed by the connection configuration management module. Optionally, the bus communication management module also directly delivers the instruction such as the instruction of releasing the resource to the wake-up service management module, or the instruction of releasing the resource is encapsulated in the connection configuration message, which needs to be delivered to the wake-up service management module after being parsed by the connection configuration management module.
[0162] The bus communication management module also distributes the device configuration message parsed from the bus message to the device configuration management module. Optionally, the bus communication management module also directly delivers the instruction such as the instruction of logging in the server to the wake-up service management module, or the instruction of logging in the server is encapsulated in the device configuration message, which needs to be delivered to the wake-up service management module after being parsed by the device configuration management module.
[0163] (2) The bus heartbeat management module is used for parsing the bus heartbeat message, and further maintaining the bus connection, and specifically includes:
[0164] If the bus heartbeat message is received for the first time in a booting process is parsed from the bus heartbeat message, it is considered that the bus heartbeat state is heartbeat establishment at this time;
[0165] If the bus heartbeat message is not received after the heartbeat establishment in a booting process is parsed from the bus heartbeat message, it is considered that the bus heartbeat state is heartbeat loss at this time;
[0166] If the bus heartbeat message is received after the heartbeat loss in a booting process is parsed from the bus heartbeat message, it is considered that the bus heartbeat state is heartbeat recovery at this time;
[0167] Moreover, the bus heartbeat management module also delivers the heartbeat state to the wake-up management module, so that the wake-up management module determines whether to start the remote connection management module according to the heartbeat state, to execute the establishment / disconnection of the long connection with the server.
[0168] (3) The connection configuration module is used for parsing the connection configuration message, and the connection configuration message includes the server login information, or can also include the instruction of closing the reconnection function, the instruction of releasing the resource, etc. Specifically includes:
[0169] If the server login information is parsed from the connection configuration message, the connection configuration module calls the interface of the remote connection management module, and synchronizes it to the networking management in the remote connection management module for storage;
[0170] If the instruction of closing the reconnection function is parsed from the connection configuration message, the connection configuration module notifies the remote login module to close the reconnection function. Alternatively, the instruction of closing the reconnection function can be directly sent to the remote login module by the bus communication management module without parsing and forwarding from the connection configuration message by the connection configuration management module.
[0171] If the instruction of releasing resources and the like is parsed from the connection configuration message, the connection configuration module calls the interface of the wake-up management module to notify the remote login module to release the resources of the temporary data. In addition, the wake-up service management module will also disconnect the connected network. Alternatively, the instruction of releasing resources and the like can be directly sent to the wake-up management module by the bus communication management module without parsing and forwarding from the connection configuration message by the connection configuration management module.
[0172] (4) The device configuration management module is used to parse the device configuration message, and the device configuration message includes but is not limited to: a device capability description file (also known as a Profile file), network configuration information (such as WiFi account and password, etc.), device identification (such as serial number (Serial Number, SN), universally unique identifier (Universally unique Identifier, UUID)). Or it can also include: the instruction of logging in the server, the instruction of restoring the factory settings, etc.
[0173] If the Profile file is parsed from the device configuration message, the device configuration management module stores the Profile file;
[0174] If the network configuration information is parsed from the device configuration message, the device configuration management module stores the network configuration information;
[0175] If the device identification is parsed from the device configuration message, the device configuration management module stores the device identification;
[0176] If the instruction of logging in the server is parsed from the device configuration message, the interface of the wake-up management module is called, which is passed to the wake-up service management module, so that the wake-up service management module executes the start of the login module in the remote connection management module to establish a long connection with the server. Alternatively, the instruction of logging in the server can be directly sent to the wake-up service management module by the bus communication management module without parsing and forwarding to the wake-up service management module by the device configuration management module from the device configuration message.
[0177] 2-2, The wake-up management module running in the secondary processor includes but is not limited to the following sub-modules: the wake-up service management module, the EC control module, etc.
[0178] (1) The wake-up service management module can be used for:
[0179] receiving the instruction of the login server transmitted by the bus management module or the device configuration management module, obtaining the network configuration information from the device configuration management module based on the instruction to connect to the network, and obtaining the Profile file from the device configuration management module and transmitting it to the login module in the remote connection management module, so that the login module in the remote connection management module is started to obtain the server login information from the networking module, establish a long connection with the server based on the server login information, and subscribe to the remote control service based on the Profile file.
[0180] receiving the heartbeat state transmitted by the bus heartbeat management module, and managing the long connection between the remote connection management module and the server based on the heartbeat state (such as establishing a long connection, disconnecting a long connection). Specifically, when the controlled device is abnormally shut down, hibernates, sleeps, or fails, causing the main processor not to send the login server to the secondary processor, the heartbeat state is heartbeat loss, at this time the wake-up business management module obtains the network configuration information from the device configuration management module to connect to the network, and obtains the Profile file from the device configuration management module and transmits it to the login module in the remote connection management module, so that the login module in the remote connection management module is started to obtain the server login information from the networking module, establish a long connection with the server based on the server login information, and subscribe to the remote control service based on the Profile file. When the controlled device is powered on, hibernation wakeup, sleep wakeup, or restarted, the heartbeat state is heartbeat establishment / heartbeat recovery, at this time the wake-up business management module controls the login module in the remote connection management module to disconnect the long connection with the server.
[0181] receiving the instruction of the login server transmitted by the bus management module or the device configuration management module, obtaining the network configuration information from the device configuration management module based on the instruction to connect to the network, and obtaining the Profile file from the device configuration management module and transmitting it to the login module in the remote connection management module, so that the login module in the remote connection management module is started to obtain the server login information from the networking module, establish a long connection with the server based on the server login information, and subscribe to the remote control service based on the Profile file.
[0182] receiving the remote control command (such as power on, hibernate wakeup, sleep wakeup, restart, etc.) transmitted by the cloud service connection management module, and controlling the device software module (such as the control module) running on the EC through the EC control module to perform the corresponding task.
[0183] (2) The EC control module can be used to control the main chip to start to realize power on, hibernate wakeup, sleep wakeup, restart, etc. according to the instructions such as power on, hibernate wakeup, sleep wakeup, restart, etc. transmitted by the wake-up business management module.
[0184] 2-3, the remote connection management module running on the secondary processor includes but is not limited to the following sub-modules: networking management module, encryption / decryption module, login module, and device control module, etc.
[0185] (1)Networking management module is used for receiving and storing the information sent by the connection configuration module, and storing the information after encryption by the encryption / decryption module.
[0186] (2)Encryption / decryption module is used for encrypting the connection configuration information based on the device identification and root key synchronized by the main processor of the controlled device, and storing the encrypted information in the networking management module. Or, the encryption / decryption module is also used for encrypting part of the device configuration information sent by the device configuration management module, and returning the encrypted information to the device configuration management module for storage.
[0187] (3)Login module is used for receiving the instruction of enabling remote connection transmitted by the wake-up service management module, obtaining the server login information from the networking management module based on the instruction, and logging into the server. The login module is also used for receiving the instruction of closing the reconnection function directly transmitted by the bus management module or transmitted by the connection configuration module, and closing the reconnection function. The login module is also used for receiving the instruction of releasing resources directly transmitted by the bus management module or transmitted by the connection configuration module and the wake-up service management module, and clearing the temporary data in the RAM.
[0188] (4)Device control module is used for receiving the remote control instruction sent by the server, and transmitting the instruction to the wake-up service management module through callback to control the control module of the EC to execute the task corresponding to the instruction.
[0189] 3、The software modules running in the EC include but are not limited to the following sub-modules: control module. The control module is used for receiving the control instruction sent by the EC control module in the secondary processor, and then controlling the software module of the main processor to start.
[0190] Reference Figure 4 , Figure 4 A hardware architecture diagram of a server provided by an embodiment of the present application.
[0191] As shown in Figure 4 , the server can include one or more processors 301, a memory 302, a communication interface 303, a transmitter 305, a receiver 306, a coupler 307, and an antenna 308. These components can be connected through a bus 304 or other means, Figure 4 Taking the connection through the bus 304 as an example. Among them:
[0192] The processor 301 can be used to read and execute computer readable instructions. Specifically, the processor 301 can be used to call the program stored in the memory 302, for example, the implementation program on the server side of the method for forwarding the remote control instruction sent by the master device to the controlled device according to the remote control instruction of the controlled device of the present application, and execute the instructions contained in the program.
[0193] The memory 302 is coupled to the processor 301 and stores various software programs and / or sets of instructions. Specifically, the memory 302 can include a high-speed random access memory and can also include a nonvolatile memory such as one or more disk storage devices, flash memory devices, or other nonvolatile solid-state storage devices.
[0194] The memory 302 can store an operating system (hereinafter referred to as a system) such as an embedded operating system such as uCOS, VxWorks, RTLinux, etc. The memory 302 can also store a network communication program that can be used to communicate with the electronic device 100 and the like. The memory 302 can also store device information and login information of the controlled device.
[0195] The communication interface 303 can be used for the server to communicate with other communication devices such as the master device, the controlled device, and the like. Specifically, the communication interface 303 can be a 3G communication interface, a long term evolution (LTE) (4G) communication interface, a 5G communication interface, a WLAN communication interface, a WAN communication interface, and the like. Without being limited to a wireless communication interface, the server can also be configured with a wired communication interface 303 to support wired communication.
[0196] In some embodiments of the present application, the transmitter 305 and the receiver 306 can be regarded as a wireless modem. The transmitter 305 can be used to perform transmission processing on the signal output by the processor 301. The receiver 306 can be used to receive signals. In the server, the number of transmitters 305 and receivers 306 can be one or more. The antenna 308 can be used to convert electromagnetic energy in the transmission line into electromagnetic waves in free space, or convert electromagnetic waves in free space into electromagnetic energy in the transmission line. The coupler 307 can be used to divide the mobile communication signal into multiple paths and distribute it to multiple receivers 306. It can be understood that the antenna 308 of the network device can be implemented as a large-scale antenna array.
[0197] Based on the above introduction of the communication system, the electronic device, the server and the like, the remote control method provided by the present application will be introduced in combination with the UI embodiments.
[0198] Figures 5A-5D An operation interface schematic diagram of a group of controlled devices normally shutting down is exemplarily shown.
[0199] As shown in Figure 5A As shown in Figure 5A The interface shown is any interface displayed by the controlled device in the power-on state, and the interface displays a start icon 512. In addition, the controlled device is also integrated with a physical power key 511.
[0200] The controlled device can receive an operation (e.g., a click operation of a user-operated cursor on the start icon 512) acting on the start icon 512, and in response to the operation, the controlled device displays the power supply option 513, as shown in detail with reference to Figure 5B .
[0201] As shown in Figure 5B , the controlled device displays the power supply option 513.
[0202] The controlled device can receive an operation (e.g., a click operation of a user-operated cursor on the power supply option 513) acting on the power supply option 513, and in response to the operation, the controlled device displays a plurality of sub-options, as shown in detail with reference to Figure 5C .
[0203] As shown in Figure 5C , the controlled device displays a plurality of sub-options contained in the power supply option 513, such as the shutdown option 514, the sleep option, the restart option, and the like.
[0204] The controlled device can receive an operation (e.g., a click operation of a user-operated cursor on the shutdown option 514) acting on the shutdown option 514, and in response to the operation, the controlled device is then shut down, specifically including powering off the power supply of most of the hardware other than the secondary processor and the EC, such as powering off the power supply of the main processor and the display screen.
[0205] As shown in Figure 5D , after the controlled device is shut down, the display screen is powered off and does not display any content. In addition, after the controlled device is shut down, the secondary processor and the EC of the controlled device are powered on and work, the secondary processor can establish a long connection with the server for receiving the remote control instructions of the main controlled device forwarded by the server, and in addition, the secondary processor also starts the reconnection function for automatically requesting the server to re-establish a long connection in the case of abnormal disconnection.
[0206] It can be understood that, Figures 5A-5D only one shutdown mode is exemplarily shown. Alternatively, the controlled device can also be triggered to be shut down by an operation directly acting on the power key 511, or can also be triggered to be abnormally shut down by cutting off the power supply, or can also be triggered to be shut down by the main controlled device, and the like, and the present application embodiment does not limit the current control of the controlled device, which is not described herein.
[0207] Figures 6A-6H A set of operation interface schematic diagrams for remotely controlling the controlled device to be powered on by the main controlled device are exemplarily shown.
[0208] As shown in Figure 6A , Figure 6AThe desktop of the master device, which includes the setting application icon 611, and can further include other application icons, such as the application icon of smart life, and the like.
[0209] The master device can receive an operation acting on the setting application icon 611, and in response to the operation, the master device displays a setting details page, see the content shown in Figure 6B .
[0210] As shown in Figure 6B , the setting details page of the master device includes a plurality of setting sub-options, such as the more connection option 612. Figure 6B The master device can receive an operation acting on the more connection option 612, and in response to the operation, the master device displays a more connection details page, see the content shown in
[0211] . Figure 6C As shown in
[0212] , the more connection details page includes a plurality of connection sub-options, such as the option of connecting my PC 613. Figure 6C Figure 6C The master device can receive an operation acting on the option of connecting my PC 613, and in response to the operation, the master device displays the PC connected by the master device, see the content shown in .
[0213] Figure 6D As shown in , the master device displays a list of controlled devices 614 previously added by the master device, such as Xiao Li's MagicBook 14, Xiao Li's MagicBook 16, and Xiao Li's watch, and the like. Among them, there are various ways to add a controlled device, such as scanning the two-dimensional code of the controlled device to obtain the identifier of the controlled device, or obtaining the identifier of the controlled device through Bluetooth, Wi-Fi transmission, and the like.
[0214] Figure 6D The master device can receive an operation acting on Xiao Li's MagicBook 14, and in response to the operation, the master device displays a remote control interface for Xiao Li's MagicBook 14, see the content shown in
[0215] .Among them, Xiao Li's MagicBook 14 belongs to the controlled device described in the present application, and is also the controlled device introduced in the foregoing Figure 6D . Figure 6E Figures 5A-5D As shown in , the master device displays a list of controlled devices 614 previously added by the master device, such as Xiao Li's MagicBook 14, Xiao Li's MagicBook 16, and Xiao Li's watch, and the like. Among them, there are various ways to add a controlled device, such as scanning the two-dimensional code of the controlled device to obtain the identifier of the controlled device, or obtaining the identifier of the controlled device through Bluetooth, Wi-Fi transmission, and the like.
[0216] Figure 6EAs shown, the master device displays a remote control interface for Xiao Li's MagicBook 14, which displays the current state of Xiao Li's MagicBook 14, for example, in a shutdown state, and also displays a power-on icon 615, as well as other options, for example, a hibernate option, a sleep option, a restart option, and more options, and the like.
[0217] The master device can receive an operation on the power-on icon 615 as shown, and in response to the operation, the master device sends a remote power-on instruction to the controlled device "Xiao Li's MagicBook 14" through the server, thereby controlling the controlled device to power on. Figure 6E
[0218] As shown, the master device receives an operation on the power-on icon 615 as shown, and in response to the operation, the master device sends a remote power-on instruction to the controlled device "Xiao Li's MagicBook 14" through the server, thereby controlling the controlled device to power on. Figure 6F Figure 6E As shown, the master device receives an operation on the power-on icon 615 as shown, and in response to the operation, the master device sends a remote power-on instruction to the controlled device "Xiao Li's MagicBook 14" through the server, thereby controlling the controlled device to power on.
[0219] The master device can receive an operation on the power-on icon 615 as shown, and in response to the operation, the master device sends a remote power-on instruction to the controlled device "Xiao Li's MagicBook 14" through the server, thereby controlling the controlled device to power on.
[0220] Optionally, Figure 6F The window 616 as shown in the middle can also be displayed after the master device detects an operation on the "Xiao Li's MagicBook 14" as shown, and only after the controlled device verifies the device account and password, the master device is notified to display the control interface as shown. Figure 6D Figure 6E
[0221] As shown, the controlled device receives a remote power-on instruction forwarded by the master device through the server based on the connection between the secondary processor and the server, and then the secondary processor of the controlled device starts the primary processor through the EC, thereby starting the controlled device. Figure 6G As shown, the controlled device is in a power-on state after starting, and displays the desktop of the controlled device. In addition, after the controlled device powers on, the primary processor of the controlled device notifies the secondary processor to close the reconnection function and establish a connection with the server, thereby causing the long connection previously established by the secondary processor with the server to be automatically disconnected. The controlled device can also receive remote control instructions of the master device forwarded by the server based on the connection between the primary processor and the secondary processor.
[0222] Figure 6H
[0223] Figures 7A-7C Exemplarily show a set of operation interface schematic diagrams of turning on the controlled device through local operation control.
[0224] As shown in Figure 7A , Figure 7A Show the interface when the controlled device is in the shutdown state.
[0225] The controlled device can receive an operation on the power key 511, and the EC of the specific controlled device can detect the operation, and wake up the main processor in response to the operation, that is, control the main processor to be powered on to start working.
[0226] As shown in Figure 7B , Figure 7B Show the interface when the controlled device is starting up.
[0227] As shown in Figure 7C , Figure 7C Show the interface after the controlled device completes startup, that is, switches to the on state. In addition, after the controlled device is turned on, the main processor of the controlled device notifies the secondary processor to close the reconnection function and establish a connection with the server, so that the long connection previously established by the secondary processor with the server is automatically disconnected. The controlled device can also receive the remote control instruction of the master control device forwarded by the server based on the connection between the main processor and the secondary processor.
[0228] Figures 8A-8F Exemplarily show a set of scene schematic diagrams of the secondary processor of the controlled device powering off and then powering on again.
[0229] As shown in Figure 8A , Figure 8A Show the schematic diagram of the controlled device being powered off and establishing a long connection with the server through the secondary processor. When the controlled device is in the state shown in Figure 8A , the master control device can display the remote control interface shown in Figure 8B .
[0230] As shown in Figure 8B , Figure 8B Show the remote control interface displayed by the master control device in the state of the controlled device being powered off and establishing a long connection with the server through the secondary processor. The content displayed by the remote control interface is the same as the content shown in the foregoing Figure 6E . The user can remotely control the controlled device to turn on by operating the startup icon 615 in the remote control interface.
[0231] As shown in Figure 8C , Figure 8C Show the schematic diagram of the controlled device being powered off, and the secondary processor being powered off and thus disconnecting the long connection with the server. When the controlled device is in the state shown in Figure 8C , the master control device can display the remote control interface shown in Figure 8DThe remote control interface shown.
[0232] like Figure 8D As shown, Figure 8D This diagram shows the remote control interface displayed by the master device when the controlled device is powered off and the secondary processor is powered off. The remote control interface displays a prompt message 811 indicating that the controlled device is offline. This prompt message 811 may include, for example, "PC offline, remote control is temporarily unavailable." Optionally, in one possible implementation, the master device may also make all remote control-related icons and controls inoperable, such as displaying them in gray. Figure 8D Not shown.
[0233] like Figure 8E As shown, Figure 8E This diagram illustrates the process of the controlled device being powered off, and the secondary processor being powered off and then powered on again, thus re-establishing the long-term connection with the server. The controlled device is in... Figure 8E When the indicated state is reached, the main control device can display... Figure 8F The remote control interface shown.
[0234] like Figure 8F As shown, Figure 8F This diagram illustrates the remote control interface displayed by the master control device when the controlled device is powered off and the secondary processor is powered off and then powered on again, thus re-establishing the long-term connection with the server. The remote control interface displays a notification message 812 indicating that the controlled device is online, which may include, for example, "PC online, remote control available." Optionally, in one possible implementation, the master control device may also restore all remote control-related icons and controls to an operable state.
[0235] This is because, after the controlled device established a long connection with the server, the controlled device enabled the reconnection function. Therefore, if the secondary processor of the controlled device suddenly loses power and then is restored, the secondary processor of the controlled device can automatically trigger a new request to establish a long connection with the server, thereby restoring the long connection.
[0236] In this application's embodiments, the UI embodiments described above only illustrate the remote control function provided through the settings application of the active device. In addition, the remote control function can also be implemented through other system-level applications installed on the active device, such as Smart Life, or other third-party applications. Regardless of the application used to provide the remote control function, the specific implementation method can be the remote control method provided in this application; please refer to the description of the method embodiments below for details.
[0237] refer to Figure 9 , Figure 9 An example is shown of a remote control method provided in this application.
[0238] likeFigure 9 The method comprises the following steps:
[0239] S61, pre-storing the authentication code of the controlled device and the third key of the controlled device in the main processor of the controlled device, and the second key of the server.
[0240] The authentication code of the controlled device is generated by the main chip of the controlled device. The authentication code can uniquely identify the controlled device, and the authentication code can include authCode and authCodeId. The authCode is randomly generated by the main processor, so repeated codes may be generated, and the authCodeId needs to be added to uniquely identify the controlled device. The authentication code of the controlled device is used when the main processor requests registration from the server, and is also used when the main processor / secondary processor requests to refresh the password corresponding to the cloud account from the server. For details, refer to the description of the subsequent steps.
[0241] The key of the controlled device (also referred to as the third key) is also generated by the main chip of the controlled device. The third key can be a symmetric key or an asymmetric key. When the third key is an asymmetric key, it includes a first public key and a corresponding first private key. The third key can be used when the controlled device communicates with other devices temporarily, for example, when the controlled device authenticates with the master device to negotiate a subsequent non-temporary first key. For details, refer to the description of the subsequent steps.
[0242] The key of the server (also referred to as the second key) is generated by the server. The second key can be a symmetric key or an asymmetric key. When the second key is an asymmetric key, it specifically belongs to a public key in the asymmetric key. The second key can be used when the controlled device communicates with the server. For details, refer to the description of the subsequent steps.
[0243] Optionally, the second key issued by the server in this application can also be replaced by a certificate issued by the server, and the embodiments of this application do not limit this.
[0244] S62, in the powered-on state of the controlled device, the main processor of the controlled device completes registration at the server side based on the authentication code of the controlled device encrypted by the second key and the third key, and obtains the cloud account and the corresponding first password sent by the server.
[0245] Specifically, when the controlled device is in a powered-on state, the main processor of the controlled device is in a working state, and the main processor can request registration from the server to obtain a cloud account (also referred to as a first account) and a corresponding first password, which is used for subsequent connection with the server and receiving the remote control instruction of the master device forwarded by the server based on the connection.
[0246] In addition, in order to ensure the secure communication between the controlled device and the server, the controlled device needs to encrypt the privacy information involved in the registration request, such as the authentication code and the third key of the controlled device, by using the second key (specifically, the public key of the server) issued by the server, so as to avoid being illegally stolen by other devices.
[0247] Optionally, in the powered-on state of the controlled device, the main processor of the controlled device can also complete the registration at the server side based on the authentication information of the controlled device. That is, the main processor of the controlled device sends the authentication information of the controlled device to the server to request registration. The authentication information of the controlled device includes any one or more of the following: the authentication code of the controlled device, the identifier of the controlled device, or the public key of the controlled device. In addition, when the main processor of the controlled device sends the authentication information of the controlled device to the server to request registration, the authentication information of the controlled device can be encrypted by using the public key of the server, and then the authentication information of the controlled device is obtained by using the private key of the server, and the registration is completed.
[0248] S63, in the powered-on state of the controlled device, the main processor of the controlled device synchronizes information with the secondary processor, such as including the cloud account and the corresponding first password.
[0249] Specifically, when the controlled device is in the powered-on state, the main processor of the controlled device needs to synchronize the cloud account and the corresponding first password with the secondary processor, which is used for the subsequent main processor in the non-working state (the controlled device is powered off, hibernation, sleep or powered on but in a fault state), the controlled device can establish a connection with the server through the secondary processor, and based on the connection, the server forwards the remote control instruction of the main control device to receive the remote control instruction of the main control device, to remotely start the main processor.
[0250] In addition, the information synchronized by the main processor of the controlled device to the secondary processor also includes other more information, such as but not limited to the device configuration information and the connection configuration information of the controlled device. Optionally, the device configuration information and the connection configuration information can be synchronized in advance before the main processor synchronizes the cloud account and the corresponding first password with the secondary processor.
[0251] The device configuration information includes but is not limited to: a device capability description file (also known as a Profile file), network configuration information (such as a WiFi account and a corresponding password), a device identifier (such as a serial number (Serial Number, SN), a universally unique identifier (Universally unique Identifier, UUID)), authentication information (a device account and a corresponding password of the first device), and a root key, etc.
[0252] The connection configuration information includes, but is not limited to, server login information (i.e., a cloud account and a corresponding password), an authentication code and a third key of the controlled device, a server-supported website for refreshing a password, and a second key or a certificate issued by the server.
[0253] S64, in a state that the controlled device is powered off, hibernates, sleeps, or is powered on but fails, the secondary processor of the controlled device establishes a long connection with the server based on the cloud account and the corresponding first password.
[0254] Specifically, in a state that the controlled device is powered off, hibernates, sleeps, or is powered on but fails, the primary processor of the controlled device is in a non-working state, and therefore the secondary processor of the controlled device needs to establish a long connection (also referred to as a first connection) with the server based on a cloud account (also referred to as a first account) and a corresponding first password, for receiving a remote control instruction of the master device forwarded by the server based on the long connection, to remotely start the primary processor.
[0255] S65, in a state that the controlled device is powered off, hibernates, sleeps, or is powered on but fails, the secondary processor of the controlled device completes authentication of the master device through the server based on the long connection, and further negotiates a first key used by the master device and the controlled device.
[0256] Specifically, after the server and the primary processor of the controlled device complete registration, the server can send relevant information of the registration of the controlled device to the master device, for example, the authentication information of the controlled device. The master device then sends an authentication request to the controlled device through the server, the authentication request carrying first data encrypted by a public key (for example, a third key) of the controlled device, the first data being calculated by a preset algorithm from any one or more of the following data: the authentication information of the controlled device, a random number of the controlled device, a random number of the master device; the primary processor of the controlled device is in a non-working state, and the secondary processor of the controlled device calculates the first data from the authentication information by using a private key of the controlled device and the preset algorithm, and determines the first data as the first key based on the first data, or processes the first data by using a second algorithm to obtain the first key. The preset algorithm is pre-stored by the master device and the controlled device.
[0257] In the case that the first key is obtained by processing the first data by using the second algorithm by the controlled device, the controlled device also needs to notify the master device to process the first data by using the second algorithm to obtain the first key.
[0258] It can be seen that the above authentication process is used to negotiate the first key by the controlled device and the master device, the first key being used for encryption when the master device sends an instruction to the controlled device in the future, and the first key being invisible to the server and other devices.
[0259] Optionally, before the controlled device executes S64, if the controlled device is in a powered-on state, the controlled device can also establish a connection (also referred to as a second connection) with the server based on the cloud account and the corresponding first password through the main processor, and perform the authentication process based on the second connection, for example, S65, which is not described herein.
[0260] S66, in the powered-off, hibernation, sleep, or powered-on but faulty state of the controlled device, the secondary processor of the controlled device receives the instruction encrypted by the first key sent by the host device through the server based on the long connection, and starts the main processor in response to the decrypted instruction.
[0261] Specifically, in the powered-off, hibernation, sleep, or powered-on but faulty state of the controlled device, although the main processor of the controlled device is in a non-working state, the secondary processor of the controlled device is in a working state. The controlled device can maintain a long connection with the server through the secondary processor, and then receive the information sent by the host device forwarded by the server based on the long connection, for example, the instruction encrypted by the first key, for example, the instruction of power-on, hibernation wake-up, sleep wake-up, or restart. In response to the instruction, the server of the controlled device can start the main processor, so that the main processor switches to a working state, and then the controlled device switches to a powered-on state.
[0262] Optionally, the controlled device also performs the following operations not shown in S63. Figure 9
[0263] Optionally, during the process of the controlled device executing the foregoing S63, the main processor and the secondary processor of the controlled device can encrypt the information related to privacy for storage, further ensuring the security of remote control.
[0264] Specifically, the main processor of the controlled device pre-stores a root key, which is used by the main processor or the secondary processor to encrypt the information related to privacy for storage, for example, based on the root key to obtain other encryption methods for encryption. The information related to privacy includes but is not limited to connection configuration information, network configuration information in device configuration information, authentication information, and root keys. When the secondary processor encrypts / decrypts the above-mentioned private information, it is specifically encrypted / decrypted through the encryption / decryption module in the remote connection management module. The specific implementation of the encrypted storage can refer to the interaction process of the following Figure 13 , which is not described herein.
[0265] Optionally, after the controlled device executes the foregoing S63, the controlled device also requests the server to update the password corresponding to the cloud account.
[0266] Specifically, before the main processor of the controlled device synchronizes information to the secondary processor, the main processor first acquires information in the secondary processor, and compares the acquired information with the information to be synchronized. In the case of different comparison results, the information to be synchronized is sent to the secondary processor. In this way, the write operation to the NVM of the secondary processor can be reduced, and the write wear of the NVM can be reduced. The specific implementation of synchronizing information can be referred to the interaction process of the following Figure 13 , which will not be described here in detail.
[0267] Optionally, after the controlled device executes S63, the controlled device further requests the server to update the password corresponding to the cloud account.
[0268] Specifically, the server regularly notifies the controlled device that the password corresponding to the cloud account is expired. If the main processor of the controlled device is in a working state when the notification is received, the controlled device requests the server to update the password through the main processor, and then synchronizes the updated password (for example, the second password) to the secondary processor. If the main processor of the controlled device is in a non-working state when the notification is received, the controlled device requests the server to update the password through the secondary processor, and after the secondary processor acquires the updated password, the secondary processor does not synchronize the updated password to the main processor. Therefore, after the main processor is switched to a working state subsequently, the main processor still requests to establish a connection with the server by using the old password (that is, the first password), and the server detects that the old password is not the new password updated to the secondary processor previously. Therefore, the server notifies the main processor that the old password is expired, and the main processor also requests the server to update the password, and then synchronizes the updated password (for example, the third password) to the secondary processor.
[0269] It can be seen that by regularly refreshing the password of the cloud account, the reliability of the connection between the controlled device and the server can be further improved, and the security of the remote control instruction is also improved. The specific implementation of refreshing the password can be referred to the interaction process of the following Figure 10 , which will not be described here in detail.
[0270] Optionally, during the execution of S66, the controlled device further authenticates the instruction received from the host device, to further improve the security of remote control.
[0271] Specifically, the controlled device end stores authentication information (i.e. the device account and the corresponding password of the controlled device), which can be set or updated by the user. Specifically, it can be used by the user through local startup, hibernate wake-up, sleep wake-up restart and other operations. Therefore, when the user uses the master control device for remote control, the device account and password also need to be input. The device account and password can be sent to the controlled device together with the instructions of the master control device. The controlled device only considers the authentication to be passed when the received device account and password are consistent with the device account and password stored by the controlled device, and then further processes the instructions of the master control device. The specific implementation of the authentication instruction can be referred to the following Figure 10 interaction process, which will not be described here.
[0272] Among them, the information synchronized by the main processor to the secondary processor can be in the form of a bus message, which includes but is not limited to the following types of messages: bus heartbeat message, connection configuration message (including the server login information introduced in the foregoing), device configuration message (including the device identifier, network configuration information, and Profile file introduced in the foregoing), etc. Optionally, some instructions sent by the main processor can also be sent to the secondary processor in the form of a bus message, such as the instruction to log in to the server, the instruction to restore the factory settings, which can be encapsulated in the device configuration message, and the instruction to close the reconnection function, the instruction to release resources, which can be encapsulated in the device configuration message.
[0273] In one possible implementation, after the main processor of the controlled device receives the input of shutdown, hibernation or sleep, the main processor first sends the instruction to log in to the server to the secondary processor, so that the secondary processor accesses the network based on the instruction and the network configuration information in the synchronization information, and then establishes the first connection (i.e. the long connection introduced in the foregoing) with the server based on the server login information in the synchronization information. Then the main processor stops working by power off, so that the controlled device enters the state of shutdown, hibernation or sleep.
[0274] In another possible implementation, after the main processor receives the input of shutdown, hibernation or sleep, if the main processor stops working by power off before it sends the instruction to log in to the server to the secondary processor, the main processor cannot send the heartbeat message to the secondary processor regularly based on the bus connection, and the secondary processor can further determine that the heartbeat with the main processor is lost, and then access the network based on the network configuration information in the synchronization information, and then establish the first connection with the server based on the server login information in the synchronization information.
[0275] In another possible implementation manner, in the state of being powered on but malfunctioning, the main processor cannot normally work although being powered on, the main processor cannot periodically send the heartbeat message to the secondary processor based on the bus connection, the secondary processor can further determine the loss of heartbeat with the main processor, and then the secondary processor accesses the network according to the network configuration information in the synchronization information, and then establishes the first connection with the server according to the server login information in the synchronization information.
[0276] In addition, the secondary processor of the controlled device is preconfigured with the reconnection function, that is, in the case that the secondary processor establishes the connection with the server, the secondary processor automatically starts the reconnection function by default. The reconnection function includes that after the secondary processor does not actively disconnect the long connection with the server, the secondary processor can automatically request to establish the long connection with the server again. For example, in the case that the secondary processor is suddenly disconnected to disconnect the long connection with the server, after being powered on again, the secondary processor will automatically trigger to request to establish the long connection with the server again.
[0277] When the controlled device is in the state of being powered off, hibernating, sleeping, or being powered on but malfunctioning, if the controlled device receives the power-on, hibernation wake-up, sleep wake-up or restart input, the controlled device will establish the second connection with the server through the main processor, and disconnect the first connection between the secondary processor and the server.
[0278] The following S63-1, S64-1 and S65-1 introduce the specific implementation of the controlled device establishing the remote connection with the server through the main processor after the local operation triggers the controlled device to be powered on, hibernation wake-up, sleep wake-up or restart.
[0279] S63-1, the controlled device detects the power-on, hibernation wake-up, sleep wake-up or restart operation acting on the local.
[0280] Specifically, the power-on, hibernation wake-up, sleep wake-up or restart operation acting on the local can be an operation acting on a physical key or an operation acting on a virtual control in a display screen, and the above operation can be directly received by the main processor of the controlled device, or be detected by the EC of the controlled device and then transmitted to the main processor, and the embodiments of the present application do not limit this.
[0281] S64-1, the controlled device directly or through the EC wakes up the main processor, then controls the secondary processor to close the reconnection function through the main processor, and establishes the second connection with the server through the main processor.
[0282] Specifically, when the main processor of the controlled device directly receives the power-on, hibernate-wakeup, sleep-wakeup or restart operation acting on the local, the controlled device directly starts the main processor. When the controlled device detects the power-on, hibernate-wakeup, sleep-wakeup or restart operation acting on the local through the EC, the controlled device starts the main processor through the EC. Starting the main processor includes powering on the main processor so that the main processor starts to work, for example, the controlled device controls the secondary processor to close the reconnection function through the main processor, and establishes the second connection with the server after connecting to the network through the main processor. In addition, starting the main processor also performs other initialization operations so that the controlled device switches to the state after power-on, hibernate-wakeup, sleep-wakeup or restart.
[0283] Optionally, when the main processor and the secondary processor adopt the same server login information (account), when the main processor establishes the second connection with the server, the first connection between the secondary processor and the server is automatically disconnected.
[0284] S65-1, the controlled device receives the remote control instruction of the master control device forwarded by the server based on the second connection and responds.
[0285] Specifically, after the controlled device establishes the second connection with the server through the main processor, the controlled device can receive the remote control instruction (such as the instruction of shutting down, hibernating or sleeping, or the instruction of playing music, etc.) sent by the master control device and forwarded by the server based on the second connection, and then make the main processor execute the corresponding task according to the remote control instruction.
[0286] The following S63-2, S64-2 and S65-2 introduce the specific implementation of establishing the remote connection between the controlled device and the server through the main processor after the controlled device is triggered to power on, hibernate-wakeup, sleep-wakeup or restart by the remote control instruction.
[0287] S63-2, the controlled device receives the power-on, hibernate-wakeup, sleep-wakeup or restart instruction based on the first connection.
[0288] Specifically, after the controlled device establishes the first connection with the server through the secondary processor in S62, the secondary processor of the controlled device can receive the instruction of the master control device forwarded by the server based on the first connection, which can be the power-on, hibernate-wakeup, sleep-wakeup or restart instruction, etc.
[0289] S64-2, the controlled device controls the EC to start the main processor through the secondary processor, and then controls the secondary processor to close the reconnection function through the main processor, and establishes the second connection with the server through the main processor.
[0290] Specifically, after the slave processor of the controlled device receives the instruction of starting, sleep-wake up, sleep-wake up or restarting, the slave processor can notify the EC to start the master processor based on the instruction, and the starting of the master processor includes powering on the master processor so that the master processor starts to work, for example, the controlled device controls the slave processor to close the reconnection function through the master processor, and establishes a second connection with the server after connecting to the network through the master processor. In addition, the starting of the master processor will also perform other initialization operations to make the controlled device switch to the state after starting, sleep-wake up, sleep-wake up or restarting.
[0291] S65-2, the controlled device receives the remote control instruction of the master device forwarded by the server based on the second connection and responds.
[0292] Specifically, after the controlled device establishes a second connection with the server through the master processor, the controlled device can receive the remote control instruction (such as the instruction of shutting down, hibernating or sleeping, or the instruction of playing music, etc.) sent by the master device and forwarded by the server based on the second connection, and then make the master processor execute the corresponding task according to the remote control instruction.
[0293] It can be seen that after the above-mentioned method is implemented, Figure 9 The above-mentioned method can bring the following technical effects:
[0294] Firstly, more remote control scenarios are realized. That is, when the controlled device is in the state of shutting down, sleeping, hibernating or in the state of starting but with failure, the controlled device can establish a long connection with the server through the slave processor, and receive and respond to the remote control instruction of the master device forwarded by the server based on the long connection; when the controlled device is in the state of starting, the controlled device can establish a connection with the server through the master processor, and receive and respond to the remote control instruction of the master device forwarded by the server based on the connection.
[0295] Secondly, the master-slave processor is seamlessly connected to the server, which ensures the stability of the remote connection. Specifically:
[0296] On the one hand, when the controlled device is in the state of shutting down, sleeping, hibernating or starting but with failure, the slave processor of the controlled device automatically starts the reconnection function, so that when the slave processor is abnormally disconnected from the long connection with the server, the slave processor can request the server to establish a long connection again, thereby ensuring the stability of the long connection between the slave processor and the server. For example, in the case that the slave processor is powered off and then powered on, the power-off will cause the long connection to be disconnected, but after the slave processor is powered on again, the slave processor can automatically request the server to establish a long connection.
[0297] On the other hand, when the controlled device is powered on, the main processor of the controlled device will first notify the secondary processor to disable the reconnection function, and then establish a communication connection between the main processor and the server to automatically disconnect the connection between the secondary processor and the server. In this way, the communication connection between the main processor and the server is seamlessly connected to the long connection between the secondary processor and the server, ensuring that the controlled device and the server are always connected, so that the user has no abnormal perception on the main control device. It can also prevent the secondary processor from being directly squeezed out by the main processor, triggering the reconnection function of the secondary processor, and causing the secondary processor to compete for the connection to the server.
[0298] Next, combined Figure 10 This paper will introduce the interaction process between various devices involved in a remote control method provided in this application.
[0299] like Figure 10 As shown, the communication system involved in this remote control method includes: a master control device, a server, and a controlled device, wherein the controlled device includes a master processor, a slave processor, and an EC. Figure 10 The example shown is based solely on the EC as a separate chip in the controlled device. In other feasible implementations, the EC may also be integrated into the main processor, and this application does not impose any restrictions on this.
[0300] Figure 10 The interaction flow between the devices shown includes the following:
[0301] Phase 1 (S111-S117): The controlled device completes initialization, including registering with the server through the main processor and synchronizing information with the sub-processor.
[0302] S111, The main processor of the controlled device stores information, including but not limited to: authentication code, third key and second key.
[0303] Specifically, the authentication code, third key, and second key pre-stored in the main processor of the controlled device can be found in the description in S61 above, and will not be repeated here.
[0304] In addition, the main processor of the controlled device also stores other information, such as device configuration information and the URLs supported by the server for refreshing passwords in the connection configuration information. For a description of the device configuration information and connection configuration information, please refer to the aforementioned S62 description, which will not be repeated here.
[0305] S112, the main processor of the controlled device receives the start input.
[0306] Specifically, after the user inputs the operation of starting, hibernation wake-up, sleep wake-up or restarting to the controlled device, the main processor can receive the start input corresponding to the operation, and the main processor is switched to the working state, so that the controlled device is switched to the starting state. The operation can be directly received by the main processor, or received by the EC and then transmitted to the main processor, and the embodiments of the application do not limit this.
[0307] S113, the main processor of the controlled device requests registration based on the authentication code, the third key and the second key.
[0308] Specifically, after the main processor of the controlled device is in the working state, the main processor can send a registration request to the server to obtain a cloud account and a corresponding password. The registration request can include authentication information of the controlled device, including any one or more of the following: an authentication code of the controlled device, an identifier of the controlled device or a third key (specifically, a public key of the controlled device). In order to ensure that the information contained in the registration request is securely sent to the server, the controlled device also needs to use the second key (specifically, the public key of the server) to encrypt the information. For example, when the third key is an asymmetric key, the main processor encrypts based on the public key in the asymmetric key.
[0309] In addition, the authentication code and the third key contained in the registration request are stored in the server, so that the server subsequently refreshes the password based on the password refresh request of the controlled device. And also make it sent to the main control device, used for the main control device to subsequently perform secure authentication with the controlled device, that is, negotiate a new key to transmit the instruction.
[0310] S114, the server obtains and stores the authentication code and the third key based on the second key.
[0311] Specifically, after receiving the registration request, the server decrypts the authentication code and the third key based on the second key. For example, when the second key is an asymmetric key, the server decrypts the authentication code and the third key based on the private key in the asymmetric key and stores them.
[0312] S115, reply to the cloud account and the first password based on the second key.
[0313] Specifically, after the server decrypts the authentication code and the third key, the registration of the controlled device is completed, and the server can generate a cloud account and a corresponding first password for the controlled device, and encrypt the cloud account and the corresponding first password using the second key and send them to the main processor of the controlled device.
[0314] S116, the main processor of the controlled device synchronizes information to the secondary processor, including but not limited to: the cloud account and the first password.
[0315] Specifically, after the main processor of the controlled device receives the information returned by the server, the second key can be used to decrypt the information to obtain the cloud account and the first password, and the cloud account and the first password are also synchronized to the secondary processor, which is used for the secondary processor to establish the first connection with the server based on the information.
[0316] In addition, after the main processor of the controlled device obtains the cloud account and the first password, the main processor can also establish a second connection with the server based on the cloud account and the first password, and complete authentication with the master device based on the second connection, which will not be described here again. For details, please refer to the process of establishing the first connection with the server through the secondary processor and completing authentication with the master device based on the second connection in the following stage 2-stage 3 example.
[0317] In addition, the main processor of the controlled device can also synchronize more information to the secondary processor, and the synchronization can be performed before or after the synchronization of the cloud account and the first password, which is not limited in the embodiments of the present application.
[0318] The main processor of the controlled device can also synchronize more information to the secondary processor, including but not limited to device configuration information, and the server supported website for refreshing the password in the connection configuration information. For details of the device configuration information and the connection configuration information, please refer to the description of S62 above, which will not be described here again.
[0319] S117, the secondary processor of the controlled device encrypts and stores the synchronized information.
[0320] Specifically, after the secondary processor of the controlled device receives the information synchronized by the main processor, it needs to be encrypted and stored. The encryption method can be generated based on the root key, the profile file and the device identifier synchronized by the main processor, and then the encryption method is used to encrypt part or all of the synchronized information, for example, all the information except the root key, the profile file and the device identifier is encrypted and stored.
[0321] Stage 2 (S121-S122): after the controlled device is powered off, hibernates, sleeps or powers on but fails, the secondary processor establishes a first connection with the server.
[0322] S121, the secondary processor of the controlled device does not receive the bus heartbeat packet of the main processor or receives the login server instruction of the main processor.
[0323] Specifically, when the main processor of the controlled device is in a working state, the controlled device can establish a bus connection between the main processor and the secondary processor, send bus packets, login server instructions and the like based on the bus connection.
[0324] The type of the bus connection can be any one or more of USB, PCI, SPI, I2C, PCM, UART, MIPI, GPIO, etc., and the application does not limit the type of the bus connection.
[0325] The bus message includes, but is not limited to, a bus heartbeat message, a connection configuration message, and a device configuration message. The connection configuration message and the device configuration message are a data form after the synchronization information described above is encapsulated. When the main processor of the controlled device does not receive the bus heartbeat message of the main processor within a timeout or receives a login server instruction of the main processor, the subsequent S122 is triggered to be executed.
[0326] S122, the secondary processor of the controlled device establishes a first connection based on the cloud account and the first password.
[0327] After the controlled device establishes the first connection with the server through the secondary processor, the controlled device can receive the instruction of the master device forwarded by the server based on the first connection, but in order to further ensure the secure communication between the controlled device and the master device, the controlled device also needs to perform security authentication with the master device, that is, negotiate an encryption algorithm (such as a first key) so that the information of the master device and the controlled device can be shielded from the server and other devices for secure remote control.
[0328] Stage 3 (S131-S138): The controlled device performs security authentication on the master device based on the first connection.
[0329] S131, the master device receives an input of opening the remote control.
[0330] Specifically, when the user inputs an operation of opening the remote control application or the remote control interface to the master device, the master device can receive the corresponding input. The description of the input operation can refer to the description of the UI embodiment in the foregoing. Figures 6A-6C
[0331] S132, the master device obtains an authentication code and a third key from the server.
[0332] S133, the master device generates authentication information based on the authentication code and the third key.
[0333] Specifically, since there is a security risk in the master device forwarding the instruction directly through the server, the master device can first generate authentication information based on the authentication code and the third key, and after security authentication with the master device, the negotiated encryption algorithm (i.e., the first key) is used to encrypt the instruction, so that the encrypted instruction can shield the server (i.e., other devices), thereby ensuring the security of the remote control.
[0334] S134-S135, the master device sends authentication information for determining the first key to the slave device through the server, and the first key is not included in the authentication information.
[0335] Specifically, after the master device generates the authentication information, the master device can request authentication from the slave device through the server, and the first key is not included in the authentication information. The authentication information is only used for the master device and the slave device to determine that the encryption method, i.e., the first key, is used in subsequent treatment transmission.
[0336] S136, the slave device verifies the authentication information by the authentication code synchronized by the master processor and the third key, and determines the first key.
[0337] S137-S138, the slave device sends the master device a recovery of the authentication passing through the server.
[0338] Specifically, after the master device receives the information of the authentication passing, it is confirmed that the encryption algorithm, e.g., the first key, negotiated with the master device can be used for encrypting the subsequent remote control instruction.
[0339] Optionally, the master device can first perform S132 and then perform S131, and the embodiments of the application do not limit this.
[0340] Optionally, the sub-stage of S131-S134 in stage 3 can be performed at any step after S114, and is not limited to being performed after the second stage is executed.
[0341] Optionally, after S114 and before S132, the master device can also receive a notification sent by the server that the slave device is registered.
[0342] Stage 4 (S141-S145): The slave device receives and processes the instructions of the master device forwarded by the server based on the first connection.
[0343] S141, the master device receives the input of remote control.
[0344] Specifically, after the user inputs the remote operation for the slave device to the master device, the master device can receive the corresponding input. The operation includes but is not limited to: the operations of starting, hibernation wake-up, sleep wake-up, or restart. The description of the above operation can be referred to the description of the UI embodiment in the foregoing Figures 6A-6E .
[0345] S142-S143, the master device sends instructions to the slave device through the server based on the first key and the authentication information.
[0346] Specifically, the master device can generate a corresponding instruction based on the input of the remote control after receiving the input, encrypt the instruction using the first key, and also carry the authentication information. The authentication information is the device account and password of the controlled device introduced in the foregoing.
[0347] S144, the controlled device identifies the instruction through the authentication information synchronized by the secondary processor and decrypts the instruction based on the first key.
[0348] Specifically, after the controlled device receives the instruction of the master device forwarded by the server, the instruction needs to be identified through the authentication information, that is, whether the authentication information of the master device and the authentication information stored in the secondary processor are consistent is compared. If they are consistent, it is considered that the identification is passed, and the instruction also needs to be decrypted through the first key.
[0349] Optionally, the authentication information and the instruction in S144 can be sent separately, and the embodiments of the present application do not limit this.
[0350] S145, the controlled device starts the main processor through the secondary processor.
[0351] Specifically, after the secondary processor of the controlled device decrypts the instruction, if the instruction is power on, hibernate wake-up, sleep wake-up or restart, the secondary processor can start the main processor to switch to the working state in response to the instruction, so that the controlled device switches to the power-on state. The secondary processor can start the main processor through EC.
[0352] In order to ensure the secure communication between the controlled device and the server, the controlled device also needs to request the server to refresh the password, and uses the refreshed password to establish a connection, thereby ensuring secure communication. For example, in the case that the main processor of the controlled device is in a non-working state, that is, during S122-S144 described above, the controlled device can establish a first connection with the server through the secondary processor, and then request the server to refresh the password based on the first connection (see stage 5-1). For another example, in the case that the main processor of the controlled device is in a working state, that is, after S145 described above, the controlled device can establish a second connection with the server through the main processor, and then request the server to refresh the password based on the second connection and synchronize to the secondary processor (see stage 5-2).
[0353] Stage 5-1: The controlled device requests the server to refresh the password through the secondary processor.
[0354] S151, the server determines that the first password is used out of time.
[0355] Specifically, after the server completes the registration of the controlled device and generates the first password corresponding to the cloud account, the server records the usage time length of the first password, and considers that the first password is out of use when the usage time length exceeds the preset time length.
[0356] S152, the server notifies the secondary processor of the controlled device that the first password is out of use.
[0357] S153, the secondary processor of the controlled device obtains the signature information based on the second key.
[0358] Specifically, the signature information can be obtained by encrypting the device identifier of the controlled device or further including the authentication code and the like by using the second key.
[0359] When the second key is an asymmetric key, the second key used for encryption is the public key in the asymmetric key.
[0360] S154, the secondary processor of the controlled device requests the server to refresh the password, carrying the signature information.
[0361] Specifically, the controlled device requests the server to refresh the password after obtaining the signature information, and carries the signature information or further carries the device identifier and the like.
[0362] S155, the server checks the signature information based on the second key.
[0363] Specifically, the server can decrypt the device identifier of the controlled device or further including the authentication code from the signature information by using the second key, and then compare the decrypted device identifier and authentication code with the device identifier and authentication code stored in the server, and consider that the check is passed if the comparison result is consistent.
[0364] When the second key is an asymmetric key, the second key used for decrypting the signature information is the private key in the asymmetric key.
[0365] S156, the server sends the second password corresponding to the cloud account to the secondary processor of the controlled device.
[0366] Specifically, after the server of the controlled device receives the second password, the server re-establishes the first connection with the server by using the cloud account and the second password, and further receives the information that the password is expired again and the instructions of the master device forwarded by the server based on the first connection.
[0367] In addition, when the secondary processor of the controlled device receives the information sent by the server again to indicate that the last updated second password is expired, the operation of refreshing the password similar to the foregoing S153-S156 is repeated.
[0368] In addition, the secondary processor usually has no right to synchronize information to the primary processor, so after the controlled device refreshes the password through the secondary processor, the primary processor still uses the old password.
[0369] Stage 5-2: The controlled device requests the server to refresh the password through the primary processor and synchronizes to the secondary processor.
[0370] S161, a second connection is requested to be established based on the cloud account and the first password.
[0371] S162, it is determined that the first password is used for timeout or the first password is inconsistent with the second password corresponding to the cloud account.
[0372] Specifically, since there is a case that the controlled device refreshes the password (second password) through the secondary processor, and the primary processor does not know to use the refreshed password to establish a second connection, therefore, in addition to detecting password timeout, the server will notify the primary processor to perform the subsequent password refresh process when detecting that the password used by the primary processor is different from the latest password.
[0373] S163-S167 correspond to S152-S156 respectively, which will not be repeated here.
[0374] S168, the primary processor synchronizes the third password to the secondary processor.
[0375] Reference Figure 11 Next, the interaction process of how the controlled device establishes a remote connection with the server through the secondary processor to realize the interaction of remote functions is introduced in detail.
[0376] Considering that the controlled device may fail, this application provides an interaction process for realizing remote control function through the secondary processor in the case of abnormal shutdown, hibernation, sleep, startup and failure (see stage 2-1), and also provides an interaction process for realizing remote control function in the case of normal shutdown, hibernation and sleep (see stage 2-2).
[0377] Stage 2-1 (S1231-S1235): The controlled device establishes a first connection with the server through the secondary processor to realize remote control function after abnormal shutdown, hibernation, sleep, or startup and failure.
[0378] S1231, the secondary processor of the controlled device does not receive the bus heartbeat packet within a timeout period.
[0379] Specifically, the main processor of the controlled device can periodically send a bus heartbeat packet to the secondary processor based on the bus connection. After receiving the bus heartbeat packet, the secondary processor can parse the heartbeat state (including heartbeat establishment, heartbeat recovery, and heartbeat loss, etc.) from it. When the secondary processor of the controlled device does not receive the bus heartbeat packet within a timeout period, it confirms that the heartbeat state is heartbeat loss, and therefore considers that the controlled device is in an abnormal state, which causes the main processor to fail to work normally and send bus heartbeat packets to the secondary processor periodically.
[0380] The abnormal state of the controlled device can be that the controlled device abnormally shuts down, hibernates, or sleeps, causing the main processor to suddenly lose power and stop working, or that the controlled device is in a powered-on state but has a fault that causes the main processor to be powered on but unable to work normally.
[0381] S1232, the secondary processor of the controlled device accesses the network based on the network configuration information in the device configuration packet.
[0382] Specifically, after receiving the synchronized device configuration packet in S116, the secondary processor of the controlled device can parse the network configuration information (such as WiFi account and password) from it, and then the secondary processor can access the network based on the network configuration information.
[0383] S1233, the secondary processor of the controlled device requests the server to establish a first connection based on the server login information (cloud account and first password) in the connection configuration packet.
[0384] Specifically, after receiving the connection configuration packet in S116, the secondary processor of the controlled device can parse the server login information (such as cloud account and first password) from it, and then request the server to establish a first connection based on the server login information. In addition, when the secondary processor of the controlled device requests the server to establish a first connection, it will also carry the identification of the controlled device, which can be parsed from the device configuration packet in advance.
[0385] S1234, the server sends the secondary processor of the controlled device a successful establishment of the first connection.
[0386] Specifically, after the server receives the request of the secondary processor of the controlled device to establish a first connection, it can verify the cloud account and password. If the verification is successful, it will reply to the secondary processor with an indication that the first connection is successfully established. The server will also store the identification of the controlled device, which will be used to send remote control instructions sent by the master device to the corresponding controlled device based on the identification of the controlled device.
[0387] S1235, the secondary processor of the controlled device starts the reconnection function.
[0388] Specifically, the reconnection function is pre-configured in the secondary processor of the controlled device. After the secondary processor confirms that the first connection with the server is established, the reconnection function is automatically started by default. The reconnection function includes that, after the secondary processor is not actively disconnected from the long connection with the server, the secondary processor can automatically request to establish the long connection with the server again. For example, when the secondary processor is suddenly disconnected, the long connection with the server is disconnected, and after being powered on again, the secondary processor automatically triggers to request to establish the long connection with the server again.
[0389] Stage 2-2 (S1241-S1246): After the controlled device is normally shut down, hibernated or slept, the secondary processor establishes the first connection with the server to realize the remote control function.
[0390] S1241, the main processor of the controlled device receives the input of shutdown, hibernation or sleep.
[0391] Specifically, when the controlled device is in the powered-on state, the main processor of the controlled device can receive the input of shutdown, hibernation or sleep.
[0392] The foregoing input received by the main processor can be triggered by an operation on a physical button of the controlled device, or by an operation on a virtual control displayed by the controlled device, and the embodiments of the present application do not limit this.
[0393] The foregoing input can be directly checked by the main processor of the controlled device, or detected by the EC of the controlled device and delivered to the main processor, and the embodiments of the present application do not limit this.
[0394] S1242, the main processor of the controlled device informs the secondary processor to log in to the server.
[0395] Specifically, after the main processor of the controlled device receives the foregoing input of shutdown, hibernation or sleep, the main processor needs to send an instruction to the secondary processor before being powered off and stopped working, to inform the secondary processor to log in to the server. After the secondary processor logs in to the server, the main processor is powered off and stopped working, so that the controlled device enters the state of shutdown, hibernation or sleep.
[0396] The instruction to log in to the server can be sent in the form of a bus message, and can be encapsulated in a device configuration message.
[0397] S1243-S1246 correspond to S1232-S1235 in stage 2-1 one by one, and the details can be referred to the foregoing description, which will not be repeated here.
[0398] Reference Figure 12, and then the process of how the controlled device is woken up and how the controlled device establishes a remote connection with the server to realize the interaction of remote functions in the case that the controlled device is woken up is introduced in detail.
[0399] Considering that the method of waking up the controlled device includes local wake-up in addition to remote wake-up in the aforementioned stage 4, the present application provides an interaction process of remote control through remote wake-up (see stage 4-1) and an interaction process of remote control through local wake-up (see stage 4-2).
[0400] Stage 4-1 (S1461-S1475): After the controlled device is woken up by remote booting, hibernation wake-up, or sleep wake-up, the controlled device disconnects the first connection and establishes a second connection with the server through the main processor to realize remote control functions.
[0401] S1461, the master device sends a booting, hibernation wake-up, sleep wake-up, or restart instruction to the server.
[0402] Specifically, the master device can log in to the server in advance and add the controlled device in the server to subscribe to the service of remotely controlling the controlled device in the server. Then, the master device can send a booting, hibernation wake-up, sleep wake-up, or restart instruction to the server based on user operations.
[0403] S1462, the server sends a booting, hibernation wake-up, sleep wake-up, or restart instruction to the secondary processor of the controlled device based on the first connection.
[0404] Specifically, after receiving the remote control instruction for the controlled device sent by the master device, the server can send a booting, hibernation wake-up, sleep wake-up, or restart instruction to the secondary processor.
[0405] S1463, the secondary processor of the controlled device identifies the instruction based on the Profile file in the device configuration message.
[0406] Specifically, after receiving the device configuration message described in S112, the secondary processor of the controlled device can parse the Profile file therefrom and identify the meaning of the instruction based on the Profile file.
[0407] The Profile file describes the capabilities of the controlled device, i.e., instructions supported by the controlled device. For example, an instruction can be represented by an instruction identifier (ID) and a specific value under the instruction ID. For example, instruction ID = 1 represents a power-on type instruction, instruction value = 0 under instruction ID = 1 represents a power-off instruction, and instruction value = 1 under instruction ID = 1 represents a power-on instruction. Instruction ID = 2 represents a hibernation type instruction, instruction value = 0 under instruction ID = 2 represents a hibernation instruction, and instruction value = 1 under instruction ID = 2 represents a hibernation wake-up instruction.
[0408] Optionally, S1464, the secondary processor of the controlled device verifies the instruction based on the authentication information in the device configuration message.
[0409] After parsing the instruction, the controlled device can verify the instruction, i.e., whether the instruction is sent by an authorized master device. S1464 is an optional operation.
[0410] S1465, the secondary processor of the controlled device sends a power-on, hibernation wake-up, sleep wake-up, or restart instruction to the EC based on the bus connection.
[0411] Specifically, the secondary processor of the controlled device establishes a bus connection with the EC in advance, and sends the parsed power-on, hibernation wake-up, sleep wake-up, or restart instruction to the EC based on the bus connection, so that the EC controls the master processor to perform the corresponding task.
[0412] S1466, the EC of the controlled device notifies the master processor to power on, hibernate wake-up, sleep wake-up, or restart.
[0413] S1467, the master processor of the controlled device is started, and the controlled device switches to a power-on state.
[0414] Specifically, the master processor of the controlled device is started under the control of the EC and starts to work, so that the controlled device switches to a power-on state.
[0415] S1468, the master processor of the controlled device notifies the secondary processor to close the reconnection function.
[0416] Specifically, after the master processor of the controlled device starts to work, it can establish a connection with the server, but in order to avoid the secondary processor from occupying the first connection with the server, the master processor needs to control the secondary processor to close the reconnection function first.
[0417] S1469, the secondary processor of the controlled device closes the reconnection function.
[0418] S1470, the master processor of the controlled device requests to establish a second connection with the server based on the server login information.
[0419] Specifically, the main processor of the controlled device pre-stores the server login information (cloud account and password) described above. The cloud account and password can be the same as the cloud account and password used by the secondary processor described above.
[0420] S1471, the server notifies the secondary processor of the controlled device that the first connection has been disconnected.
[0421] Specifically, since only one client can log in to the same account, after the server receives the information sent by the main processor of the controlled device to request the establishment of a connection, the server will automatically log out the secondary processor of the controlled device that logs in to the same cloud account before, and notify the secondary processor of the controlled device that the first connection has been disconnected.
[0422] S1472, the server notifies the main processor of the controlled device that the second connection has been established.
[0423] Specifically, while the server disconnects the ground connection with the secondary processor of the controlled device, it establishes a second connection with the main processor of the controlled device and notifies the main processor of the controlled device that the second connection has been established.
[0424] As can be seen, S1471 and S1472 above occur simultaneously, so the server establishes a seamless connection with the controlled device, which can make the user using the main control device feel that the controlled device has not been disconnected, and bring the user a smooth remote control experience.
[0425] S1473, the main processor of the controlled device notifies the secondary processor to release resources.
[0426] Specifically, after the main processor of the controlled device successfully establishes a second connection with the server, the controlled device does not need to use the secondary processor to replace the main processor to realize the remote control function, so the main processor of the controlled device will notify the secondary processor to release resources, thereby reducing the work of the secondary processor and making the secondary processor enter a low-power consumption working mode.
[0427] S1474, the secondary processor of the controlled device exits the network and clears the temporary data in the RAM.
[0428] Specifically, the resource release of the secondary processor includes but is not limited to: exiting the network, clearing the temporary data in the RAM. The network exited is the network accessed based on the network configuration information in the configuration packet described in S1232 above. The temporary data in the RAM includes but is not limited to the data parsed into the memory from the bus heartbeat packet, such as the instruction information parsed from the profile file.
[0429] Stage 4-2 (S1481-S1489): After the controlled device is powered on, wakes up from hibernation or wakes up from sleep by itself, the controlled device disconnects the first connection and establishes a second connection with the server through the main processor to realize the remote control function.
[0430] S1481, the main processor of the controlled device receives an input of powering on, waking up from hibernation or waking up from sleep.
[0431] Specifically, when the controlled device is in the powered-off state, the main processor of the controlled device can receive an input of powering on; when the controlled device is in the hibernation state, the main processor of the controlled device can receive an input of waking up from hibernation; when the controlled device is in the sleep state, the main processor of the controlled device can receive an input of waking up from sleep; when the controlled device is in the powered-on, hibernation or sleep state, the main processor of the controlled device can also receive an input of restarting.
[0432] The foregoing input can be triggered by an operation on a physical button of the controlled device or by an operation on a virtual control displayed by the controlled device, and the embodiments of the present application do not limit this.
[0433] The foregoing input can be directly checked by the main processor of the controlled device or detected by the EC of the controlled device and delivered to the main processor, and the embodiments of the present application do not limit this.
[0434] S1482-S1489 correspond to S1467-S1474 in stage 4-1 one by one, and specific details can be referred to the foregoing description, which will not be described here.
[0435] Next, combined with the software architecture of the controlled device introduced in the foregoing Figure 3B , and the inter-device interaction process shown in the foregoing Figure 10 , next, the detailed module interaction process of each stage will be described in detail.
[0436] Reference is made to Figure 13 , Figure 13 the interaction process of the main processor and the auxiliary processor information synchronization is exemplarily shown.
[0437] As Figure 13 shown, this stage of synchronizing information is jointly executed by the main processor and the auxiliary processor of the controlled device, and specifically involves the following modules: the system manager running on the main processor, the bus communication management module, the configuration management module running on the auxiliary processor, the wake-up management module and the remote connection management module. Among them, the configuration management module includes the bus communication management module, the bus heartbeat management module, the connection configuration management module and the device configuration management module. Among them, the wake-up management module includes the wake-up service management module, and the remote connection management module includes the networking management module. The introduction of each module can also be referred to the foregoing description of the software architecture of the controlled device. Figure 3BThe description of the software architecture of the controlled device shown.
[0438] As Figure 13 shown, the synchronization information stage includes the following interactive process:
[0439] S711, the controlled device is powered on, and the system manager is started.
[0440] S712, the system manager of the controlled device starts the bus communication management module in the main processor.
[0441] S713-S719 introduce the interactive process of maintaining the bus connection between the main processor and the secondary processor through the bus heartbeat message.
[0442] S713, the bus communication management module in the main processor of the controlled device establishes a bus connection with the bus communication management module in the secondary processor.
[0443] S714, the bus communication management module in the main processor of the controlled device sends a bus heartbeat message to the bus communication management module in the secondary processor.
[0444] Specifically, the bus heartbeat message can be used to maintain the bus connection between the main processor and the secondary processor, so that the main processor sends control commands to the secondary processor through the bus connection.
[0445] S715, the bus communication management module in the secondary processor of the controlled device sends a bus heartbeat message to the bus heartbeat management module.
[0446] S716, the bus heartbeat management module in the secondary processor of the controlled device detects the bus heartbeat state.
[0447] Specifically, the bus heartbeat management module in the secondary processor of the controlled device detects the bus heartbeat state based on the received bus heartbeat message.
[0448] If it is parsed from the bus heartbeat message of the bus heartbeat management module that the bus heartbeat message is received for the first time in a power-on process, it is considered that the bus heartbeat state is heartbeat establishment at this time;
[0449] If it is parsed from the bus heartbeat message of the bus heartbeat management module that the bus heartbeat message is not received after the heartbeat establishment in a power-on process, it is considered that the bus heartbeat state at this time is heartbeat loss;
[0450] If it is parsed from the bus heartbeat message of the bus heartbeat management module that the bus heartbeat message is received again after the heartbeat loss in a power-on process, it is considered that the bus heartbeat state at this time is heartbeat recovery.
[0451] S717, the bus heartbeat management module in the secondary processor of the controlled device sends the bus heartbeat state to the wake-up service management module.
[0452] Specifically, the bus heartbeat management module transmits the heartbeat state to the wake-up management module, so that the wake-up management module determines whether to start the remote connection management module to perform the establishing / disconnecting of the long connection with the server according to the heartbeat state.
[0453] S718-S719, the bus heartbeat management module in the slave processor of the controlled device replies to the bus heartbeat state to the bus communication management module in the master processor through the bus communication management module.
[0454] Specifically, the bus heartbeat management module in the slave processor of the controlled device replies to the bus heartbeat state to the bus communication management module in the master processor through the bus communication management module, which can be used for the master processor to know the state of the slave processor being online, and then maintain the bus connection of the two-way communication.
[0455] The above process of synchronizing the bus heartbeat is that the master processor periodically sends the slave processor after the controlled device is powered on, and the slave processor correspondingly replies to the bus heartbeat message.
[0456] S721-S749 introduce the interactive process of the master processor synchronizing the device configuration information to the slave processor when the comparison result is different.
[0457] S721, the bus communication management module in the master processor of the controlled device queries the bus communication management module in the slave processor for the device identifier, root key, and profile file.
[0458] Specifically, the device identifier, root key, and profile file belong to part of the device configuration information, and the device configuration information can also be referred to as a device configuration message. The description of the device configuration information can also refer to the description in the foregoing, which is not described here.
[0459] S722-S725, the bus communication management module in the slave processor of the controlled device reads the device identifier, root key, and profile file through the device configuration management module and returns them to the bus communication management module in the master processor.
[0460] Specifically, since the slave processor of the controlled device stores the device identifier, root key, and profile file synchronized by the master processor in the device configuration management module, before the master processor of the controlled device synchronizes the device configuration information to the slave processor, it needs to query whether the same information as the device configuration information to be synchronized exists in the device configuration management module of the slave processor. If there is the same information, it will not be synchronized again, and if it is different, it will continue to be synchronized.
[0461] Further, since the slave processor of the controlled device can restore factory settings and thus clear the previously stored synchronized device configuration information, and the master processor does not know when the slave processor restores the factory settings, the master processor needs to query and compare with the slave processor and then synchronize information after each boot of the controlled device.
[0462] S726, the bus communication management module of the master processor of the controlled device compares the device identifier, the root key and the profile file.
[0463] Specifically, the bus communication management module of the master processor of the controlled device compares the device identifier, the root key and the profile file to be synchronized with the device identifier, the root key and the profile file queried from the slave processor, and if the comparison result is the same, no repeated synchronization is performed, and if the comparison result is different, subsequent S727-S729 are performed.
[0464] S727, the bus communication management module of the master processor of the controlled device sends the device identifier, the root key and the profile file to the bus communication management module of the slave processor when the comparison result is different.
[0465] S728, the bus communication management module of the slave processor of the controlled device sends the device identifier, the root key and the profile file to the device configuration management module.
[0466] S729, the device configuration management module of the slave processor of the controlled device stores the device identifier, the root key and the profile file.
[0467] Specifically, after receiving the device configuration information sent by the bus communication management module, the device configuration management module of the slave processor of the controlled device stores it in the NVM, so that the device configuration information will not be lost after power failure, but will be cleared when the slave processor restores the factory settings.
[0468] S730, the device configuration management module of the slave processor of the controlled device sends the device identifier, the root key and the profile file to the remote connection management module.
[0469] Specifically, the remote connection management module stores the device identifier, the root key and the profile file after receiving them. The device identifier and the root key are used by the remote connection management module to obtain an encryption algorithm based on the device identifier and the root key, and then to encrypt or decrypt information that needs to be stored in the slave processor subsequently. The profile file is used to start the remote connection management module.
[0470] S741, the bus communication management module in the master processor of the controlled device queries the network configuration information and the authentication information from the bus communication management module in the slave processor.
[0471] Specifically, the network configuration information and the authentication information belong to part of the device configuration information, which can also be referred to as a device configuration message. The device configuration information is described above and will not be repeated here.
[0472] S742, the bus communication management module in the slave processor of the controlled device queries the network configuration information and the authentication information from the device configuration management module.
[0473] S743, the device configuration management module in the slave processor of the controlled device obtains the decrypted network configuration information and the authentication information from the remote connection management module.
[0474] Specifically, since the slave processor of the controlled device stores the encrypted network configuration information and authentication information synchronized by the master processor in the device configuration management module through the remote connection management module, before the master processor of the controlled device synchronizes the device configuration information with the slave processor, the encrypted information needs to be obtained from the device configuration management module of the slave processor, and then the decrypted network configuration information and authentication information are obtained through the remote connection management module.
[0475] In addition, since the slave processor of the controlled device may restore the factory settings and thus clear the previously stored synchronized device configuration information, and the master processor does not know when the slave processor restores the factory settings, the master processor needs to query and compare with the slave processor before synchronizing the information each time the controlled device is powered on.
[0476] S744-S745, the remote connection management module in the slave processor of the controlled device sends the network configuration information and the authentication information to the bus communication management module of the master processor through the device configuration management module.
[0477] S746, the bus communication management module of the master processor of the controlled device compares the network configuration information and the authentication information.
[0478] Specifically, the bus communication management module of the master processor of the controlled device compares the network configuration information and the authentication information to be synchronized with the network configuration information and the authentication information queried from the slave processor. If the comparison result is the same, the synchronization is not repeated. If the comparison result is different, the subsequent S747-S749 is executed.
[0479] S747, the bus communication management module of the master processor of the controlled device sends the network configuration information and the authentication information to the bus communication management module of the slave processor when the comparison result is different.
[0480] S748, the bus communication module of the slave processor of the controlled device sends the network configuration information and the authentication information to the device configuration management module.
[0481] S749, the device configuration management module of the slave processor of the controlled device acquires the encrypted network configuration information, authentication information based on the device identification, root key, etc. from the remote management module and stores.
[0482] Specifically, after the device configuration management module of the slave processor of the controlled device receives the device configuration information sent by the bus communication management module, it first encrypts through the remote management module, and then stores the encrypted ciphertext in the NVM, ensuring that the information will not be lost after power failure, but the information will be cleared when the slave processor restores the factory settings.
[0483] S751-S773 introduce the interactive process of the master processor synchronizing the connection configuration information to the slave processor when the query comparison results are different.
[0484] S751-S752, the bus communication management module in the master processor of the controlled device queries the server-issued key or certificate to the device configuration management module through the bus communication management module in the slave processor.
[0485] Specifically, the server-issued key or certificate can belong to part of the connection configuration information, and the connection configuration information can also be referred to as the connection configuration message. The introduction of the connection configuration information can also refer to the description in the foregoing description, which will not be described here. Alternatively, the server-issued key or certificate can also belong to part of the device configuration information, which is not limited by the present application.
[0486] S753, the device configuration management module in the slave processor of the controlled device acquires the decrypted server-issued key or certificate from the remote connection management module.
[0487] Specifically, since the slave processor of the controlled device stores the server-issued key or certificate synchronized by the master processor in the device configuration management module after encryption through the remote connection management module, the master processor of the controlled device needs to first acquire the encrypted information through the device configuration management module of the slave processor before synchronizing the device configuration information to the slave processor, and then obtain the decrypted server-issued key or certificate through the remote connection management module.
[0488] In addition, since the slave processor of the controlled device may appear to restore the factory settings and thus clear the previously stored synchronized device connection information, and the master processor does not know when the slave processor restores the factory settings, the master processor needs to query and compare with the slave processor before synchronizing the information after each boot of the controlled device.
[0489] S754-S755, the remote connection management module in the slave processor of the controlled device sends the server-issued key or certificate to the bus communication management module of the master processor through the device configuration management module.
[0490] S756, the bus communication management module of the master processor of the controlled device compares the server-issued key or certificate.
[0491] Specifically, the bus communication management module of the master processor of the controlled device compares the server-issued key or certificate to be synchronized with the server-issued key or certificate queried from the slave processor, if the comparison result is the same, it will not be synchronized again, if the comparison result is different, it will execute S747-S749.
[0492] S757, the bus communication management module of the master processor of the controlled device sends the server-issued key or certificate to the bus communication management module of the slave processor when the comparison result is different.
[0493] S758, the bus communication management module of the slave processor of the controlled device sends the server-issued key or certificate to the device configuration management module.
[0494] S759, the device configuration management module of the slave processor of the controlled device obtains the encrypted server-issued key or certificate based on the device identifier, root key, etc. from the remote management module and stores it.
[0495] Specifically, after the device configuration management module of the slave processor of the controlled device receives the device configuration information sent by the bus communication management module, it first encrypts through the remote management module, and then stores the encrypted ciphertext in the NVM, so that the information will not be lost after power failure, but the information will be cleared when the slave processor is restored to factory settings.
[0496] S761-S763, the bus communication management module in the master processor of the controlled device queries the cloud account and corresponding password, authentication code, third key and password refreshing website through the bus communication management module and connection configuration management module in the slave processor to the remote connection management module.
[0497] Specifically, the cloud account and corresponding password, authentication code, third key and password refreshing website can belong to part of the connection configuration information, and the connection configuration information can also be referred to as connection configuration message. The introduction of the connection configuration information can also refer to the description in the foregoing description, which will not be described here.
[0498] S764, the remote connection management module in the master processor of the controlled device reads and decrypts the cloud account and corresponding password, authentication code, third key and password refreshing website.
[0499] Specifically, since the slave processor of the controlled device stores the encrypted cloud account and corresponding password, authentication code, third key and password refreshing website in the remote connection management module after the master processor synchronizes them through the remote connection management module, the master processor of the controlled device needs to first obtain the encrypted information in the remote connection management module of the slave processor before synchronizing the device configuration information to the slave processor, and then obtain the decrypted cloud account and corresponding password, authentication code, third key and password refreshing website through the remote connection management module.
[0500] In addition, since the slave processor of the controlled device may restore factory settings and thus clear the previously stored synchronized device connection information, and the master processor does not know when the slave processor restores factory settings, the master processor needs to query and compare with the slave processor and then synchronize information after each boot of the controlled device.
[0501] S765-S767, the remote connection management module in the slave processor of the controlled device sends the cloud account and corresponding password, authentication code, third key and password refreshing website to the bus communication management module in the master processor through the connection configuration management module and the bus communication management module.
[0502] S768, the bus communication management module of the master processor of the controlled device compares the cloud account and corresponding password, authentication code, third key and password refreshing website.
[0503] Specifically, the bus communication management module of the master processor of the controlled device compares the cloud account and corresponding password, authentication code, third key and password refreshing website to be synchronized with the cloud account and corresponding password, authentication code, third key and password refreshing website queried from the slave processor, and if the comparison result is the same, the connection configuration information is not synchronized again, and if the comparison result is different, S769-S773 is executed.
[0504] S769-S772, the bus communication management module of the master processor of the controlled device sends the cloud account and corresponding password, authentication code, third key and password refreshing website to the remote connection management module through the bus communication management module and the connection configuration management module of the slave processor.
[0505] S773, the remote connection management module of the slave processor of the controlled device encrypts the cloud account and corresponding password, authentication code, third key and password refreshing website based on the device identifier and root key.
[0506] Specifically, after receiving the cloud account and the corresponding password, the authentication code, the third key and the refresh password, the remote connection management module of the slave processor of the controlled device stores the device identifier, the root key and the like in the NVM after encryption, so that the connection configuration information is not lost after power failure, but the connection configuration information is cleared when the slave processor is restored to factory settings.
[0507] It can be understood that any one of the above information can be individually queried and compared to determine whether to synchronize, or any multiple information can be simultaneously queried and compared to determine whether to synchronize, and the embodiments of the present application do not limit this.
[0508] It can be seen that, after the foregoing Figure 13 The interaction method of the main processor and the slave processor synchronization information is shown. Not only is the write loss of the slave processor reduced, the service life is prolonged, but also the privacy information can be safely stored. Specifically, since the slave processor has a lower specification, the number of writes of the NVM (such as a flash memory) integrated in the slave processor is limited, so before each information synchronization, the controlled device needs to query the information in the slave processor through the main processor to determine whether it is consistent with the information to be synchronized. Only in the case where the information is inconsistent, it is written into the slave processor.
[0509] It should be understood that each step in the above method embodiments provided by the present application can be completed by integrated logic circuits of hardware in the processor or instructions in the form of software. The method steps disclosed in the embodiments of the present application can be directly embodied as hardware processor execution or executed by a combination of hardware and software modules in the processor.
[0510] The present application also provides an electronic device, which can include a memory and a processor. The memory can be used to store a computer program, and the processor can be used to call the computer program in the memory to enable the electronic device to execute the method in any one of the above embodiments.
[0511] The present application also provides a chip system, which includes at least one processor for realizing the functions involved in the method executed by the electronic device in any one of the above embodiments.
[0512] In a possible design, the chip system further includes a memory for saving program instructions and data, and the memory is located in the processor or outside the processor.
[0513] The chip system can be composed of a chip, or can include a chip and other discrete devices.
[0514] Optionally, the processor in the chip system can be one or more. The processor can be implemented by hardware or software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented by software, the processor can be a general-purpose processor, which is implemented by reading software code stored in a memory.
[0515] Optionally, the memory in the chip system can also be one or more. The memory can be integrated with the processor or arranged separately from the processor, and the embodiments of the present application do not limit the same. For example, the memory can be a non-transient processor, such as a read-only memory (ROM), which can be integrated on the same chip as the processor or arranged on different chips respectively, and the embodiments of the present application do not limit the type of the memory or the arrangement of the memory and the processor.
[0516] For example, the chip system can be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a micro controller unit (MCU), a programmable logic device (PLD) or other integrated chip.
[0517] The present application also provides a computer program product, which comprises a computer program (also referred to as code or instruction), which, when executed, causes a computer to perform the method executed by the electronic device in any one of the above embodiments.
[0518] The present application also provides a computer readable storage medium, which stores a computer program (also referred to as code or instruction). When the computer program is executed, it causes a computer to perform the method executed by the electronic device in any one of the above embodiments.
[0519] The embodiments of the present application can be combined arbitrarily to achieve different technical effects.
[0520] In the above embodiments, all or part of the processes can be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the processes can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes described in the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transferred from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes one or more available media sets. The available media can be magnetic media (such as floppy disk, hard disk, magnetic tape), optical media (such as DVD), or semiconductor media (such as solid state disk), etc.
[0521] Those of ordinary skill in the art can understand that all or part of the processes in the above embodiments can be instructed by a computer program to complete the relevant hardware, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above method embodiments. The aforementioned storage medium includes ROM or random access memory (RAM), magnetic disk or optical disk, and various media that can store program codes.
[0522] In summary, the above only describes the embodiments of the technical solutions of the present application, and is not used to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made according to the disclosure of the present application shall be included in the protection scope of the present application.
Claims
1. A remote control method characterized by, The method is applied to a communication system comprising a first device, a second device and a server, the first device comprising a main processor and a secondary processor, the method comprising: The main processor of the first device is in an active state, and the main processor sends authentication information of the first device to the server; The server sends the authentication information of the first device to the second device; The second device sends an authentication request to the first device through the server, the authentication request carrying first data encrypted by a public key of the first device, the first data being calculated by a preset algorithm from any one or more of the following data: the authentication information, a random number of the first device, a random number of the second device; The main processor of the first device is in an inactive state, and the secondary processor calculates the first data from the authentication information by using a private key of the first device and the preset algorithm, and determines a first key based on the first data; The second device sends a first instruction encrypted by the first key to the first device through the server; The first device decrypts the first instruction by using the first key through the secondary processor, and starts the main processor through the secondary processor in response to the first instruction.
2. The method of claim 1, wherein, The authentication information of the first device comprises any one or more of the following: an authentication code of the first device, an identifier of the first device or a public key of the first device.
3. The method of claim 1, wherein, The first device determines the first key based on the first data through the secondary processor specifically comprises: The first device determines the first data as the first key through the secondary processor; Alternatively, the first device generates the first key by using the first data and a second algorithm, and informs the second device to obtain the first key based on the second algorithm.
4. The method of any one of claims 1-3, wherein The first device sends the authentication information of the first device to the server through the main processor specifically comprises: the first device sends a registration request to the server through the main processor, the registration request carrying the authentication information of the first device encrypted by a public key of the server.
5. The method of claim 4, wherein, The method further comprises: The server decrypts the authentication information of the first device by using a private key of the server in response to the registration request, and sends a first account and a first password to the first device.
6. The method of claim 5, wherein, After the server sends the first account and the first password to the first device, the method further comprises: When the main processor of the first device is in an active state, the first device establishes a second connection with the server by using the first account and the first password through the main processor; When the main processor of the first device is in an inactive state, the first device establishes a first connection with the server by using the first account and the first password through the secondary processor.
7. The method of claim 6, wherein, The performance of the main processor is superior to that of the secondary processor, and the second connection is established while the first connection is disconnected.
8. The method according to claim 6 or 7, characterized in that, After the server sends the first account and the first password to the first device, the method further comprises: In the case that the first password uses for a time length exceeding a preset time length, the server refreshes the first password as a second password, and sends the second password to the first device.
9. The method of claim 8, wherein, After the server sends the second password to the first device, the method further comprises: The first device receives the second password through the main processor, and sends the second password to the secondary processor; Alternatively, the first device receives the second password through the secondary processor.
10. The method of claim 9, wherein, After the first device receives the second password through the secondary processor, the method further comprises: In the case that the main processor of the first device is in a working state, the first device requests the server to establish the second connection through the main processor using the first account and the first password; The server determines that the first password is different from the second password; The server refreshes the second password as a third password, and sends the third password to the first device; The first device receives the third password through the main processor, and sends the third password to the secondary processor.
11. The method of claim 9, wherein, Before the server refreshes the first password as a second password, the method further comprises: The first device sends verification information to the server, the verification information being generated by encrypting the server's public key; The server verifies the verification information by using the server's private key.
12. The method according to any one of claims 1-11, characterized in that, Before the first device starts the main processor through the secondary processor, the method further comprises: The first device also receives a device account and a password corresponding to the device account sent by the second device through the server; The first device determines that the device account is the same as the account of the first device, and the password corresponding to the device account is the same as the password corresponding to the account of the first device.
13. A remote control method characterized by, The method is applied to a first device comprising a main processor and a secondary processor, and the method comprises: The main processor of the first device is in a working state, and sends authentication information of the first device to a server through the main processor, so that the server sends the authentication information of the first device to a second device; The first device receives an authentication request sent by the second device through the server, the authentication request carrying first data encrypted by a public key of the first device, the first data being calculated by a preset algorithm on any one or more of the following data: authentication information of the first device, a random number of the first device, a random number of the second device; The main processor of the first device is in a non-working state, and the secondary processor calculates the first data by using a private key of the first device and the preset algorithm on the authentication information, and determines a first key based on the first data; The first device receives a first instruction encrypted by the first key sent by the second device through the server; The first device decrypts the first instruction using the first key through the secondary processor, and starts the main processor through the secondary processor in response to the first instruction.
14. The method of claim 13, wherein, The authentication information of the first device includes any one or more of the following: an authentication code of the first device, and an identifier of the first device.
15. The method according to claim 13 or 14, characterized in that, The first device determines the first key based on the first data through the secondary processor, specifically including: The first device determines the first key through the secondary processor based on the first data. Alternatively, the first device generates the first key through the first data and a second algorithm, and notifies the second device to obtain the first key based on the second algorithm.
16. The method of any one of claims 13-15, wherein The first device sends the authentication information of the first device to the server through the main processor, specifically including: the first device sends a registration request to the server through the main processor, and the registration request carries the authentication information of the first device encrypted using a public key of the server.
17. The method of claim 16, wherein, The method further includes: In the case that the authentication information of the first device is decrypted by the private key of the server, the first device receives the first account and the first password sent by the server.
18. The method of claim 17, wherein, The first device receives the first account and the first password sent by the server, specifically including: In the case that the main processor of the first device is in a working state, the first device establishes a second connection with the server using the first account and the first password through the main processor; In the case that the main processor of the first device is in a non-working state, the first device establishes a first connection with the server using the first account and the first password through the secondary processor.
19. The method of claim 18, wherein, The performance of the main processor is superior to that of the secondary processor, and the second connection is established while the first connection is disconnected.
20. The method of claim 18 or 19, wherein, After the server sends the first account and the first password to the first device, the method further includes: In the case that the use time of the first password exceeds a preset time, the first device receives a second password sent by the server.
21. The method of claim 20, wherein, The first device receives the second password sent by the server, specifically including: The first device receives the second password sent by the server through the main processor, and sends the second password to the secondary processor; Alternatively, the first device receives the second password sent by the server through the secondary processor.
22. The method of claim 21, wherein, After the first device receives the second password sent by the server through the secondary processor, the method further includes: In the case that the main processor of the first device is in a working state, the first device requests the server to establish the second connection using the first account and the first password through the main processor; The first device receives the third password sent by the server through the main processor, and sends the third password to the secondary processor.
23. The method of claim 21 or 22, wherein, Before the first device receives the second password sent by the server, the method further comprises: The first device sends the server signature verification information, which is generated by encrypting the server public key, and the signature verification information is used for the server to verify by using the server private key.
24. The method of any one of claims 13-23, wherein, Before the first device starts the main processor by the secondary processor, the method further comprises: The first device also receives the device account and the password corresponding to the device account sent by the second device through the server; The first device determines that the device account and the account of the first device are the same, and the password corresponding to the device account and the password corresponding to the account of the first device are the same.
25. The method of any one of claims 13-24, wherein, The first device encrypts and stores any one or more of the following: authentication information of the first device, the first key, the public key of the server, the public key of the first device, the private key of the first device, the account of the first device, or the password corresponding to the account of the first device.
26. A remote control method characterized by, The method is applied to a second device, and the method comprises: The second device receives the authentication information of the first device forwarded by the server; the authentication information of the first device is that, when the main processor of the first device is in working state, the server receives the first device sending The second device sends an authentication request to the first device through the server, and the authentication request carries first data encrypted by the public key of the first device, and the first data is calculated by a preset algorithm on any one or more of the following data: authentication information, random number of the first device, random number of the second device; The authentication request is used for the main processor of the first device to be in non-working state, and the first data is calculated by the secondary processor of the first device by using the private key of the first device and the preset algorithm on the authentication information, and the first key is determined based on the first data; The second device sends the first instruction encrypted by the first key to the first device through the server, so that the first device decrypts the first instruction by the secondary processor using the first key, and in response to the first instruction, the main processor is started by the secondary processor.
27. An electronic device, comprising: The electronic device comprises a plurality of memories and a plurality of processors; the memory is coupled with the processor, the memory is used to store computer program code, the computer program code comprises computer instructions, and the processor invokes the computer instructions to make the electronic device execute the method in any one of claims 13-26.
28. A chip, the chip comprising: The chip is applied to an electronic device, and the chip is used to invoke computer instructions to make the electronic device execute the method in any one of claims 13-26.
29. A computer-readable storage medium comprising instructions, wherein: When the instructions run on an electronic device, the electronic device executes the method in any one of claims 13-26.
30. A communication system, characterized by The communication system comprises a first device, a second device and a server; the first device comprises a plurality of memories, a plurality of processors; the memories are coupled with the processors, the memories are used to store computer program codes, the computer program codes comprise computer instructions, the processors invoke the computer instructions to make the first device execute the method as claimed in any one of claims 13-25; the second device comprises a plurality of memories, a plurality of processors; the memories are coupled with the processors, the memories are used to store computer program codes, the computer program codes comprise computer instructions, the processors invoke the computer instructions to make the second device execute the method as claimed in claim 26.
Citation Information
Patent Citations
Remote starting unit
CN101997691A
Method based on key diversifying for multi-processor mutual binding authentication
CN102571334A