Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
With the development of technology, electronic devices are increasingly of a variety. For example, in addition to smart phones, tablet computers, and televisions, electronic devices such as smart watches, wireless headphones, and the like have emerged. The functions that are provided may be partially identical for different electronic devices. For example, both televisions and smartphones may be used to play video, and both headphones and speakers may be used to play audio. In this case, there is more and more collaboration between electronic devices. For example, the video stream in the mobile phone is transferred to the television for playing, or the mail on the mobile phone is connected to the computer for editing. And then, or the communication task flow in progress on the mobile phone is transferred to the intelligent watch for proceeding.
However, the inventors have found in research that the electronic devices that need to cooperate in the relevant manner are all in the same communication network (e.g., all in the same local area network), thereby causing inconvenience to the cooperation between the electronic devices.
Therefore, the inventor proposes the device state processing method, the device and the mobile terminal, and after the mobile terminal receives the device state of the first electronic device sent by the first electronic device, the device state of the first electronic device can be transferred to the second electronic device again in response to the state transfer instruction. Therefore, the mobile terminal can be used as an intermediate device, so that the device state of the first electronic device can be transferred to the second electronic device through the mobile terminal, and the device state can still be transferred under the condition that communication (such as no longer the same network) between the first electronic device and the second electronic device is impossible, so that the second electronic device can operate according to the device state of the first electronic device, the cooperation flexibility between the electronic devices is improved, and the circulation of the device states between the electronic devices is more convenient.
The application scenario according to the embodiment of the present application is described first.
Referring to fig. 1, in the scenario shown in fig. 1, a mobile terminal 10, an electronic device 11, and an electronic device 12 are included. Wherein the electronic device 11 and the electronic device 12 may communicate with the mobile terminal 10, respectively. When the mobile terminal 10 communicates with the electronic device 11, the electronic device 11 may transmit data to the mobile terminal 10, for example, a device status of the electronic device 11 may be transmitted. While the mobile terminal 10 is in communication with the electronic device 12, the mobile terminal 10 may transmit the device state of the electronic device 11 to the electronic device 12 to enable the mobile terminal 10 to transfer the device state of the electronic device 11 to the electronic device 12.
For example, as shown in fig. 2, the mobile terminal 10 may form a first network with the electronic device 11. The mobile terminal 10 may form a second network with the electronic device 12. When the mobile terminal 10 and the electronic device 11 form a first network, the mobile terminal 10 may communicate with the electronic device 11. When the mobile terminal 10 and the electronic device 12 form a second network, the mobile terminal 10 and the electronic device 12 communicate with each other. The first network and the second network may each be a local area network.
The mobile terminal 10 may be, for example, a mobile terminal device. For example, smart phones, tablet computers, smart watches, smart glasses, etc. can be used. Alternatively, the specific types of the electronic device 11 and the electronic device 12 are not specifically limited in the embodiment of the present application, for example, the electronic device 11 may be a computer, a television, or the like, and the electronic device 12 may also be a computer, a television, or the like. The manner in which the communication between the mobile terminal 10 and the electronic device 11 and the electronic device 12 is established is not particularly limited in the present application. For example, the mobile terminal 10 and the electronic device 11 may communicate in a wireless communication manner or in a wired communication manner. Correspondingly, the mobile terminal 10 and the electronic device 12 may communicate in a wireless communication manner or may communicate in a wired communication manner.
It should be noted that the electronic device 11 in fig. 1 and 2 may be used as the first electronic device in the subsequent embodiment, and the electronic device 12 may be used as the second electronic device in the subsequent embodiment. Furthermore, in the embodiment of the present application, the first electronic device and the second electronic device may be the same device except for the cases shown in fig. 1 and fig. 2.
Embodiments of the present application will be described in detail below with reference to the accompanying drawings.
Referring to fig. 3, an embodiment of the present application provides a device state processing method, which is applied to a mobile terminal, and includes:
s110: the mobile terminal receives the equipment state of the first electronic equipment sent by the first electronic equipment.
In the embodiment of the application, the mobile terminal can be understood as an intermediate device for device state transition. For example, a mobile terminal may be used to transfer the device state of one electronic device to another electronic device. The first electronic device may be understood as a device whose corresponding device state may be transferred to other electronic devices. Correspondingly, the second electronic device may then be understood as a device for receiving the device status of the other electronic devices.
The first electronic device may send the device state of the first electronic device when the device state needs to be transferred to another device. In addition, in the embodiment of the present application, there may be multiple ways to trigger the first electronic device to send the device state.
As one way, the first electronic device may send the device status of the first electronic device when the mobile terminal is detected. Optionally, when detecting the wireless signal sent by the mobile terminal, the first electronic device may respond to the wireless signal sent by the mobile terminal, and further establish a connection with the mobile terminal. After establishing a connection with the mobile terminal, the first electronic device may then begin sending device status to the mobile terminal. Correspondingly, the mobile terminal may receive the device state of the first electronic device sent by the first electronic device after establishing connection with the first electronic device.
For example, if a Near Field Communication (NFC) mode, such as NFC (NEAR FIELD Communication) mode, is adopted between the mobile terminal and the first electronic device, when the mobile terminal approaches the first electronic device, the mobile terminal may establish a connection with the first electronic device, so that the first electronic device may send the device state to the mobile terminal. For example, the mobile terminal and the first electronic device may trigger communication in a manner of touching each other. For example, as shown in fig. 4, in the case shown in fig. 4, a smart phone (a mobile terminal) is attached to a computer (a first electronic device) to achieve a touch with the computer, so that the smart phone can establish a connection with the computer through a near field communication manner such as NFC, and after the connection is established, the computer can send a device state to the smart phone.
Alternatively, the first electronic device may send the device state in response to the first specified event. It should be noted that, in addition to establishing a connection, communication between the first electronic device and the mobile terminal may also be performed by means of transmitting a broadcast signal.
Alternatively, the first specified event may include the first electronic device detecting a broadcast signal transmitted by the mobile terminal. After the mobile terminal starts to transmit the broadcast signal, if the first electronic device is located in the coverage area of the broadcast signal transmitted by the mobile terminal, the first electronic device may receive the broadcast signal transmitted by the mobile terminal. After the first electronic device receives the broadcast signal sent by the mobile terminal, the first electronic device may also start to send the broadcast signal, and the sent broadcast signal carries the device state of the first electronic device. Further, the mobile terminal may acquire the device status of the first electronic device through a broadcast signal transmitted by the first electronic device. In this way, communication is enabled without connection establishment between the first electronic device and the mobile terminal.
Wherein the mobile terminal may start transmitting the broadcast signal in response to an operation of the user, or the mobile terminal may start transmitting the broadcast signal in response to a second designated event. The second specified event may include the current time being the specified time. The designated time may be a time preset by the user, or may be a time predicted by the mobile terminal that the user will perform the position movement. For example, if the user works in an office in daytime, the user uses the computer in the office to process a work transaction, and by the night, after the user returns to home from work, the user may continue to overtake to complete the work transaction which is not completed in the office, in this case, when the mobile terminal detects that the current time of working set by the user is reached, the mobile terminal may start to send a broadcast signal to trigger the computer (first electronic device) in the office to send the device state to the mobile terminal through the broadcast signal. Furthermore, the second designated event may include that the mobile terminal enters an information recording state, and after entering the information recording state, the mobile terminal may send a broadcast signal to trigger the first electronic device to send its own device state through the broadcast signal, so as to record the device state sent by the first electronic device.
Optionally, the first specified event may further include the first electronic device entering an information transmission state. After the first electronic device enters the information sending state, the first electronic device can send a broadcast signal carrying the device state once, so as to send the device state to the mobile terminal. Furthermore, the first electronic device may periodically transmit a broadcast signal after entering the information transmission state, so as to transmit the current latest device state to the mobile terminal through the broadcast signal. For example, the first electronic device may send a broadcast signal at 10 seconds intervals, where the broadcast signal sent each time carries the current latest device state.
The method comprises the steps that as an entering mode, the first electronic equipment can be triggered to enter a message sending state through a configuration control in the first electronic equipment. Optionally, the configuration control may be a virtual control or an entity control.
S120: in response to detecting that the second electronic device and the device capabilities of the second electronic device match the first electronic device, a state transition instruction is generated.
When the mobile terminal detects the second electronic device, whether the device capability of the second electronic device is matched with the first electronic device or not can be detected. If so, it is determined that the device state can be transferred to the second electronic device.
It should be noted that in the embodiment of the present application, there may be multiple kinds of electronic devices capable of transferring the device state to other electronic devices, and there may also be multiple kinds of electronic devices capable of receiving the device state sent by other devices. The functionality that is provided may vary from electronic device to electronic device. For example, a television has a video play function, but the television is inconvenient for content editing (e.g., text editing or picture editing). For another example, the computer has a video playing function, and can conveniently edit contents. For another example, a sound box may be used for audio playback, but the sound box cannot be used for video playback, content editing, and the like. Therefore, by detecting the detected capability of the second electronic device, the device state transition is facilitated to be more effective, and invalid device state transition caused by that the second electronic device does not support the functions of the first electronic device is avoided.
In the embodiment of the application, various ways are available for detecting whether the capability of the second electronic device matches the capability of the first electronic device.
Optionally, it may be detected whether the device type of the second electronic device is the same as the device type of the first electronic device, and if so, it is determined that the capabilities of the second electronic device and the first electronic device match. It should be noted that, for electronic devices of the same device type, the functions of the electronic devices are generally the same, so after the device state of the first electronic device is transferred to the second electronic device, the second electronic device can effectively respond to the device state.
Optionally, it may be detected whether the second electronic device is provided with an application corresponding to the device state, and if so, it is determined that the capabilities of the second electronic device and the first electronic device match. It should be noted that some device states are related to an application program, for example, the device states may include an operation state of the application program, in which case, even if the second electronic device is the same as the device type of the first electronic device, it is still unable to respond to the operation state of the application program included in the device states without the application program. It is advantageous to make the transfer of the device state more efficient by detecting whether an application corresponding to the device state is included in the second electronic device. The application program corresponding to the device state may be understood as an application program to which the running state included in the device state belongs. The device state includes a playing progress, where the playing progress belongs to a video playing program, and further, an application program corresponding to the device state includes the video playing program. Furthermore, the device state includes a playing progress and a content editing progress, and then the application program corresponding to the device state includes a video playing program and a content editing program.
In addition, in the embodiment of the application, under the condition that a plurality of modes for detecting whether the second electronic device is matched with the first electronic device exist, which mode can be determined according to the current actual situation.
Alternatively, the mobile terminal may detect the content of the stored device state, and determine, based on the content of the included device state, a way to detect whether the second electronic device matches the first electronic device. For example, in the case where it is detected that only the hardware state is included in the device states, it may be determined whether the second electronic device matches the first electronic device by the device type. In the case that the device state is detected to include at least the running state of the application program, whether the second electronic device matches the first electronic device may be determined by detecting whether the second electronic device is installed with the application program corresponding to the device state.
In the embodiment of the application, a plurality of devices capable of performing state transition can be detected by the mobile terminal, in this case, the plurality of devices capable of performing state transition can be all used as candidate devices, and then a device with the capability matched with the capability of the first electronic device is selected from the candidate devices as the second electronic device.
As one way, a device on a connection or a device that can be searched for may be used as a candidate device. In the event that a candidate device is detected, a second electronic device may be determined from the candidate devices based on the aforementioned manner of detection capability matching. For example, if the device status includes a playing progress of the video playing program, the determined second electronic device needs to be at least capable of playing video. For another example, if the device status includes a progress of editing the mail, the second electronic device determined based on the progress of editing the mail has at least a function of sending the mail.
S130: in response to the state transition instruction, the device state is transitioned to the second electronic device for causing the second electronic device to operate based on the device state.
After acquiring the device state of the first electronic device, the mobile terminal may store the acquired device state. And may transfer the device state of the first electronic device to the second electronic device in response to the state transfer instruction. The second electronic device is operated based on the device state, which is understood to be the same as the first electronic device in the device state, and is also understood to be operated by the second electronic device with the device state of the first electronic device as a starting state.
In embodiments of the present application, the device state may include an operating state and/or a hardware state of the application. The running state of the application program may include content currently displayed by the application program, or may include progress of a task processed by the application program, or the like. The hardware state may include a state of a functional device of the first electronic device. The functional device may include a horn, a display screen, and various sensors.
As one way, the device state may include an operating state of the application, in which way the device state is transferred to the second electronic device, and may be used to cause the application in the second electronic device to operate based on the operating state included in the device state. Wherein there may be different operating states for different classes of applications.
Alternatively, in the case where the application program is a program of a media playing class, the device state may include a playing progress of the program of the media playing class, and in this case, transferring the playing progress to the second electronic device may be used to cause the program of the media playing class in the second electronic device to continue playing based on the playing progress. For example, when the video playing program in the first electronic device is playing video, and the first electronic device sends the device state to the mobile terminal, the sent device state may include a playing progress of the played video. The mobile terminal can store the playing progress. And when the state transition instruction is detected, the playing progress can be sent to the second electronic equipment in response to the state transition instruction, so that the second electronic equipment can automatically start the video playing program, and the playing progress sent by the first electronic equipment is used as a playing starting position to continue video playing. For example, the playing progress of the video playing program of the first electronic device is 11 minutes and 10 seconds, and then the video playing program of the second electronic device continues to play the video from 11 minutes and 10 seconds.
Alternatively, the application program is a content editing program, and the device state includes a content editing progress of the content editing program, in which case, transferring the content editing progress to the second electronic device may be used to cause the content editing program in the second electronic device to display an editing interface based on the content editing progress. Illustratively, the user is using a content editing program in the first electronic device for content editing, e.g., composing a document by the content editing program. When the first electronic device sends the device state to the mobile terminal, the first electronic device may send the content editing progress as the device state to the mobile terminal. The mobile terminal may send the content editing schedule to the second electronic device in response to the state transition instruction. Correspondingly, the second electronic device can automatically start the content editing program and display the content editing progress in the first electronic device in the started program, so that the user can more conveniently continue to complete the operations which are not completed in the other devices. For example, the content editing progress may include content that has been input into the program, in which case, after the second electronic device starts the content editing program, the content input into the program in the first electronic device may be automatically displayed in the content editing program.
Alternatively, in the case where the device state includes a hardware state, sending the device state to the second electronic device may cause the state of the associated functional device in the second electronic device to change to be consistent with the state characterized in the device state. For example, the device state transmitted by the first electronic device may include a volume corresponding to the speaker, and after the second electronic device receives the device state, the volume of the speaker may also be configured to be consistent with the volume of the speaker of the first electronic device. For example, the device state transmitted by the first electronic device may include brightness corresponding to the screen, and further, after receiving the device state, the second electronic device may configure the brightness of the screen to be consistent with the brightness of the screen of the first electronic device.
As still another way, in the case that the device state includes both the running state of the application program and the hardware state, the second electronic device automatically starts the corresponding application program to run according to the running state of the application program and simultaneously changes the state of its own functional device according to the hardware state. The device state of the first electronic device sent to the mobile terminal includes a playing progress of the video playing program, and a volume of a speaker of the first electronic device, in which case the second electronic device may configure the volume of the speaker of the second electronic device to be consistent with the volume identified in the device state, in addition to starting the video playing program to continue video playing from the playing progress.
In one manner, when the mobile terminal receives the device state of the first electronic device sent by the first electronic device, the mobile terminal and the first electronic device may be in the same local area network, and the second electronic device is not in the local area network where the mobile terminal and the first electronic device are located. When the mobile terminal responds to the state transition instruction to transfer the equipment state to the second electronic equipment, the mobile terminal and the second electronic equipment can be in the same local area network, and the first electronic equipment is not in the local area network where the mobile terminal and the second electronic equipment are located, so that the equipment state of the first electronic equipment can still be transferred to the second electronic equipment under the condition that the first electronic equipment and the second electronic equipment are not in the same local area network.
According to the device state processing method provided by the embodiment, after the mobile terminal receives the device state of the first electronic device sent by the first electronic device, the device state of the first electronic device can be transferred to the second electronic device in response to the state transfer instruction. Therefore, the mobile terminal can be used as an intermediate device, so that the device state of the first electronic device can be transferred to the second electronic device through the mobile terminal, and the device state can still be transferred under the condition that communication (such as no longer the same network) between the first electronic device and the second electronic device is impossible, so that the second electronic device can operate according to the device state of the first electronic device, the cooperation flexibility between the electronic devices is improved, and the circulation of the device states between the electronic devices is more convenient.
Referring to fig. 5, an apparatus state processing method provided by an embodiment of the present application is applied to a mobile terminal, and the method includes:
s310: the mobile terminal receives the equipment state of the first electronic equipment sent by the first electronic equipment.
S320: in response to detecting that the second electronic device and the device capabilities of the second electronic device match the first electronic device, a prompt message is displayed to prompt a user to confirm whether to make the state transition.
As indicated in the foregoing, the mobile terminal may automatically send the device status to the second electronic device upon detection of the second electronic device, so that the second electronic device may also automatically operate according to the transmitted device status. In some cases, however, the user may not need or desire the mobile terminal to perform the device state transition operation, in which case the mobile terminal may trigger a reminder message to facilitate the user in determining whether to perform the device state transition. In addition, the device state may include multiple states, and there may be information related to the privacy of the user in the multiple states, so that the user can choose whether to transfer the device state, which is also beneficial to protecting the privacy of the user.
S330: and if the first feedback information is acquired, generating a state transition instruction.
When the prompt message is displayed, the user may choose to transfer the device state or may choose not to transfer the device state. And after the prompt information is displayed, the mobile terminal can generate feedback information according to the selection of the user. If the mobile terminal acquires the first feedback information, the user is characterized to select to perform state transition, and then the mobile terminal generates a state transition instruction. If the second feedback information is obtained, the user is characterized to select not to transfer the equipment state, and then a state transfer instruction is not generated. For example, as shown in fig. 6, when the mobile terminal detects the second electronic device, the interface 20 may be displayed, and a prompt message with "whether to perform state transition" is displayed in the interface 20. Also displayed in interface 20 is a first control with a "yes" content and a second control with a "no" content. If the first control is touched, the mobile terminal acquires first feedback information, and if the second control is touched, the mobile terminal acquires second feedback information. For another example, when the mobile terminal detects the second electronic device, an interface 30 as shown in fig. 7 may also be displayed, and a countdown (e.g., the 5s countdown in fig. 7) is also displayed in the interface 30. In this case, if the mobile terminal does not detect a touch operation on the first control or the second control at the end of the countdown, the mobile terminal does not generate a state transition instruction by default.
S340: in response to the state transition instruction, the device state is transitioned to the second electronic device for causing the second electronic device to operate based on the device state.
As one way, the first electronic device may start multiple applications at the same time when running, and may also configure multiple functional devices. In this case, the device state of the first electronic device transmitted to the mobile terminal may include a plurality of states. For example, the device state may include an operating state of an application program as well as a hardware state. The running states of the application programs can include running states of a plurality of application programs, and the hardware states can also include states of a plurality of functional devices. For example, as shown in fig. 8, in the state sending stage, the first electronic device sends the playing progress of the application a and the volume of the speaker to the mobile terminal, and then the device state recorded in the mobile terminal includes the playing progress of the application a and the volume of the speaker.
In the case where a plurality of states are included in the device state, the running state of each application can be understood as one sub-state, and the state of each functional device can be understood as one sub-state. When the state transition instruction is generated, a state transition instruction corresponding to the target sub-state is generated, and then the mobile terminal responds to the state transition instruction corresponding to the target sub-state and transfers the target sub-state to the second electronic device so as to enable the second electronic device to operate based on the target sub-state, wherein the target sub-state is a sub-state for transferring, which is determined from a plurality of sub-states.
In embodiments of the present application, there may be a variety of ways to determine the target sub-state.
Alternatively, the target sub-state may be determined from a plurality of sub-states according to a user's selection, and a state transition instruction corresponding to the target sub-state may be generated. In this manner, the mobile terminal may display sub-states included in the stored device states to select a target sub-state from among the displayed sub-states according to a user's selection.
Alternatively, the target sub-state may be determined from a plurality of sub-states according to a user's historical operating habits, and a state transition instruction corresponding to the target sub-state may be generated. It should be noted that the usage habits of users for electronic devices may be different at different times and under different environments. Furthermore, the mobile terminal can predict the applicable sub-state as the target sub-state according to the current time and the current position of the user.
Furthermore, the mobile terminal may also use all sub-states as target sub-states.
According to the device state processing method, the mobile terminal can be used as an intermediate device, so that the device state of the first electronic device is transferred to the second electronic device through the mobile terminal, and further the device state can still be transferred under the condition that communication between the first electronic device and the second electronic device is impossible, so that the second electronic device can operate according to the device state of the first electronic device, the cooperation flexibility between the electronic devices is improved, and the circulation of the device states between the electronic devices is more convenient. In this embodiment, when the mobile terminal detects the second electronic device capable of performing state transition, a prompt message may be sent to the user first, and when feedback that agrees to perform state transition is received, a state transition instruction may be generated to perform state transition of the device. In addition, under the condition that the equipment state received by the second electronic equipment comprises a plurality of sub-states, the target sub-state can be determined through a set rule or user selection, so that the flexibility of state processing is further improved.
Referring to fig. 9, an apparatus state processing method provided by an embodiment of the present application is applied to a mobile terminal, and the method includes:
S410: and the mobile terminal responds to the first theme message sent by the first electronic device, and acquires the device state of the first electronic device from the first theme message.
S420: in response to detecting that the second electronic device and the device capabilities of the second electronic device match the first electronic device, a state transition instruction is generated.
S430: and responding to the state transition instruction, and sending a second theme message carrying the device state so as to transfer the device state to the second electronic device through the second theme message.
In the embodiment of the present application, for the same device or terminal, the device state sent by other devices may be received, or the device state of the terminal or the device state stored locally may be sent to other devices. In this case, in order to distinguish between the message sent by the first electronic device to the mobile terminal and the message sent by the mobile terminal to the second electronic device, corresponding topics may be configured for different messages, so as to implement the communication based on the Topic ROS (Robot Operating System), for example, a communication manner based on publish and subscribe. For example, the topic of the first topic message may be "state store" and the topic of the second topic message may be "state restore". In this manner, each terminal or device may subscribe to the desired message. For example, a mobile terminal may subscribe to a message entitled "state store" and other electronic devices that may receive device state may subscribe to a message entitled "restore state".
It should be noted that, in the case where the topic of the first topic message is "state storage", the first topic message may carry the device state to be stored. The device state may include at least one of an operating state of the application and a hardware state. The running states of the application programs can include running states of a plurality of application programs, and the hardware states can also include states of a plurality of functional devices. When the second electronic device receives the second subject message, the device state to be restored can be obtained from the second subject message. Correspondingly, the device state to be restored may also include at least one of an operating state of the application program and a hardware state.
In one manner, after detecting the second electronic device, the mobile terminal may detect whether the second electronic device subscribes to a message with a theme of "restore state" in addition to detecting whether the device capability of the second electronic device matches the device capability of the first electronic device. If the device capability of the second electronic device is detected to be matched with the device capability of the first electronic device, and the message with the theme of 'restore state' is subscribed, a state transition instruction is generated, so that the mobile terminal responds to the state transition instruction and sends the device state of the first electronic device to the second electronic device.
According to the device state processing method, the cooperation flexibility among the electronic devices is improved, and the circulation of the device states among the electronic devices is more convenient. In addition, in this embodiment, a corresponding theme may be defined for the sent message, so that a party receiving the message may determine, through the theme of the received message, a processing measure currently required to be taken on the received message, thereby further improving flexibility of performing device state transition.
In embodiments of the present application, the device states may be multiple (e.g., include multiple sub-states), and a corresponding identifier may be configured for each device state to distinguish between the different device states by the identifier. In this case, when the mobile terminal receives the device state sent by the first electronic device, it may detect whether the device state corresponding to the identifier is stored in the local history through the identifier of the device state, and in the case that the device state is stored, the device state stored in the history may be replaced by the received device state, so as to complete updating the device state corresponding to the identifier. If the device state is not stored, the device state corresponding to the identifier is directly stored. For example, as shown in fig. 10, after the electronic device 11 sends, as the first electronic device, the device states to the mobile terminal 10 at time T1, there may be two device states stored in the mobile terminal 10, one device state is identified as the application a, and the device state corresponding to the identification is "video b is played to 11 minutes 10 seconds". Thereafter, the mobile terminal 10 may retransmit the stored device state to the electronic device 12 as the second electronic device. After receiving the transmitted device status, the electronic device 12 may automatically open the video playing program and continue playing the video b from the position of 11 minutes and 10 seconds. Thereafter, the electronic device 12 may also transmit the device status as the first electronic device to the mobile terminal. For example, if the electronic device 12 sends the device status to the mobile terminal when the video b is played for 30 minutes and 11 seconds, the device status received by the mobile terminal may include the device status identified as the application program a, and further the historically stored device status identified as the application program a (the device status stored at the time T1) may be replaced, so as to obtain the device status shown on the right side in fig. 10.
It should be noted that in some cases, the second electronic device needs to start a corresponding application program when responding to the device status. The second electronic device responding to the device state may be understood as the second electronic device operating according to the device state. For example, if the device status includes the playing progress of the video playing program, the second electronic device needs to start the video playing program to play the video. However, the second electronic device may not be installed with the video playing program, which may cause the second electronic device to fail to continue playing the related video based on the playing progress.
As an improvement, after the second electronic device is obtained, it may be detected first whether the second electronic device needs a corresponding application program in response to the device state, if the corresponding application program is needed, it may be detected again whether the second electronic device has a required application program installed therein, and if the required application program has been installed, a state transition instruction may be directly generated, so that the second electronic device may operate based on the received device state. If the required application program is not installed, the second electronic device can be triggered to install the required application program first, and after the second electronic device completes the installation of the required application program, a state transition instruction is generated so as to enable the second electronic device to operate according to the received device state.
Optionally, if the second electronic device supports remote control, an application program installation instruction may be sent to the second electronic device, so as to control the second electronic device to install the required application program first. After the second electronic device completes the installation of the required application, a completion notification may be returned, and in response to the completion notification, a state transition instruction may be generated to send the device state to the second electronic device, so that the second electronic device operates according to the received device state.
Optionally, if the first electronic device does not support remote control, a pop-up window may be displayed, and prompt information is displayed in the pop-up window, where the prompt information is used to prompt the user that the user needs to install the required application program in the second electronic device. After the electronic device displays the popup window, it may be periodically detected whether the second electronic device has installed a required application, and if it is detected that the second electronic device has installed a required application, a state transition instruction may be generated to send the device state to the second electronic device.
It should be noted that, after the second electronic device is determined, the second electronic device may be in multiple states. For example, the second electronic device may be in an on and idle state, may be in an on and busy state, and may be in a standby state, wherein the on and idle state indicates that the second electronic device is on but is not currently performing task operations. The on and busy state characterizes the second electronic device as already on and running a task. Therefore, after the second electronic device is determined, the state of the second electronic device may be acquired first, and then a specific state transition manner may be determined according to the state of the second electronic device.
Optionally, if it is determined that the second electronic device is in the standby state, a start instruction may be sent to the second electronic device first to control the second electronic device to start. And after the second electronic equipment is started, the equipment state is sent to the second electronic equipment.
Alternatively, if it is determined that the second electronic device is in the started and idle state, the device state may be directly sent to the second electronic device.
Optionally, if it is determined that the second electronic device is in a started and busy state, the priority of the task corresponding to the device state and the task currently being executed by the second electronic device may be compared. And if the priority of the task operated by the second electronic device is lower than the priority of the task corresponding to the device state (the task executed by the application program to which the operation state belongs in the case that the device state comprises the operation state of the application program), sending the device state to the second electronic device. If the priority of the task operated by the second electronic device is higher than the priority of the task corresponding to the device state, the user can be queried to query whether the user waits for the second electronic device to be in the idle state and then sends the device state or directly sends the device state. If the user selects to wait for the second electronic equipment to be in the idle state and then send the equipment state, the state of the second electronic equipment can be detected in real time, and if the second electronic equipment is switched to the idle state, the equipment state is sent to the second electronic equipment. If the user selects to directly conduct task circulation, the device state is directly sent to the second electronic device.
Referring to fig. 11, an apparatus state processing method provided in an embodiment of the present application is applied to a first electronic apparatus, and the method includes:
s510: the device state of the first electronic device is obtained. S520: and transmitting the device state to the mobile terminal, wherein the device state is transferred to the second electronic device when the mobile terminal detects that the second electronic device and the device capability of the second electronic device are matched with the first electronic device, so that the second electronic device operates based on the device state.
Referring to fig. 12, an apparatus state processing method provided in an embodiment of the present application is applied to a first electronic apparatus, and the method includes: s610: and receiving the equipment state of the first electronic equipment sent by the mobile terminal, wherein the equipment state is sent by the mobile terminal when the second electronic equipment and the equipment capability of the second electronic equipment are detected to be matched with the first electronic equipment, and the equipment state is sent to the mobile terminal by the first electronic equipment. S620: operating based on the device state.
Referring to fig. 13, an apparatus control device 700 according to an embodiment of the present application is configured to operate in a mobile terminal, where the apparatus 700 includes: the state receiving unit 710 is configured to receive a device state of the first electronic device sent by the first electronic device. An instruction generating unit 720, configured to generate a state transition instruction in response to detecting that the second electronic device and the device capability of the second electronic device match the first electronic device. And a device state sending unit 730, configured to respond to the state transition instruction, and transition the device state to the second electronic device, so that the second electronic device operates based on the device state. The device state sending unit 730 is further configured to generate a state transition instruction in response to detecting the second electronic device. Optionally, the instruction generating unit 720 is further specifically configured to, in response to detecting the second electronic device, detect whether a device capability of the second electronic device matches the first electronic device; and if so, transferring the device state to the second electronic device for enabling the second electronic device to operate based on the device state. Optionally, the instruction generating unit 720 is further specifically configured to detect whether the device type of the second electronic device is the same as the device type of the first electronic device, and if so, determine that the capabilities of the second electronic device and the first electronic device match.
Optionally, the instruction generating unit 720 is further specifically configured to detect whether the second electronic device installs an application corresponding to the device state, and if so, determine that the capabilities of the second electronic device and the first electronic device match.
Optionally, the instruction generating unit 720 is further specifically configured to, in response to detecting the second electronic device, display a prompt message to prompt the user to confirm whether to perform the state transition; if the first feedback information is acquired, a state transition instruction is generated, wherein the first feedback information represents the selection of the user to perform state transition.
As one manner, the device state includes an operation state of the application program, and the device state sending unit 730 is specifically configured to transfer the device state to the second electronic device, so as to enable the application program in the second electronic device to operate based on the device state.
Optionally, the application program is a program of a media playing class, and the device state includes a playing progress of the program of the media playing class. The device state sending unit 730 is specifically configured to transfer the playing progress to the second electronic device, so as to enable the program of the media playing class in the second electronic device to continue playing based on the playing progress.
Optionally, the application is a content editing program, and the device state includes a content editing progress of the content editing program. The device state sending unit 730 is specifically configured to transfer the content editing progress to the second electronic device, so as to enable the content editing program in the second electronic device to display the editing interface based on the content editing progress.
As one approach, the device state includes a plurality of sub-states. The device state sending unit 730 is further specifically configured to, in response to a state transition instruction corresponding to the target sub-state, transition the target sub-state to the second electronic device, so that the second electronic device operates based on the target sub-state, where the target sub-state is a sub-state determined from the multiple sub-states for performing transition. Optionally, the device state sending unit 730 is further specifically configured to determine a target sub-state from the multiple sub-states according to a selection of a user, and generate a state transition instruction corresponding to the target sub-state; or alternatively
And determining a target sub-state from the plurality of sub-states according to the historical operation habits of the user, and generating a state transition instruction corresponding to the target sub-state.
Referring to fig. 14, in an embodiment of the present application, a device control apparatus 800 is provided, and the device control apparatus 800 operates on a first electronic device, where the device control apparatus includes: the state acquiring unit 810 is configured to acquire a device state of the first electronic device. And a state transmitting unit 820 configured to transmit the device state to the mobile terminal, so that the mobile terminal transfers the device state to the second electronic device when detecting that the second electronic device and the device capability of the second electronic device match the first electronic device, so that the second electronic device operates based on the device state.
Referring to fig. 15, in an embodiment of the present application, a device control apparatus 900, which is configured to operate in a first electronic device, the apparatus 900 includes: the state receiving unit 910 is configured to receive a device state of the first electronic device sent by the mobile terminal, where the device state is sent by the mobile terminal when the mobile terminal detects that the second electronic device and the device capability of the second electronic device match the first electronic device, and the device state is sent by the first electronic device to the mobile terminal. The state processing unit 920 is configured to operate based on the device state.
According to the device state processing device, the cooperation flexibility among the electronic devices is improved, and the circulation of the device states among the electronic devices is more convenient.
It should be noted that, in the present application, the device embodiment and the foregoing method embodiment correspond to each other, and specific principles in the device embodiment may refer to the content in the foregoing method embodiment, which is not described herein again.
An electronic device according to the present application will be described with reference to fig. 16. Referring to fig. 16, based on the above-mentioned device state processing method and apparatus, another mobile terminal 2000 capable of executing the above-mentioned device state processing method and apparatus is provided in the embodiment of the present application. The mobile terminal 2000 includes one or more (only one shown) processors 202, memory 204, a network module 206, a sensor module 208, and an audio acquisition device 210 coupled to each other. The memory 204 stores therein a program capable of executing the contents of the foregoing embodiments, and the processor 202 can execute the program stored in the memory 204.
Wherein the processor 202 may include one or more processing cores. The processor 202 employs various interfaces and lines to connect various portions of the overall mobile terminal 2000, and performs various functions of the mobile terminal 2000 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 204, and invoking data stored in the memory 204. Alternatively, the processor 202 may be implemented in hardware in at least one of digital signal Processing (DIGITAL SIGNAL Processing, DSP), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 202 may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), and a modem, etc. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for being responsible for rendering and drawing of display content; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the processor 202 and may be implemented solely by a single communication chip.
Memory 204 may include random access Memory (Random Access Memory, RAM) or Read-Only Memory (ROM). Memory 204 may be used to store instructions, programs, code sets, or instruction sets. The memory 204 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (e.g., a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described below, etc.
The network module 206 is configured to implement information interaction between the mobile terminal 2000 and other devices, for example, transmit a device control command, a manipulation request command, and a status information acquisition command. While mobile terminal 2000 may be implemented as a different device, its corresponding network module 206 may be different. The sensor module 208 may include at least one sensor. Specifically, the sensor module 208 may include, but is not limited to: light sensors, motion sensors, pressure sensors, infrared thermal sensors, distance sensors, acceleration sensors, and other sensors. Among them, the pressure sensor may be a sensor that detects the pressure generated by pressing against the mobile terminal 2000. That is, the pressure sensor detects a pressure generated by contact or pressing between the user and the electronic device, for example, a pressure generated by contact or pressing between the user's ear and the mobile terminal. Accordingly, the pressure sensor may be used to determine whether contact or pressing has occurred between the user and the mobile terminal 2000, and the magnitude of the pressure. The acceleration sensor may detect the acceleration in each direction (typically three axes), and may detect the gravity and direction when stationary, and may be used for applications for recognizing the gesture of the mobile terminal 2000 (such as landscape/portrait screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer, and knocking), and so on. In addition, the mobile terminal 2000 may further be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, etc., which will not be described herein.
The audio acquisition device 210 is used for acquiring audio signals. Optionally, the audio capturing device 210 includes a plurality of audio capturing devices. The audio acquisition device may be a microphone. For example, in one approach, the audio acquisition device 210 may include two microphones, in which one microphone may correspond to one analog-to-digital converter and the other microphone may correspond to two analog-to-digital converters of different analog gains. In another approach, the audio collection device 210 may include three microphones. In this manner, two of the microphones (e.g., the primary microphone and the secondary microphone) may each correspond to one analog-to-digital converter, and the other microphone (e.g., the camera microphone) may correspond to two analog-to-digital converters of different analog gains. As one way, the network module of the mobile terminal 2000 is a radio frequency module, which is used to receive and transmit electromagnetic waves, and implement mutual conversion between the electromagnetic waves and the electrical signals, so as to communicate with a communication network or other devices. The radio frequency module may include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identity Module (SIM) card, memory, and the like. For example, the radio frequency module can perform information interaction with external equipment through the transmitted or received electromagnetic waves, and further receive audio signals transmitted by the external equipment. Furthermore, the mobile terminal 2000 may further include an image capturing device for capturing images. For example, video, still pictures or moving pictures can be taken by the image capturing device.
Referring to fig. 17, a block diagram of a computer readable storage medium according to an embodiment of the present application is shown. The computer readable medium 3000 has stored therein a program code which can be called by a processor to perform the method described in the above method embodiments.
The computer-readable storage medium 3000 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Optionally, computer readable storage medium 3000 comprises non-volatile computer readable medium (non-transitory computer-readable storage medium). The computer readable storage medium 3000 has storage space for program code 3010 to perform any of the method steps described above. The program code can be read from or written to one or more computer program products. Program code 3010 may be compressed, for example, in a suitable form.
According to the device state processing method, the device and the mobile terminal, after the mobile terminal receives the device state of the first electronic device sent by the first electronic device, the device state of the first electronic device can be transferred to the second electronic device in response to the state transfer instruction. Therefore, the mobile terminal can be used as an intermediate device, so that the device state of the first electronic device can be transferred to the second electronic device through the mobile terminal, and the device state can still be transferred under the condition that communication (such as no longer the same network) between the first electronic device and the second electronic device is impossible, so that the second electronic device can operate according to the device state of the first electronic device, the cooperation flexibility between the electronic devices is improved, and the circulation of the device states between the electronic devices is more convenient.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the application has been described in detail with reference to the foregoing embodiments, it will be appreciated by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not drive the essence of the corresponding technical solutions to depart from the spirit and scope of the technical solutions of the embodiments of the present application.