Equipment management method
By acquiring and utilizing the stored connection information, the first electronic device can quickly call the second electronic device to provide services, solving the problem of cumbersome operation when multiple electronic devices work together, and achieving simplification and efficiency improvement of device connection.
Patent Information
- Application Number
- CN202510099531.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-20
- Publication Date
- 2025-05-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In application scenarios where multiple electronic devices need to work together, users need to operate on multiple devices to establish connection relationships and open applications, resulting in cumbersome operations and difficult to quickly establish connections.
The stored connection information is obtained through the first electronic device, including the device identification of the second electronic device and the service identification of the first service, and the second electronic device is called to provide the first service, so as to quickly establish a connection relationship between multiple electronic devices.
This simplifies the complexity of users operating on multiple electronic devices and improves the efficiency of device connections, so that users can work together without operating on multiple devices separately.
Smart Images

Figure CN119996448A_ABST
Abstract
Description
[0001] This application is a divisional application. The application number of the original application is 202110552602.8, and the original application date is May 20, 2021. The entire contents of the original application are incorporated into this application by reference. Technical Field
[0002] The present application relates to the field of terminal technology, and in particular to a device management method. Background Art
[0003] With the development of the Internet of Things, in some application scenarios, users may need to use multiple electronic devices to work together at the same time. For example, in an application scenario where a course is studied through a learning application, the user can use a large screen to play the course video, and use a tablet to take notes and complete after-class exercises.
[0004] At present, applications on electronic devices are generally opened in response to user operations on the icons of the applications. For the above application scenarios that require multiple electronic devices to work together, the user needs to operate on the multiple electronic devices separately each time to establish a connection relationship between the multiple electronic devices and open multiple applications on the multiple electronic devices for working together to realize an application scenario. The above process is cumbersome for the user to operate, and it is difficult to quickly establish a connection relationship between multiple electronic devices. Summary of the invention
[0005] An embodiment of the present application provides a device management method. In which a first electronic device can obtain stored connection information. The connection information may include a device identifier of a second electronic device and a service identifier of a first service. According to the connection information, the first electronic device calls the second electronic device to provide the first service. The method can quickly establish a connection relationship between multiple electronic devices.
[0006] In a first aspect, an embodiment of the present application provides a device management method. The method can be applied to a communication system. The communication system may include a first electronic device and a second electronic device. The first electronic device is installed with a first application. The second electronic device is installed with an application for providing a first service. In the method, the first electronic device may obtain first snapshot information of a first session. The first session is a communication conducted by the first electronic device through the first application calling one or more electronic devices to provide one or more services. The first snapshot information may include first connection information. The first connection information includes a device identifier of the second electronic device and an identifier of the first service. The first electronic device may send a first instruction to the second electronic device according to the first connection information. The first instruction can be used to instruct the second electronic device to provide the first service. The second electronic device receives the first instruction and provides the first service.
[0007] In conjunction with the first aspect, in some embodiments, the first electronic device may receive a second instruction, and the second instruction may be used to instruct the first electronic device to call the second electronic device to provide the first service through the first application. The first electronic device may create a first session and store the first snapshot information. The first electronic device may send the first instruction to the second electronic device according to the second instruction.
[0008] It can be seen from the above embodiments that when the first electronic device calls the second electronic device to provide the first service through the first application for the first time, the first connection information between the first electronic device and the second electronic device can be stored. When the first electronic device calls other electronic devices to provide the first service through the first application again, the first electronic device can call the second electronic device to provide the first service according to the above first connection information. The above method can quickly establish a connection relationship between multiple electronic devices. The user does not need to perform operations on multiple electronic devices separately, which simplifies the user operation when multiple electronic devices establish connections.
[0009] The first application and the application for providing the first service may be program entities that provide various services in a distributed application, or system, Traditional applications in systems such as systems.
[0010] The identifier of the first service may be used to indicate the specific content of the first service. For example, the first service may be a course video playback service. The identifier of the first service may be data indicating the course video playback service. According to the identifier of the first service, the first electronic device may call other electronic devices to provide the first service.
[0011] When the first electronic device creates the above-mentioned first session, a storage sandbox may be allocated to the first session. Each session may be allocated a storage sandbox. The location of a storage sandbox may be determined by the device account of the electronic device (such as a Huawei account), the application identifier called by the electronic device in the session, and the session identifier of the session corresponding to the storage sandbox. The storage sandbox of each session is isolated. The electronic device may obtain snapshot information of a session based on the location of the storage sandbox of the session.
[0012] The second instruction received by the first electronic device may come from a user operation in the first application. Exemplarily, the first electronic device runs the first application and displays the user interface of the first application. The first electronic device receives a user operation in the user interface of the first application for calling other electronic devices to provide the first service. The first electronic device may search for one or more electronic devices that can provide the first service. The one or more electronic devices that can provide the first service include a second electronic device. In response to the user operation of selecting the second electronic device, the first electronic device may receive the second instruction and send the first instruction to the second electronic device according to the second instruction. Among them, the first electronic device may store the first connection relationship with the second electronic device. When the first electronic device calls other electronic devices to provide the first service again, the first electronic device may call the second electronic device to provide the first service according to the first connection relationship.
[0013] In combination with the first aspect, in some embodiments, the first session has a first session identifier. The session identifier of the first session can be determined by the device account of the first electronic device and the application identifier of the first application. The first electronic device can obtain the first snapshot information according to the first session identifier. In addition, when the first electronic device calls the second electronic device to provide the first service through the first application, the first electronic device can pass the first session identifier to the second electronic device. The first session identifier can be included in the first instruction.
[0014] In combination with the first aspect, in some embodiments, the first electronic device may indicate to the second electronic device an application that provides the first service. Specifically, the second electronic device is installed with the second application. The second application can be used to provide the first service. The above-mentioned first connection information may also include an application identifier of the second application. The first electronic device sends a first instruction to the second electronic device according to the first connection information. The first instruction can be used to instruct the second electronic device to run the second application to provide the first service.
[0015] The second application may be a program entity in a distributed application that provides the first service. For example, the second application and the first application are program entities in the same distributed application that provide different services. The application identifier of the second application may include the application package name of the distributed application to which the second application belongs and the service package name of the program entity of the first service. Alternatively, the second application may be the aforementioned traditional application. The application identifier of the second application may be the application package name of the second application.
[0016] In combination with the first aspect, in some embodiments, the first electronic device may not instruct the second electronic device to provide an application for the first service. The second electronic device may contain multiple applications that can provide the first service. The second electronic device may select an application from the multiple applications that can provide the first service to provide the first service. Specifically, the second electronic device is installed with a second application and a third application. Both the second application and the third application can be used to provide the first service. When receiving the first instruction from the first electronic device, the second electronic device can determine whether the second application is available. If it is determined that the second application is available, the second electronic device can run the second application to provide the first service. If it is determined that the second application is not available, the second electronic device can determine whether the third application is available. If it is determined that the third application is available, the second electronic device can run the third application to provide the first service.
[0017] The situations where an application is unavailable may include: the application is deleted in the electronic device, the electronic device cannot find the application, and the electronic device cannot install the application again.
[0018] If there is an application that belongs to the same distributed application as the first application among the multiple applications that can provide the first service in the second electronic device, the second electronic device can preferentially select the application that belongs to the same distributed application as the first application to provide the first service.
[0019] In conjunction with the first aspect, in some embodiments, the second electronic device may send first activity information of an application providing a first service to the first electronic device. The first activity information may include data indicating that a user interface of the application presents content at a first moment in the process of providing the first service. The first moment is any moment in the process of providing the first service. The first electronic device may store the first activity information in a storage sandbox of the first session. The first activity information is included in the first snapshot information.
[0020] During the process of the second electronic device providing the first service, the second electronic device may periodically send the activity information of the application providing the first service at preset time intervals. Optionally, the second electronic device may send the activity information of the application providing the first service to the first electronic device when the provision of the first service is finished. The activity information may be, for example, the video identification of the video being played, the progress of the play, data input by the user received in the user interface, and the like. Among them, when the first electronic device stores the activity information of the application providing the first service in the second electronic device, it may use the activity information received the most recently to update the activity information received the most recently. That is, the first electronic device may only save the activity information received the most recently.
[0021] In combination with the first aspect, in some embodiments, when the first electronic device again calls other electronic devices through the first application to provide the first service, the first snapshot information can be obtained from the storage sandbox of the first session. The first snapshot information may include the above-mentioned first activity information. The first electronic device can send the above-mentioned first activity information to the second electronic device. The second electronic device can determine the presentation content of the user interface of the application at the initial moment of running the application for providing the first service based on the first activity information. For example, the above-mentioned first service is a course video playback service. The above-mentioned first activity information includes the video identifier (or course identifier) and playback progress of the course video played by the application providing the first service at the first moment. When the second electronic device starts running the application providing the first service, it can adjust the video and progress to be played in the user interface to the video and playback progress indicated in the first activity information.
[0022] As can be seen from the above embodiments, the first electronic device can not only quickly establish a connection with the second electronic device according to the first connection information in the first snapshot information and call the second electronic device to provide the first service, but also enable the second electronic device to restore the state of the application providing the first service to the state at the first moment according to the first activity information in the first snapshot information. In this way, the user's operation traces on the application providing the first service before the first moment can be saved, and the user's experience can be improved.
[0023] In combination with the first aspect, in some embodiments, when the first electronic device first calls other electronic devices through an application to provide a service, the first electronic device can find out whether it calls other electronic devices through other applications to provide services of the same type as the above-mentioned service. If found, the first electronic device can recommend the connection relationship corresponding to the service of the same type as the above-mentioned service provided by calling other electronic devices through other applications. Specifically, the first electronic device is also installed with a fourth application. The first electronic device can receive a third instruction. The third instruction is used to instruct the first electronic device to call the electronic device through the fourth application to provide the first service. The first electronic device can find the connection information containing the identifier of the first service from the snapshot information of one or more sessions, and obtain the first connection information. The above-mentioned one or more sessions are created by the first electronic device. The first electronic device can send a fourth instruction to the second electronic device according to the first connection information, create a second session, and store the second snapshot information of the second session. The fourth instruction can be used to instruct the second electronic device to provide the first service. The second session is the communication performed by the first electronic device to call one or more electronic devices through the fourth application to provide one or more services. The second snapshot information may include the second connection information. The second connection information may include the device identifier of the second electronic device and the identifier of the first service. The second electronic device receives the fourth instruction and provides the first service.
[0024] Among them, the storage sandboxes of each session in the first electronic device are isolated. For example, the storage sandbox of the above-mentioned first session can only be accessed by the first application in the first electronic device, but cannot be accessed by the fourth application in the first electronic device. The first electronic device can store the connection information in the snapshot information of each session in the collaborative record storage module. The collaborative record storage module can be accessed by one or more applications in the first electronic device. The first electronic device can obtain the first connection information from the storage sandbox of the first session, and store the first connection information in the collaborative record storage module. When the first electronic device calls other electronic devices through the first application to provide a first service, the first connection information containing the identifier of the first service can be found from the collaborative record storage module. Furthermore, based on the first connection information, the first electronic device can call the second electronic device through the fourth application to provide the first service.
[0025] The first electronic device is not limited to searching for connection information containing the identifier of the first service, and can also search for connection information corresponding to services of the same type as the first service. The type of service can provide the type of action that the electronic device needs to perform for this service. The type of service can be determined by the identifier of the service. For example, the identifier of the service is data indicating a course video playback service. That is, this service is a course video playback service. Then the type of this service can be a video playback class. The first electronic device can search for connection information corresponding to all services of the video playback class from the collaborative record storage module.
[0026] The above embodiments can be conveniently used to call the electronic devices that one is accustomed to to work in coordination, thereby improving the user's usage experience.
[0027] In combination with the first aspect, in some embodiments, after the first electronic device obtains the first snapshot information of the first session, it can first determine whether the second electronic device is available. If it is determined that the second electronic device is not available, the first electronic device can select a third electronic device from the searched multiple electronic devices and call the third electronic device to provide the first service. The third electronic device is an electronic device that is available and can provide the first service among the multiple searched electronic devices.
[0028] The first electronic device may determine whether the second electronic device is available by sending an inquiry message to the second electronic device. If the first electronic device receives a response message from the second electronic device to the inquiry message, and the response message indicates that the second electronic device is available, the first electronic device may determine that the second electronic device is available. Otherwise, the first electronic device determines that the second electronic device is not available.
[0029] When the first electronic device calls other electronic devices to provide the first service through the first application, in addition to obtaining the first snapshot information of the first session, it can also search for electronic devices that can provide the first service. Among them, the first electronic device can search for electronic devices that are in the same local area network (for example, the same home Wi-Fi) as itself. That is, the multiple electronic devices searched above are in the same local area network as the first electronic device.
[0030] In a possible implementation, the first electronic device can specifically select a third electronic device from the searched multiple electronic devices according to the first rule. Among them, the third electronic device is an electronic device that is available, can provide the first service and has the highest priority among the multiple electronic devices. The first rule includes: the priority of electronic devices with the same device account and the same device type as the first electronic device > the priority of electronic devices with the same device account and different device type as the first electronic device > the priority of electronic devices with different device accounts but the same device type as the first electronic device > the priority of electronic devices with different device accounts and different device types as the first electronic device.
[0031] Optionally, there are multiple electronic devices with the same device account and different device types as the first electronic device, or there are multiple electronic devices with different device accounts and different device types from the first electronic device. Then, the first rule may also include: among multiple electronic devices with different device types, the priority of the electronic device is determined by the privacy of the electronic device, and the lower the privacy of the electronic device, the higher the priority of the electronic device. The privacy of electronic devices includes: TV = speaker < tablet < watch = mobile phone.
[0032] The first electronic device calling the electronic device with high privacy to provide the first service may require the user to confirm on the electronic device with high privacy. The electronic device with lower privacy is ranked higher. The first electronic device giving priority to the electronic device with lower privacy can simplify the user operation during the connection process and improve the efficiency of device connection.
[0033] In combination with the first aspect, in some embodiments, after the first electronic device obtains the first snapshot information of the first session, it can also display the second electronic device option in the user interface according to the first connection information. The first electronic device can detect a first user operation acting on the second electronic device option. The first user operation is used to trigger the first electronic device to send a first instruction to the second electronic device. In response to the first user operation, the first electronic device can send the first instruction to the second electronic device.
[0034] The second electronic device option may be displayed in the user interface in different display states. Specifically, the first electronic device may determine whether the second electronic device is available. If it is determined that the second electronic device is available, the first electronic device may display the second electronic device option in a first state. The first state is used to indicate that the second electronic device is available. If it is determined that the second electronic device is not available, the first electronic device may display the second electronic device option in a second state. The second state is used to indicate that the second electronic device is not available.
[0035] In conjunction with the first aspect, in some embodiments, a communication system corresponding to a session may include a multi-stage connection. The electronic device that creates this session may store the connection information between each node in the multi-stage connection, and store the connection information in the storage sandbox of this session. Based on the connection information, the electronic device that creates this session may restore the multi-stage connection.
[0036] Specifically, the communication system may further include a fourth electronic device. The fourth electronic device is installed with an application for providing the second service. The first snapshot information includes the third connection information. The third connection information includes the source device information and the destination device information. The source device information in the third connection information includes the device identification of the second electronic device and the identification of the first service. The destination device information in the third connection information includes the device identification of the fourth electronic device and the identification of the second service. After the first electronic device obtains the first snapshot information of the first session, the first electronic device may send the third connection information to the second electronic device. The second electronic device may send a fifth instruction to the fourth electronic device using the application providing the first service based on the third connection information. The fifth instruction is used to instruct the fourth electronic device to provide the second service. The fourth electronic device receives the fifth instruction and provides the second service.
[0037] The source device may be an electronic device that calls other electronic devices to provide services, and the destination device may be an electronic device that receives a call instruction to provide services.
[0038] In combination with the first aspect, in some embodiments, the second electronic device receives a sixth instruction. The sixth instruction is used to instruct the second electronic device to call the fourth electronic device to provide the second service through the application running by providing the first service. The second electronic device sends the fifth instruction to the fourth electronic device according to the sixth instruction.
[0039] If the second electronic device determines that the way it opens the application that provides the first service is active opening, the second electronic device creates a third session and stores the third snapshot information of the third session. Active opening means that the electronic device receives a user operation acting on an application to open this application, and opens this application. The third session is the communication conducted by the second electronic device through the application that provides the first service calling one or more electronic devices to provide one or more services, and the third snapshot information includes the third connection information. Among them, the second electronic device can allocate a storage sandbox for the above-mentioned third session to store the above-mentioned third snapshot information.
[0040] If the second electronic device determines that the way it starts the application that provides the first service is passive start, the second electronic device sends the third connection information to the first electronic device. The first electronic device stores the third connection information in the storage sandbox of the first session. Passive start means that the electronic device receives a call instruction from another electronic device to provide a service, and starts the application for providing this service.
[0041] It can be seen from the above embodiments that the first electronic device can call the second electronic device to provide the first service through the first application. On the basis that the second electronic device is called by the first electronic device to provide the first service, the second electronic device calls the fourth electronic device to provide the fourth service through the application that provides the first service. Among them, the first electronic device can pass the first session identifier of the first session to the second electronic device. The second electronic device passes the session identifier of the first session to the fourth electronic device. The second electronic device can send its connection information with the fourth electronic device to the first electronic device. The first electronic device can restore its connection relationship with the second electronic device and the connection relationship between the second electronic device and the fourth electronic device with the connection information stored by itself. The above method can quickly establish a connection relationship between multiple electronic devices. The user does not need to operate on multiple electronic devices separately, which not only simplifies the user operation when multiple electronic devices establish connections, but also facilitates the user to call the electronic device they are accustomed to, enter the familiar application scenario more quickly, and improve the user experience.
[0042] In the above embodiment, the fifth instruction sent by the second electronic device to the fourth electronic device may include an application identifier of an application (such as the fifth application) providing the second service. Then, the fourth electronic device runs the fifth application to provide the second service according to the fifth instruction.
[0043] In combination with the first aspect, in some embodiments, the first snapshot information further includes fourth connection information, the fourth connection information includes source device information and destination device information, the source device information in the fourth connection information includes the device identifier of the second electronic device and the identifier of the first service, and the destination device information in the fourth connection information includes the device identifier of the first electronic device and the application identifier of the first application. After the first electronic device obtains the first snapshot information of the first session, the first electronic device may send the fourth connection information to the second electronic device. The second electronic device sends a seventh instruction to the first electronic device using the application providing the first service according to the fourth connection information, and the seventh instruction is used to instruct the first electronic device to call the first application. The first electronic device compares its first level identifier with the second level identifier of the second electronic device, determines that the first level identifier is lower than the second level identifier, and the first electronic device refuses to respond to the seventh instruction. An electronic device in a session has a level identifier, and the level identifier of an electronic device is determined by the connection distance between the electronic device and the electronic device that creates a session. The longer the connection distance between the electronic device and the electronic device that creates a session, the higher the level identifier of the electronic device.
[0044] It can be seen from the above embodiment that the first electronic device calls the second electronic device to provide the second service through the first application, and the second electronic device calls the first electronic device to run the first application through the application that provides the second service. The above problem of circular calling may cause the connection information between the two electronic devices to be cyclically transmitted between the two devices, wasting the computing resources and storage resources of the two electronic devices. The above embodiment can avoid the problem of circular calling between electronic devices in a session, and save the computing resources and storage resources of the electronic devices.
[0045] In a second aspect, the present application provides a device management method. Among them, a second electronic device can receive a first instruction from a first electronic device. The second electronic device is installed with an application for providing a first service. The first instruction is used to instruct the second electronic device to provide the first service. The first instruction is sent by the first electronic device according to the first connection information. The first connection information includes the device identification of the second electronic device and the service identification of the first service. The first connection information is included in the first snapshot information of the first session. The first electronic device is installed with a first application. The first session is a communication conducted by the first electronic device through the first application to call one or more electronic devices to provide one or more services. According to the first instruction, the second electronic device can provide the first service.
[0046] In conjunction with the second aspect, in some embodiments, a second application is installed in the second electronic device. The second application is used to provide the first service. The first connection information also includes an application identifier of the second application. The first instruction can be used to instruct the second electronic device to run the second application to provide the first service. When receiving the second instruction, the second electronic device can run the second application to provide the first service.
[0047] In conjunction with the second aspect, in some embodiments, the second electronic device is installed with a second application and a third application. Both the second application and the third application are used to provide the first service. After receiving the first instruction, the second electronic device can determine whether the second application is available. If it is determined that the second application is available, the second electronic device runs the second application to provide the first service. If it is determined that the second application is not available, the second electronic device determines whether the third application is available. If it is determined that the third application is available, the second electronic device runs the third application to provide the first service.
[0048] In conjunction with the second aspect, in some embodiments, after the second electronic device provides the first service, the first activity information of the application (such as the second application or the third application) providing the first service can be sent to the first electronic device. The first activity information includes data indicating the user interface of the application providing the first service presenting content at the first moment during the process of providing the first service. The first moment is any moment during the process of providing the first service.
[0049] In conjunction with the second aspect, in some embodiments, in addition to the first instruction, the second electronic device may also receive first activity information sent by the first electronic device. Based on the first activity information, the second electronic device may determine the presentation content of the user interface of the application for providing the first service at the initial moment of running the application.
[0050] In combination with the second aspect, in some embodiments, in addition to the above-mentioned first instruction, the second electronic device may also receive third connection information sent by the first electronic device. The third connection information includes source device information and destination device information. The source device information in the third connection information includes the device identification of the second electronic device and the identification of the first service. The destination device information in the third connection information includes the device identification of the fourth electronic device and the identification of the second service. The fourth electronic device is installed with an application for providing the second service. According to the third connection information, the second electronic device can use the application providing the first service to send a fifth instruction to the fourth electronic device. The fifth instruction is used to instruct the third electronic device to provide the second service.
[0051] In conjunction with the second aspect, in some embodiments, the second electronic device receives a sixth instruction, and the sixth instruction is used to instruct the second electronic device to call the fourth electronic device to provide the second service through the application running by providing the first service. The second electronic device sends a fifth instruction to the fourth electronic device according to the sixth instruction. If the second electronic device determines that the way to open the application providing the first service is active, the second electronic device creates a third session and stores the third snapshot information of the third session; active opening means that the electronic device receives a user operation acting on an application to open this application, and opens this application. The third session is the communication conducted by the second electronic device calling one or more electronic devices to provide one or more services through the application providing the first service, and the third snapshot information includes the third connection information. If the second electronic device determines that the way to open the application providing the first service is passive opening, the second electronic device sends the third connection information to the first electronic device. Passive opening means that the electronic device receives a call instruction from other electronic devices to provide a service, and opens the application for providing this service.
[0052] The above embodiment can quickly establish a connection relationship between multiple electronic devices. Users do not need to operate on multiple electronic devices separately, which not only simplifies the user operation when multiple electronic devices are connected, but also makes it convenient for users to call their favorite electronic devices, enter familiar application scenarios more quickly, and improve user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 It is a structural diagram of a distributed application provided in an embodiment of the present application;
[0054] Figure 2A to Figure 2I It is a schematic diagram of a scenario in which some electronic devices establish connection relationships provided in an embodiment of the present application;
[0055] Figure 3A to Figure 3F It is a schematic diagram of a scenario in which other electronic devices establish connection relationships provided by an embodiment of the present application;
[0056] Figure 4A to Figure 4D It is a schematic diagram of a scenario in which other electronic devices establish connection relationships provided by an embodiment of the present application;
[0057] Figure 5A to Figure 5D It is a schematic diagram of a scenario in which other electronic devices establish connection relationships provided by an embodiment of the present application;
[0058] Figure 6 to Figure 10 It is a schematic diagram of the structure of some communication systems provided in the embodiments of the present application;
[0059] Fig.11 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0060] The technical solutions in the embodiments of the present application will be described clearly and in detail below in conjunction with the accompanying 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 is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0061] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.
[0062] The present application provides a method for establishing a device connection relationship based on an application. In this method, after the electronic device 100 establishes a communication connection with other electronic devices through application A for the first time and requests the above-mentioned other electronic devices to work together to realize application scenario A, the connection information between the electronic device 100 and the above-mentioned other electronic devices can be stored. The above-mentioned connection information may include the device identification of the electronic device 100 during the above-mentioned collaborative work process, the device identification of the electronic device connected to the electronic device 100, and the application identification of the electronic device connected to the electronic device 100 during the collaborative work process. When the electronic device 100 requests the electronic device to work together to realize the above-mentioned application scenario A again through application A, the electronic device 100 can establish a communication connection with the historical collaborative device according to the above-mentioned connection information stored by itself, and instruct the historical collaborative device to call the application that was called when the application scenario A was realized. The above-mentioned historical collaborative device is the electronic device that has established a communication connection with the electronic device 100 and worked together to realize the application scenario A. It can be seen that the above-mentioned method can quickly establish a connection relationship between multiple electronic devices. The user only needs to operate on the electronic device 100, instead of operating on multiple electronic devices separately, to establish the connection relationship between these multiple electronic devices. This simplifies the user operation when multiple electronic devices establish a connection.
[0063] The communication connection established between the electronic device 100 and other electronic devices may be, for example, a short-distance communication connection such as a wireless fidelity (Wi-Fi) network communication connection. The embodiment of the present application does not limit the specific manner of the communication connection.
[0064] The collaborative work of multiple electronic devices can mean that a communication connection is established between the multiple electronic devices, and the multiple electronic devices communicate, exchange data and instructions, and perform different functions respectively. The scene composed of the above-mentioned multiple electronic devices performing different functions respectively can be an application scenario realized by the collaborative work of these multiple electronic devices. Exemplarily, a learning application is installed in the mobile phone. The learning application can be used to provide answers to course exercises. An application for playing course videos is installed in the TV. An application for taking notes and answering questions is installed in the tablet. The mobile phone can establish a communication connection with the TV and the tablet through the learning application. The mobile phone can instruct the TV to call the application for playing course videos. The mobile phone can instruct the tablet to call the application for taking notes and answering questions. Then, students can watch course videos on TV, take notes and complete course exercises through the tablet. Parents can check the completion results of students' course exercises through the learning application in the mobile phone. It can be seen that the above-mentioned mobile phones, TVs, and tablets can work together to realize the application scenarios of students watching course videos, taking notes, completing after-school exercises, and parents checking the after-school exercises completed by students.
[0065] It should be noted that in the above-mentioned device connection relationship establishment method, the electronic device 100 can be a master device. The master device can be used to store the connection information between the master device and other electronic devices during the collaborative work process. In addition, the master device can be used to establish a connection relationship between multiple electronic devices according to the connection information stored by itself. The specific implementation method of the master device establishing the connection relationship between multiple electronic devices will be specifically introduced in the subsequent embodiments, and will not be described here.
[0066] In some embodiments, when the electronic device 100 and other electronic devices realize the collaborative work of the above application scenario A, the application A called by the electronic device 100 and the applications called by other electronic devices may belong to the same distributed application. Alternatively, these applications may not belong to the same distributed application.
[0067] The embodiments of the present application relate to distributed applications. To facilitate understanding of the method provided by the present application, the following first introduces the relevant concepts.
[0068] 1. Distributed applications and services
[0069] A distributed application can provide multiple services. A service can also be called an ability. The program installation package of a distributed application can include program installation packages for these multiple services. The program installation packages for these multiple services can be installed in multiple different electronic devices respectively. Among them, an electronic device can install the program installation package of one or several services among these multiple services. The program entity in the program installation package of this one or several services can be called an application in this electronic device. In other words, a distributed application can support installation in units of services. Multiple services in a distributed application can be distributed in multiple different electronic devices. These multiple different electronic devices can work together and call each service in this distributed application to jointly complete a task and realize an application scenario.
[0070] The following uses the course distributed application as an example to introduce the relationship between the above distributed applications and services.
[0071] like Figure 1 As shown, the course learning distributed application can provide the following multiple services: exercise answer provision service, course video playback service, note-taking and question answering service. Among them, the mobile phone may include a program installation package for providing exercise answer service. The TV may include a program installation package for course video playback service. The tablet may include a program installation package for note-taking and question answering service. In a possible application scenario, the mobile phone may be a parent's mobile phone. In response to the user operation of the parent, the mobile phone can instruct the TV to call the course video playback service to play the course video. In addition, the mobile phone can also instruct the tablet to call the note-taking and question answering service to display a user interface for taking notes and answering questions. Among them, students can watch the course video played on the TV, and take notes and complete course exercises on the tablet 200. In addition, the tablet 200 can send the completed course exercises to the mobile phone. The mobile phone can call the exercise answer provision service to check the completion results of the above course exercises.
[0072] Depend on Figure 1 It can be seen that mobile phones, TVs and tablets can work together to call various services in the course learning distributed application to realize application scenarios such as students watching course videos, taking notes, completing homework, and parents checking the homework completed by students.
[0073] A program installation package of a distributed application may have an application package name. Each service program installation package may have a service package name. In a possible implementation, when an electronic device downloads a program installation package of a service in a distributed application, the storage path of the program installation package of the service may be: ... / <application package name> / <service package name> / ... For example, Figure 1The application package name of the course learning distributed application shown can be com.example.study. The service package name of the note-taking and answering service can be StudyNotepadServiceAbility. The storage path of the program installation package of the note-taking and answering service in the tablet can be: ... / <com.example.study> / <studynotepadserviceability> / …. Among them, the storage paths of multiple services under the course distributed application can be:… / <com.example.study> / … The present application embodiment does not limit the specific names of the above application package names and service package names.
[0074] Figure 1 This is only a distributed application and its corresponding service provided as an example for this application and should not constitute a limitation on this application.
[0075] In some embodiments, an electronic device with a program installation package for a service installed may include an icon corresponding to the service. In response to a user operation on the icon, the electronic device may call the service. That is, the above icon may be equivalent to an entry to call the service corresponding to the icon. The user may touch an icon corresponding to a service to trigger the electronic device to call the service. Not limited to the form of the above icon, the electronic device may also provide the user with an entry to call the service in other forms.
[0076] Optionally, an electronic device with a program installation package for a service installed may call the service in response to an instruction from an electronic device working in cooperation with the electronic device. That is, an electronic device with a program installation package for a service installed may not have an entry for a user to directly call the service. Figure 1 In the course learning distributed application shown in the figure, the TV includes a program installation package for the course video playback service. However, there is no entry in the TV for the user to directly call the course video playback service. In response to relevant user operations, the mobile phone can instruct the TV to call the course video playback service (i.e., the TV runs the program corresponding to the course video playback service).
[0077] The application in the subsequent embodiments of the present application may refer to a program entity that provides various services in a distributed application, or may also refer to a traditional application, such as system, The camera application, gallery application, video application, etc. in the system. For example, Figure 1 In the course learning distributed application shown, the mobile phone is installed with an exercise answer providing application. The exercise answer providing application can provide exercise answer services. The TV is installed with a course video playback application. The course video playback application can provide course video playback services. The tablet is installed with a note-taking and question-answering application. The note-taking and question-answering application can provide note-taking and question-answering services. When an electronic device calls an application, it is to call the service that this application can provide. For example, an electronic device calling a course video playback application can represent that the electronic device calls the course video playback service. The above-mentioned exercise answer providing application, the above-mentioned course video playback application, and the above-mentioned note-taking and question-answering application all belong to the same distributed application (course learning distributed application) and can have the same application package name (such as com.example.study). A traditional application can also provide multiple services. Compared with distributed applications, a program installation package that provides multiple services in a traditional application can be installed as a whole on an electronic device. That is to say, the above-mentioned traditional application does not support installation in units of services. The multiple services that can be provided by the above-mentioned traditional application do not have the ability to be distributed on different electronic devices. A traditional application can have an application package name corresponding to it.
[0078] The subsequent embodiments of the present application specifically use distributed applications as examples to introduce the method for establishing a device connection relationship provided in the embodiments of the present application.
[0079] 2. Conversation
[0080] In some embodiments, there may be a master device among multiple electronic devices that work together to implement an application scenario. The master device can be used to establish a connection relationship between the multiple electronic devices when working together. The electronic devices that work together with the master device are all slave devices. For example, Figure 1 In the scenario shown, a mobile phone, a TV, and a tablet work together. The mobile phone can be the main device. The TV and the tablet can both be sub-devices. The mobile phone can establish a communication connection with the TV and instruct the TV to call the course video playback service. The mobile phone can establish a communication connection with the tablet and instruct the tablet to call the note-taking and question-answering service.
[0081] A session may represent a connection between the above-mentioned main device and sub-device, and the exchange of data during the collaborative work process. A session may have a session identifier. The session identifier of a session may be determined by the device account of the main device (such as a Huawei account) and the application identifier of the application running on the main device requesting the sub-device to work collaboratively. The above-mentioned device account can uniquely identify the user logged in on the main device. In one possible implementation, the main device runs the program corresponding to application A to request the sub-device to work collaboratively. The above-mentioned application identifier may be the application package name of the above-mentioned application A. In another possible implementation, the main device runs the program corresponding to service A under application A to request the sub-device to work collaboratively. The above-mentioned application identifier is still the application package name of application A. For example, the application running on a mobile phone requesting the sub-device (such as a TV, a tablet) to work collaboratively is a course learning distributed application. The application identifier may be the application package name of the course learning distributed application (such as com.example.study). The embodiment of the present application does not limit the specific content of the above-mentioned device account and application identifier.
[0082] In some embodiments, when the main device calls an application to request a sub-device to work collaboratively, it can search whether a corresponding session identifier is stored based on the above-mentioned device account and application identifier. If there is no corresponding session identifier, the main device can establish a session and determine the session identifier of this session based on the device account and application identifier. When the main device establishes a connection with each sub-device, the main device can pass the session identifier of this session to each sub-device. In the process of collaborative work to realize an application scenario, both the main device and the sub-device can store the same session identifier. The communication between the main device and the sub-device in collaborative work is carried out under the session indicated by the above-mentioned same session identifier.
[0083] The process of establishing a session by the master device may be a process of determining a session identifier of the session and allocating a storage sandbox for the session. The storage sandbox may be used to store data exchanged between the master device and the sub-device under the session, and connection information between the master device and the sub-device.
[0084] If there is a corresponding session identifier, the main device can pass the found session identifier to each sub-device. The data exchanged between the main device and the sub-device under the session corresponding to the session identifier can be stored in the storage sandbox of the session. In some embodiments, when the corresponding session identifier is found, the main device can establish a connection with the corresponding sub-device based on the connection information between devices stored in the storage sandbox of the session. That is to say, in the case where the main device and the sub-device have established a connection to implement an application scenario, if the main device needs to request other electronic devices to work together again to implement this application scenario, the main device can quickly establish a connection with the sub-device that has been connected based on the connection information between devices stored in the storage sandbox of the session. This greatly simplifies the user operation of establishing a connection between devices.
[0085] The life cycle of a session starts when the main device first calls an application to request the sub-device to work together. When the main device first calls an application to request the sub-device to work together, the main device cannot find the session identifier corresponding to the device account and application identifier. The main device can clean up the session regularly or irregularly. If the session identifier of a session and the storage sandbox of this session are deleted, the session ends. In one possible implementation, the main device can clean up the session according to the least recently used (LRU) algorithm. The specific implementation method can refer to the implementation process of the LRU algorithm in the prior art. The embodiment of the present application does not limit the method for the main device to clean up the session.
[0086] In the case where a session has been established, if one or more electronic devices in the main device and each sub-device exit the application called in this session, this session still exists. That is, the main device can still store the session identifier of this session and the data in the storage sandbox. Figure 1 In the course learning distributed application shown, if the TV ends calling the course video playback service, the course video will no longer be played. Using the above course learning distributed application, the session established when the mobile phone works with the TV and the tablet still exists.
[0087] In some embodiments, during the process of collaborative work to complete an application scenario, the main device and the sub-device respectively call services belonging to a distributed application. The main device can pass the session identifier of the same session to each sub-device when the collaborative work is connected to the sub-device. In other embodiments, during the process of collaborative work to complete an application scenario, the services called by the main device and the sub-device do not belong to the same distributed application. The main device can still pass the session identifier of the same session to each sub-device when the collaborative work is connected to the sub-device. The session identifier of the same session can be determined by the device account and application identifier on the main device during the collaborative work. For example, Figure 1 In the course learning distributed application shown, the course video playback service in the TV is unavailable (for example, the TV has cleared the program installation package of the course video playback service and is temporarily unable to obtain the program installation package). When the mobile phone instructs the TV to play the course video, the TV can call other applications (such as the Huawei video application) to play the course video. Among them, the mobile phone can pass the session identifier to the TV. The session identifier can be determined by the device account logged in on the mobile phone and the application identifier of the course learning distributed application.
[0088] 3. Snapshot information
[0089] Snapshot information is a copy of specified data. Snapshot information can be used for data backup and recovery. Snapshot information associated with a session may include connection information between electronic devices under this session. The above connection information may include the device identification of the source device, the device identification of the destination device, the application identification of the called application on the destination device, and the service identification of the service in the called application on the destination device (optional). The above source device is an electronic device that instructs other electronic devices to call related applications. The above destination device is an electronic device that receives a call instruction to call related applications. For example, in a scenario where a mobile phone instructs a TV to call a course video playback application, the mobile phone is the source device and the TV is the destination device. Optionally, the above connection information may also include information such as the application identification of the application on the source device requesting other electronic devices to work together. This embodiment of the present application is not limited to this.
[0090] In some embodiments, the snapshot information associated with a session may also include activity information when each electronic device calls the corresponding application under this session. Exemplarily, in a scenario where a mobile phone instructs a TV to call a course video playback application, the activity information may include the course identifier and playback progress of the course video played by the TV. The TV may send the activity information to the mobile phone. The mobile phone may store the activity information in the storage sandbox of the session associated with it. In a scenario where a mobile phone instructs a tablet to call a note-taking and question-answering application, the activity information may include recorded note data and question-answering data, etc. The tablet may send the activity information to the mobile phone. The mobile phone may store the activity information in the storage sandbox of the session associated with it.
[0091] The snapshot information associated with a session may be stored in the master device that establishes the session, that is, the snapshot information associated with the session may be stored in the storage sandbox allocated for the session in the master device.
[0092] The master device may periodically record snapshot information associated with a session. For example, the master device may obtain snapshot information associated with a session once every 1 minute, and use the snapshot information currently obtained to update the snapshot information most recently obtained in the storage sandbox. Optionally, the master device may record snapshot information associated with a session in response to user operations. For example, in a scenario where a mobile phone instructs a TV to call a course video playback application, in response to a user operation acting on the TV to exit the course video playback, the TV may send the course identification and playback progress of the course video played when exiting the course video playback to the master device. The master device may store the course identification and playback progress of the above-mentioned course video playback in the storage sandbox of the corresponding session. The embodiment of the present application does not limit the user operation that triggers the master device to record snapshot information.
[0093] 4. Storage Sandbox
[0094] A storage sandbox is a storage area in the memory of an electronic device. An electronic device can allocate a storage sandbox for the above-mentioned session. The storage sandbox can be used to store snapshot information associated with a session (such as connection information between electronic devices in this session, and activity information when each electronic device calls the corresponding application in this session).
[0095] The location of a storage sandbox can be determined by the device account of the electronic device (such as a Huawei account), the application identifier called by the electronic device in the session, and the session identifier of the session. Exemplarily, the location of a storage sandbox can be: ... / data / user / <device account> / <application identifier> / <session identifier> / …. The above application identifier can be the application package name of the application. The storage sandbox of each session is isolated. The electronic device can obtain snapshot information associated with a session based on the location of the storage sandbox of the session.
[0096] exist Figure 1 In the course learning distributed application shown, the mobile phone can provide an application for the installed exercise answers to instruct the TV to call the course video playback service, and instruct the tablet to call the note-taking and answering service. The mobile phone can create a session. The session is a session based on the course learning distributed application when the mobile phone logs in to the current device account. The mobile phone can allocate a storage sandbox for the session. The location of the storage sandbox can be: ... / data / user / <device account of the mobile phone> / <application package name of the course learning distributed application> / <session identifier> / …. The mobile phone can pass the session identifier to the TV and the mobile phone. Among them, the TV can allocate a storage sandbox for the session corresponding to the session identifier. The location of the storage sandbox in the TV can be: ... / data / user / <device account of the TV> / <application package name of the course learning distributed application> / <session identifier> / …. The TV can store data such as the course identifier and playback progress of the course video to the storage sandbox of the session in the TV. The mobile phone can allocate a storage sandbox for the session corresponding to the session identifier. The location of the storage sandbox in the mobile phone can be: ... / data / user / <device account of the mobile phone> / <application package name of the course learning distributed application> / <session identifier> / …. The mobile phone can store data such as note data and answer data in the storage sandbox of the session in the mobile phone.
[0097] based on Figure 1 The course learning distributed application shown, the following introduces a scenario for establishing a device connection relationship provided by an embodiment of the present application.
[0098] Figure 2A to Figure 2I A schematic diagram of a scenario for establishing a device connection relationship is exemplified.
[0099] like Figure 2A As shown, the electronic device 100 (such as a mobile phone) can display a user interface 210. The user interface 210 displays a page with application icons. The page may include multiple application icons (for example, a clock application icon, a file management application icon, a Huawei video application icon, a learning application icon 211, etc.). A page indicator may also be displayed below the above-mentioned multiple application icons to indicate the positional relationship between the currently displayed page and other pages. There are multiple tray icons (for example, a camera application icon, a contact application icon, a dialing application icon, and an information application icon) below the page indicator. The tray icon remains displayed when the page is switched. The embodiment of the present application does not limit the content displayed on the user interface 410.
[0100] The learning application icon 211 is an application icon indicating a course learning distributed application. In some embodiments, the electronic device 100 includes a program installation package for providing a service for providing answers to exercises. Then, in response to a user operation on the learning application icon 211, the electronic device 100 may display a user interface including answers to exercises.
[0101] In some embodiments, in addition to the program installation package for providing the exercise answer service, the program installation package for the course learning distributed application in the electronic device 100 may also include a device connection program. The device connection program can be used for the electronic device 100 to establish a communication connection with other electronic devices, and instruct other electronic devices to call the services that the course learning distributed application can provide (such as course video playback service, note-taking and answering service). Optionally, the electronic device 100 may also include a program installation package for the course video playback service and a program installation package for the note-taking and answering service. That is, the electronic device 100 can call multiple services such as the exercise answer service, the course video playback service, and the note-taking and answering service.
[0102] Here, we specifically introduce the multiple services that the electronic device 100 can use, such as providing services for providing answers to exercises, playing courses videos, and taking notes and answering questions.
[0103] In response to a user operation on the learning application icon 211, the electronic device 100 may display the following Figure 2B The login interface 220 is shown.
[0104] The login interface 220 may include an account name input box 221, a password input box 222, a login control 223, and a registration control 224. Among them:
[0105] The registration control 224 can be used to register an account. A user can register a new account on the learning application through the registration control 224.
[0106] If you have registered an account, you can log in to the learning application by entering the account name and password of your registered account.
[0107] The account name input box 221 can be used to input the name of the logged-in account, such as "Zhang San".
[0108] The password input box 222 can be used to input a login password.
[0109] The login control 223 may be used to trigger the electronic device 100 to perform a login operation according to the data received in the account name input box 221 and the password input box 222 .
[0110] When the login is successful, the electronic device 100 may display Figure 2C The user interface 230 shown. The user interface 230 may include a course selection area 231, a "home" control 232, a "learning" control 233, and a "my" control 234. Among them:
[0111] The "Home" control 232, the "Learning" control 233, and the "My" control 234 may be used to indicate the content displayed in the user interface 230. For example, Figure 2C As shown, the "learning" control 233 is in a selected state, and the content displayed in the user interface 230 may be various courses included in the course selection area 231. In response to a user operation on any one of the "home" control 232, the "learning" control 233, and the "my" control 234, the electronic device 100 may switch the content displayed in the user interface 230.
[0112] The course selection area 231 may include the first course option, the second course option, the third course option, the fourth course option, etc. Optionally, each course selection may include the course progress. For example, the course progress of the first course is "0% completed". The course progress may be determined by whether the course video has been played and whether the after-class exercises have been completed.
[0113] In response to the user operation on the first lesson option, the electronic device 100 may display the following Figure 2D The user interface 240 shown. The user interface 240 may include a course video area 241, a video output device selection control 242, an after-class exercise area 243, a student learning device selection control 244, and an exercise answer area 245. Among them:
[0114] The course video area 241 may include the course video of the first lesson. When receiving a user operation for playing the course video, the electronic device 100 may call the course video playing service in the learning application to play the course video of the first lesson.
[0115] The video output device selection control 242 can be used by the electronic device 100 to instruct other electronic devices to call the course video playback service.
[0116] The homework area 243 may include homework for the first lesson. Optionally, the homework area 243 may also include a text input box for taking notes. That is, the electronic device 100 may call a note-taking and answering service for the user to take notes and complete homework.
[0117] The student learning device selection control 244 can be used by the electronic device 100 to instruct other electronic devices to call the note-taking and question-answering service.
[0118] The exercise answer area 245 may include answers to the exercises for the first lesson.
[0119] like Figure 2D As shown, in response to a user operation on the video output device selection control 242, the electronic device 100 can search for nearby electronic devices that can be used to play videos, and display the video output device selection control 242 as shown in FIG. Figure 2E User interface 250 is shown.
[0120] In a possible implementation, the electronic device 100 can search for electronic devices that are in the same local area network (such as the same home Wi-Fi) as itself and can be used to play videos. The user interface 250 may include a device selection area 251 and a search control 252. Among them, the search control 252 can be used to trigger the electronic device 100 to continue searching for electronic devices that are in the same local area network (such as the same home Wi-Fi) as itself and can be used to play videos. The above-mentioned search process can be, for example, that the electronic device 100 sends a message to each electronic device in the same home Wi-Fi as itself. The message can be used to inquire whether the electronic device has the ability to play videos. Upon receiving the message, the electronic device with video playback capability can send a response message to the electronic device 100. Then, the electronic device 100 can search for electronic devices that are in the same home Wi-Fi as itself and can be used to play videos. The embodiment of the present application does not limit the method for the electronic device 100 to search for electronic devices.
[0121] The device selection area 251 may include device options of one or more electronic devices searched by the electronic device 100. For example, Zhang San's tablet, Zhang San's TV, Li Si's tablet, and Li Si's TV. The embodiments of the present application do not limit the names of the above-mentioned device options. In response to a user operation acting on any of the above-mentioned device options, the electronic device 100 may be the electronic device corresponding to the device option, and the electronic device 100 may instruct the electronic device to call the course video playback service.
[0122] For example, in response to a user operation on the device option "Zhang San's TV", the electronic device 100 may instruct the electronic device 200 (ie, Zhang San's TV) to call a course video playback service.
[0123] In some embodiments, the electronic device 200 has installed the program installation package of the course video playback service. The electronic device 200 can call the course video playback service to display the course video playback service. Figure 2F User interface 260 is shown.
[0124] like Figure 2F As shown, a communication connection (such as a Wi-Fi communication connection) is established between the electronic device 100 and the electronic device 200. The electronic device 200 can display a user interface 260. The user interface 260 is a user interface for playing a course video (such as a course video of the first lesson). Among them, the user can instruct the electronic device 200 to play the first course video or pause the first course video by operating the play control or pause control on the remote control.
[0125] In other embodiments, the electronic device 200 has not yet installed the program installation package of the course video playback service. When receiving an instruction from the electronic device 100 for instructing the electronic device 200 to call the course video playback service, the electronic device 200 can obtain (such as from a cloud server) the program installation package of the course video playback service. When the program installation package of the course video playback service is obtained, the electronic device 200 can call the course video playback service and display the video content as shown in the figure. Figure 2F The user interface 260 is shown. The embodiment of the present application does not limit the method for the electronic device 200 to obtain the program installation package of the course video playback service.
[0126] In other embodiments, the program installation package of the course video playback service has not been installed in the electronic device 200, and the electronic device 200 cannot obtain the program installation package of the course video playback service. The electronic device 200 can call other applications that can be used to play videos (such as video player applications, Huawei video applications, etc.) to play course videos. The above-mentioned called application can be the default in the electronic device 200, or it can be selected by the user. The embodiments of the present application are not limited to this. Among them, the electronic device 200 can obtain (such as from the electronic device 100, or from the cloud server) the data of the course video that needs to be played.
[0127] When receiving the above-mentioned user operation acting on the video output device selection control 242, the electronic device 100 can search whether it has stored a session identifier based on the device account of the electronic device 100 (such as a Huawei account) and the application identifier of the learning application (such as the application package name). If there is a session corresponding to the session identifier (the session is a session based on the learning application when the current device account is logged in on the electronic device 100), the electronic device 100 can search from the snapshot information associated with the session whether there is connection information connected to the electronic device that calls the course video playback service. Optionally, the electronic device 100 can also search from the snapshot information associated with the session whether there is connection information connected to the electronic device that calls the application for playing the video.
[0128] If there is no session corresponding to the session identifier, the electronic device 100 may establish a session. The session identifier of the session is determined according to the device account of the electronic device 100 and the application identifier of the learning application. The electronic device 100 may allocate a storage sandbox for the session.
[0129] When the electronic device 100 is connected to the electronic device 200 and the electronic device 100 instructs the electronic device 200 to play the course video, the electronic device 100 can store the connection information between the electronic device 100 and the electronic device 200 in the storage sandbox of the session. Optionally, the electronic device 100 can also store the course identifier and the playback progress of the course video played by the electronic device 200 at a certain moment in the storage sandbox of the session.
[0130] The situation that there is no session corresponding to the session identifier may include: the electronic device 100 has never created a session corresponding to the session identifier. Or, the electronic device 100 has created a session corresponding to the session identifier. However, the session has been deleted. The deletion of the session may mean that the session identifier corresponding to the session and the storage sandbox of the session are deleted.
[0131] It can be seen that Figure 2D to Figure 2F The schematic diagram exemplarily shows a scenario in which the electronic device 100 establishes a session.
[0132] like Figure 2G As shown, in response to the user operation on the student learning device selection control 244, the electronic device 100 can search for nearby electronic devices that can be used to provide note-taking and answering services, and display the following information: Figure 2H User interface 270 is shown.
[0133] The electronic device 100 searches for nearby electronic devices that can provide note-taking and question-answering services, and the method for the electronic device 100 to search for electronic devices that can play videos in the aforementioned embodiment can be referred to, which will not be described in detail here.
[0134] The user interface 270 may include a learning device selection area 271. The learning device selection area 271 may include device options of electronic devices searched by one or more electronic devices 100. For example, Zhang San's tablet, Zhang San's TV, Li Si's tablet, Li Si's TV. The embodiments of the present application do not limit the names of the above-mentioned device options. In response to a user operation acting on any of the above-mentioned device options, the electronic device 100 may be the electronic device corresponding to the device option, and the electronic device 100 may instruct the electronic device to call the note-taking and question-answering service.
[0135] For example, in response to a user operation on the device option "Zhang San's tablet", the electronic device 100 may instruct the electronic device 300 (ie, Zhang San's tablet) to call the note-taking and question-answering service, and display the following information: Fig.2I User interface 280 is shown.
[0136] like Fig.2I As shown, a communication connection (such as a Wi-Fi communication connection) is established between the electronic device 100 and the electronic device 300. The electronic device 300 can display a user interface 280. The user interface 280 may include course materials, a text input box for taking notes, after-class exercises, and the like. That is, the user can take notes and complete after-class exercises on the electronic device 300.
[0137] When receiving the user operation on the student learning device selection control 244, the electronic device 100 can check whether it has stored a session identifier according to the device account of the electronic device 100 (such as a Huawei account) and the application identifier of the learning application (such as the application package name). Figure 2D to Figure 2F In the illustrated embodiment, the electronic device 100 establishes a session. The session is a session based on a learning application when the current device account is logged in on the electronic device 100. Then, the electronic device 100 can find the session corresponding to the session identifier. The electronic device 100 can find out whether there is connection information connected to the electronic device that calls the note-taking and question-answering service from the snapshot information associated with the session.
[0138] If the connection information for connecting to the electronic device that calls the note-taking and question-answering service exists, the electronic device 100 may connect to the electronic device indicated by the connection information and instruct the electronic device to call the note-taking and question-answering service.
[0139] In the process of the electronic device 100 and the electronic device 300 being connected, and the electronic device 100 instructing the electronic device 300 to call the note-taking and question-answering service, the electronic device 100 can store the connection information between the electronic device 100 and the electronic device 300 in the storage sandbox of the session. Optionally, the electronic device 100 can also store the notes and question-answering data received by the electronic device 300 at a certain moment in the session sandbox.
[0140] It can be seen that Figure 2G to Figure 2I The schematic diagram exemplarily shows a scenario in which the electronic device 100 fails to find the connection information in the snapshot information. The connection information is the connection information between the electronic device 100 and the electronic device that calls the note-taking and question-answering service.
[0141] Figure 2A to Figure 2I The user interface shown is for illustrative purposes only and should not be construed as limiting the present application.
[0142] By the above Figure 2A to Figure 2I It can be seen from the illustrated embodiment that when the electronic device 100 first requests other electronic devices to work in collaboration to implement application scenario A, it can store the connection information between itself and the above-mentioned other electronic devices. The above-mentioned connection information may include the device identification of the above-mentioned other electronic devices, the application identification of the application respectively called by the above-mentioned other electronic devices in the collaborative work, and the service identification of the service in the application respectively called by the above-mentioned other electronic devices in the collaborative work (optional). The above-mentioned connection information can be used for the electronic device 100 to establish a connection with the historical collaborative device when it requests other electronic devices to work in collaboration again to implement application scenario A. In addition, the electronic device 100 can instruct the historical collaborative device to call the application that was respectively called when the application scenario A was implemented. This not only simplifies the user operation when multiple electronic devices establish connections, but also facilitates users to call their accustomed electronic devices, enter familiar application scenarios more quickly, and improve user experience.
[0143] In some embodiments, the electronic device 100 can request to work with other electronic devices to realize application scenario A through application A. If there is a session based on application A in the electronic device 100 when the current device account is logged in on the electronic device 100, and the snapshot information associated with the session includes the connection information between the electronic device 100 and other electronic devices when realizing the above application scenario A, the electronic device 100 can restore the connection relationship with the historical collaborative device according to the connection information, and instruct the historical collaborative device to call the application that was called when the application scenario A was realized. The above historical collaborative device can be an electronic device that has established a connection relationship with the electronic device 100 when the application scenario A was realized.
[0144] The following takes the example of calling a learning application when the electronic device 100 establishes a connection relationship with other electronic devices to introduce another scenario of establishing a device connection relationship provided by an embodiment of the present application.
[0145] Figure 3A to Figure 3F Another schematic diagram of a scenario for establishing a device connection relationship is exemplified.
[0146] When the learning application is turned on, the electronic device 100 may display Figure 3A The user interface 230 shown. The contents of the user interface 230 may refer to the aforementioned Figure 2C Introduction.
[0147] like Figure 3A As shown, the first lesson has been completed 100%. The second lesson has been completed 30%. In response to the user operation acting on the second lesson option, the electronic device 100 can display the following Figure 3B The user interface 240 shown. The contents of the user interface 240 may refer to the aforementioned Figure 2D Introduction. Figure 3B As shown in FIG. 2 , a portion of the exercises in the after-class exercise area 243 have been completed. Figure 3A The course progress shown and Figure 3B The answer data shown may be determined based on snapshot information associated with session A. The above session A is a session based on a learning application when the current device account is logged in on the electronic device 100 .
[0148] Session A can be the aforementioned Figure 2A to Figure 2I The snapshot information associated with session A may include: the device identification of electronic device 100, the device identification of electronic device 200, the application identification of the application to which the service belongs that is called by electronic device 200, the service identification of the service called by electronic device 200, the course representation and playback progress of the course video played on electronic device 200, the device identification of electronic device 300, the application identification of the application to which the service belongs that is called by electronic device 300, the service identification of the service called by electronic device 300, the note data and answer data received on electronic device 300, etc. The snapshot information associated with session A is stored in the storage sandbox allocated by electronic device 100 for session A.
[0149] In response to the user operation on the video output device selection control 242, the electronic device 100 can search from the snapshot information associated with the session A whether there is connection information with the electronic device that calls the application for playing the video. Optionally, the electronic device 100 can also search for an electronic device that is in the same local area network as itself and can be used to play the video. The method for the electronic device 100 to search for an electronic device for playing the video can refer to the introduction of the above embodiment.
[0150] The electronic device 100 can display Figure 3C The user interface 250 shown in FIG. 2 may include a device selection area 251. The device selection area 251 may include a historical collaborative device area 251A and a nearby available device area 251B.
[0151] Among them, the device options in the historical collaborative device area 251 can be used to prompt the user of the electronic devices that have been connected to the electronic device 100 and played the course video. The device options in the historical collaborative device area 251A are the device options of the electronic devices found by the electronic device 100 based on the snapshot information associated with session A. For example, in the snapshot information associated with session A, the electronic device that calls the application for playing the video (such as the application that provides the course video playing service) includes the electronic device 200 (i.e., Zhang San's TV). The device options in the above-mentioned historical collaborative device area 251A may include the electronic device 200.
[0152] The device options in the nearby available device area 251B can be used to prompt the user of electronic devices that have not been connected to the electronic device 100 but can play the course video. For example, the electronic device 100 can search for electronic devices that are on the same home Wi-Fi as itself, can be used to play videos, and have never played the course video under its own instructions. The searched electronic devices may include Zhang San's tablet, Li Si's tablet, and Li Si's TV. The device options in the nearby available device area 251B may include the device options of the above-mentioned searched electronic devices.
[0153] like Figure 3C As shown, in response to a user operation acting on the device option "Zhang San's TV", the electronic device 100 can instruct the electronic device 200 to call the course video playback service.
[0154] like Figure 3D As shown, in response to a user operation on the student learning device selection control 244, the electronic device 100 can search for connection information with an electronic device that calls the note-taking and question-answering service from the snapshot information associated with session A. Optionally, the electronic device 100 can also search for an electronic device that is in the same local area network as itself and can call the note-taking and question-answering service. The method for the electronic device 100 to search for an electronic device for calling the note-taking and question-answering service can refer to the introduction of the aforementioned embodiment.
[0155] The electronic device 100 can display Figure 3E The user interface 270 shown. The user interface 270 may include a learning device selection area 271. The learning device selection area 271 may include a historical learning device area 271A and a nearby learning device area 271B.
[0156] Among them, the device options in the historical learning device area 271A can be used to prompt the user of the electronic devices that have been connected to the electronic device 100 and called the note-taking and answering services. The device options in the historical learning device area 271A are the device options of the electronic devices that the electronic device 100 searches for based on the snapshot information associated with session A. For example, in the snapshot information associated with session A, the electronic devices that call the note-taking and answering services include the electronic device 300 (i.e., Zhang San's tablet). The device options in the above-mentioned historical learning device area 271A may include the electronic device 300.
[0157] The device options in the nearby learning device area 271B can be used to prompt the user of electronic devices that have not been connected to the electronic device 100 but can call the note-taking and answering services. For example, the electronic device 100 can search for electronic devices that are on the same home Wi-Fi as itself, can call the note-taking and answering services, and have not called the note-taking and answering services under its instructions. The searched electronic devices may include Zhang San's TV, Li Si's tablet, and Li Si's TV. The device options in the nearby learning device area 271B may include the device options of the above-mentioned searched electronic devices.
[0158] like Figure 3E As shown, in response to a user operation acting on the device option "Zhang San's Tablet", the electronic device 100 can instruct the electronic device 300 to call the note-taking and question-answering service.
[0159] like Figure 3F As shown, a communication connection is established between the electronic device 100 and the electronic device 200 and the electronic device 300 .
[0160] The electronic device 100 can instruct the electronic device 200 to call the course video playback service (or other applications or services for playing videos) to play the second course video. When receiving the instruction from the electronic device 100, the electronic device 200 can call the course video playback service and display the video as shown in the figure. Figure 3F User interface 260 is shown. User interface 260 is a user interface for playing course videos.
[0161] In a possible implementation, the electronic device 100 can determine the course identification and playback progress of the course video when the electronic device 200 plays the course video from the snapshot information of the session A. The course identification and playback progress of the course video can be data in the snapshot information of the last update of the session A by the electronic device 100. The electronic device 100 can send the course identification and playback progress of the course video to the electronic device 200. The electronic device 200 can start playing the course video corresponding to the course identification from the position indicated by the playback progress in the user interface 260 according to the course identification and playback progress of the course video. For example, in the snapshot information of the last update of the session A by the electronic device 100, the course identification of the course video played by the electronic device 200 is the second course video. The playback progress of the second course video is "3:04". "3:04" can represent the position of 3 minutes and 4 seconds when the second course video is played. When the electronic device 100 instructs the electronic device 200 to call the course video playback service, the course identification and playback progress of the course video can be sent to the electronic device 200. Then, the electronic device 200 can start playing the second course video from the position of 3 minutes and 4 seconds.
[0162] In another possible implementation, the electronic device 100 and the electronic device 200 establish Figure 3F When the communication connection is shown, the session identifier of session A can be passed to the electronic device 200. The electronic device 200 can allocate a storage sandbox for session A. The storage sandbox of the session A in the electronic device 200 can be used to store data such as the course identifier and the playback progress of the course video. The electronic device 200 can periodically record the course identifier and the playback progress of the course video. Alternatively, the electronic device 200 can respond to a user operation (such as a user operation of exiting the course video playback) to record the course identifier and the playback progress of the course video. When receiving an instruction from the electronic device 100 for calling the course video playback service, the electronic device 200 can call the course video playback service. Among them, the electronic device 200 can play the course video according to the data recorded most recently in the storage sandbox of session A. For example, the data recorded most recently in the storage sandbox of session A in the electronic device 200 is: the course identifier of the course video played is the course identifier of the second course video, and the playback progress is "3:04". The electronic device 200 can start playing the second course video from the position of 3 minutes and 4 seconds.
[0163] like Figure 3F As shown, the electronic device 100 can instruct the electronic device 300 to call the note-taking and question-answering service. When receiving the instruction from the electronic device 100, the electronic device 300 calls the note-taking and question-answering service and displays the following information: Figure 3F The user interface 280 shown in FIG. The user interface 280 may include course materials, a text input box for taking notes, after-class exercises, etc. That is, the user can take notes and complete after-class exercises on the electronic device 300.
[0164] As shown in the user interface 280, the electronic device 300 can display the most recently received note data and answer data. That is, the user can continue to take notes from the notes that were previously recorded, and continue to complete the homework exercises from the homework exercises that were previously completed. Among them, the most recently received note data and answer data can be sent by the electronic device 100, or obtained by the electronic device 300 from the storage sandbox of the session A stored by itself.
[0165] Above Figure 3A to Figure 3F The user interface shown is for illustrative purposes only and should not be construed as limiting the present application.
[0166] By the above Figure 3A to Figure 3F It can be seen from the illustrated embodiment that when the electronic device 100 requests other electronic devices to work together again to implement application scenario A, the electronic device 100 can obtain the snapshot information of session A that was established when application scenario A was implemented. Based on the snapshot information, the electronic device 100 can restore the connection relationship with the historical collaborative device, and instruct the historical collaborative device to call the application that was called when application scenario A was implemented. The above-mentioned historical collaborative device may be an electronic device that has established a connection relationship with the electronic device 100 when application scenario A was implemented. In this way, the user does not need to operate on multiple electronic devices separately to establish the connection relationship between these multiple electronic devices. This not only simplifies the user operation when multiple electronic devices establish connections, but also makes it convenient for users to call their accustomed electronic devices, enter familiar application scenarios more quickly, and improve user experience.
[0167] In addition, the snapshot information of the above-mentioned session A may also include the activity information of the electronic device 100 and the historical collaborative device respectively calling the application when implementing the application scenario A. According to the activity information, when the electronic device 100 and the historical collaborative device call the application to implement the application scenario A, the state of the application can be restored to the state indicated by the activity information. The activity information is, for example, the playback progress of the video. The electronic device can play the video from the playback progress indicated by the activity information. In this way, the electronic device 100 and the historical collaborative device can continue to work together from the location where the collaborative work was last interrupted to implement the application scenario A.
[0168] In some embodiments, the electronic device 100 stores a session identifier of session A and snapshot information of session A. The snapshot information of session A includes connection information between the electronic device 100 and the electronic device 200, and connection information between the electronic device 100 and the electronic device 300. The electronic device 100 can work in collaboration with the electronic device 200 and the electronic device 300 to implement application scenario A. In response to a user operation that triggers the electronic device 100 to connect with other electronic devices to implement application scenario A, the electronic device 100 can obtain snapshot information of A. Based on the snapshot information, the electronic device 100 can automatically connect with the electronic device 200 and the electronic device 300, and instruct the electronic device 200 and the electronic device to call related applications to implement application scenario A. That is, the electronic device 100 can automatically restore a connection relationship that has been established, thereby improving the efficiency of the device in establishing a connection relationship. The user does not need to perform Figure 3C and Figure 3E The user operation of selecting a device is shown. This can simplify the user operation in the above device connection process.
[0169] In some embodiments, when the electronic device 100 requests to work with other electronic devices to implement application scenario A for the first time through application A, the electronic device 100 can query whether it has performed the same type of collaborative work with other electronic devices through other applications. The above-mentioned same type of collaborative work can mean that the electronic device 100 instructs other electronic devices to perform the same action. The above-mentioned same actions are, for example: the action of playing a video, the action of editing a document, etc. The embodiments of the present application do not limit the types of the above-mentioned actions.
[0170] If the electronic device 100 finds that it has performed the same type of collaborative work with other electronic devices through other applications, the electronic device 100 can recommend the connection relationship of the electronic devices in the above-mentioned collaborative work process of the same type. For example, the electronic device 100 finds that it has requested the electronic device 200 to call the application that plays the video to play the video through application B. When the electronic device 100 requests other electronic devices to play the video for the first time through application A, the electronic device 100 can prompt the user that application B has called the application that plays the video in the electronic device 200 to play the video. In response to the user operation of selecting the above-mentioned electronic device 200, the electronic device 100 can call the application that plays the video in the electronic device 200 through application A to play the video.
[0171] Figure 4A to Figure 4D Another schematic diagram of a scenario for establishing a device connection relationship is exemplified.
[0172] Figure 4A The user interface 410 shown can refer to the aforementioned Figure 2A The user interface 410 may include a network disk application A icon 411 and a network disk application B icon 412. That is, the electronic device 100 has installed a program installation package of the network disk application A and a program installation package of the network disk application B.
[0173] In response to a user operation on the network disk application B icon, the electronic device 100 may display the following Figure 4B The user interface 420 shown. The user interface 420 may include a document display area 421, an edit control 422, a share control 423, a download control 424, and a delete control 425. Among them:
[0174] The document display area 421 may be used to display document content.
[0175] The sharing control 423 may be used to share the document content in the document display area 421 .
[0176] The download control 424 may be used to download the document content in the document display area 421 .
[0177] The delete control 425 can be used to delete the document content in the document display area 421 from the cloud server corresponding to the network disk application B.
[0178] The edit control 422 can be used to edit the document content in the document display area 421. In response to the user operation acting on the edit control 422, the electronic device 100 can search for nearby electronic devices that can be used to edit the document, and display the electronic devices such as Figure 4C The option box 426 shown. The option box 426A may include a local editing option 426A, a recommended device selection area 426B, an available device selection area 426C, and a device search control 426D. Among them:
[0179] The local editing option 426A can be used to trigger the electronic device 100 to call the application installed by itself that can be used for document editing. Figure 4B The document content in the document display area 421 is shown for editing.
[0180] The available device selection area 426C may include device options for one or more electronic devices. The one or more electronic devices may be electronic devices that the electronic device 100 has searched for and that have not edited a document under its own instructions. The electronic device 100 may search among electronic devices that are on the same home Wi-Fi as itself. The embodiment of the present application does not limit the method by which the electronic device 100 searches for nearby electronic devices that can be used to edit a document.
[0181] The device search control 426D may be used to trigger the electronic device 100 to continue searching for electronic devices that are in the same local area network (such as the same home Wi-Fi) as the electronic device and that can be used to edit documents.
[0182] The recommended device selection area 426B may include device options for one or more electronic devices. The one or more electronic devices may be electronic devices that have called applications for document editing according to the instructions of the electronic device 100. Exemplarily, the recommended device selection area 426B includes the device options of the electronic device 300 (i.e., Zhang San's tablet), and the recommended information of the electronic device 300 "Last time, the network disk application A document was edited collaboratively using the document editing application A". That is to say, the electronic device 100 once instructed the electronic device 300 to call the document editing application A for document editing through the network disk application A. The snapshot information of the session B is stored in the electronic device 100. The above-mentioned session B is a session based on the network disk application A when the current device account is logged in on the electronic device 100. The snapshot information of the session B may include: the device identification of the electronic device 100, the device identification of the electronic device 300, the application identification of the electronic device 300 calling the application (such as the application package name of the document editing application A), and the action type of the electronic device 300 (i.e., the action of document editing). A collaborative record storage module may exist in the electronic device 100. The collaborative record storage module can be used to store data that the electronic device 100 instructs other electronic devices to perform different types of collaborative work. These data may include the application identifiers of the applications called by the electronic device 100 and the electronic device working in cooperation with it, and the types of actions performed by the electronic device working in cooperation with the electronic device 100. Then, the relevant data of the electronic device 100 instructing the electronic device 300 to edit the document in the above session B may be stored in the above cooperation record storage module. Figure 4B For user operations on the editing controls shown, the electronic device 100 can search the collaborative record storage module to see whether the electronic device 100 has instructed other electronic devices to call an application for document editing.
[0183] In response to a user operation on a device option of the electronic device 300, the electronic device 100 may Figure 4B The document data in the document display area 421 is sent to the electronic device 300 and instructs the electronic device 300 to call the document editing application A.
[0184] like Figure 4D As shown, a communication connection is established between the electronic device 100 and the electronic device 300. When receiving the document data sent by the electronic device 100 and the instruction to call the document editing application A, the electronic device 300 can call the document editing application A and display the user interface 430. The user interface 430 may include a document editing area 431, a save control 432, and a cancel control 433. The document editing area 431 can be used to display the document content. The save control 432 can be used to trigger the electronic device 300 to save the edited document content in the document editing area 431. In response to the user operation acting on the save control 432, the electronic device 300 can also send the edited document content to the electronic device 100. The cancel control 433 is used to trigger the electronic device to delete the editing operation on the document content in the document editing area 431.
[0185] It should be noted that when the electronic device 100 instructs the electronic device 300 to call the document editing application A for the first time through the network disk application B, the electronic device 100 can establish a session C and allocate a storage sandbox for the session C. The storage sandbox of session C can be used to store snapshot information of session C. The snapshot information of session C may include: the device identification of the electronic device 100, the device identification of the electronic device 300, the application identification of the electronic device calling the application (such as the application package name of the network disk application B), and the action type of the electronic device 300 (i.e., the document editing action). The relevant data that the electronic device 100 instructs the electronic device 300 to perform document editing in the above session C can be stored in the above collaborative record storage module.
[0186] Above Figure 4A to Figure 4D The user interface shown is for illustrative purposes only and should not be construed as limiting the present application.
[0187] By the above Figure 4A to Figure 4D As can be seen from the illustrated embodiment, the electronic device 100 can store data indicating that it has instructed other electronic devices to perform different types of collaborative work in a collaborative record storage module. When the electronic device 100 requests other electronic devices to perform collaborative work through application A, the electronic device 100 can search from the collaborative record storage module whether it has performed the same type of collaborative work with other electronic devices through other applications. If found, the electronic device 100 can perform the same type of collaborative work through the electronic device indicated by the connection information found through the application A request. This can facilitate users to call their accustomed electronic devices to perform collaborative work, thereby improving the user experience.
[0188] Figure 5A to Figure 5D Another schematic diagram of a scenario for establishing a device connection relationship is exemplified.
[0189] The electronic device 100 may display Figure 5A The negative one screen interface 510 shown. The negative one screen interface 510 may include a search bar 510, an application bar 512, a shortcut bar 513 and a news bar 514. Among them:
[0190] The search bar 510 may be used to search for information (eg, applications, news, files, etc.) locally on the electronic device 100 or online.
[0191] The application bar 512 may include one or more applications (such as a code scanning application, a payment code application, a music application, etc.) recently used by the electronic device 100. For example, in response to a user operation on a payment code application, the electronic device 100 may display a payment code. The embodiments of the present application do not limit the applications in the application bar 512.
[0192] News 514 may be used to display news information. The present embodiment of the application does not limit the news information displayed in news 514.
[0193] The shortcut toolbar 513 may include a weather control 513A, a courier control 513B, and a collaborative device recommendation control 513C. The weather control 513 can be used to view weather conditions (such as temperature, etc.). The courier control 513B can be used to view courier information (such as the logistics status of the courier, etc.). The collaborative device recommendation control 513C can be used to obtain information about electronic devices that applications installed in the electronic device 100 can request to work in collaboration. The shortcut toolbar 513 may also include more or fewer controls, which is not limited in the embodiments of the present application.
[0194] In response to a user operation on the collaborative device recommendation control 513C, the electronic device 100 may display the following Figure 5B The user interface 520 shown. The user interface 520 may include a first recommendation box 521, a second recommendation box 522, and a third recommendation box 523. Wherein:
[0195] The first recommendation box 521 can be used to display the electronic device information that the electronic device 100 requests to work collaboratively through the learning application. The first recommendation box 521 may include a learning application icon 521A, a last used device 521B, and a nearby collaborative recommendation device 521C. The learning application in the electronic device 100 can be used to provide services for providing answers to exercises in the aforementioned embodiment. The learning application is an application for providing answers to exercises in the course learning distributed application in the aforementioned embodiment. The electronic device in the last used device 521B is the historical collaborative device in the aforementioned embodiment. The electronic device 100 once instructed the last used electronic device in the device 521B to call related applications for collaborative work through the learning application. Exemplarily, the last used device 521B includes an electronic device named "Zhang San's tablet" (i.e., electronic device 300) and an electronic device named "Zhang San's TV" (i.e., electronic device 200). The above session A is a session based on the learning application when the current device account is logged in on the electronic device 100. Among them, the electronic device 300 is a learning terminal, which can indicate that the application that the electronic device 100 instructs the electronic device 300 to call is a note-taking and answering application. The electronic device 300 provides note-taking and question-answering services, and displays Figure 3F The user interface 280 shown. The electronic device 200 is a video output device, which may indicate that the type of collaborative work that the electronic device 100 instructs the electronic device 200 to perform is to play a video. The electronic device 200 may call an application for playing a video (such as a course video playing application, a Huawei video application), play the course video, and display the video. Figure 3F The user interface 260 shown. The information of the electronic device 200 and the electronic device 300 can be obtained by the electronic device 100 from the storage sandbox of the session A. The specific acquisition method can refer to the introduction of the above embodiment, which will not be repeated here.
[0196] In some embodiments, the electronic device 100 may determine whether the historical collaborative device is in an available state. For example, when the device identification of the electronic device 200 is obtained from the storage sandbox of session 1, the electronic device 100 may send an inquiry message to the electronic device 200. If a response is received from the electronic device 200, the electronic device 100 may determine that the electronic device 200 is in an available state. If no response is received from the electronic device 200 (such as the electronic device 200 is in a power-off state and cannot respond to the inquiry message of the electronic device 100), the electronic device 200 may determine that the electronic device 200 is in an unavailable state. The embodiments of the present application do not limit the implementation method by which the electronic device 100 determines whether the historical collaborative device is in an available state.
[0197] The electronic device 100 may mark the unavailable historical collaborative device to prompt the user that the historical collaborative device is unavailable. For example, the electronic device 100 determines that the electronic device 200 is in an unavailable state. The electronic device 200 in the last used device 521B may be presented in gray. The embodiment of the present application does not limit the method for the electronic device 100 to mark the unavailable historical collaborative device.
[0198] In some embodiments, when the electronic device 100 requests other electronic devices to work in collaboration, it does not specify the application to be called in the electronic device. Multiple applications in the electronic device can realize the same type of collaborative work with the electronic device 100. The electronic device 100 can display the following information: Figure 5C In response to the user operation of selecting any application option in the application selection interface 530, the electronic device 100 can instruct the electronic device working with itself to call the selected application. For example, the electronic devices in the last used device 521B are all in an available state. Figure 5B The user operation of the last time device 521B was used is shown, and the electronic device 100 can request the electronic devices in the above-mentioned device 521B to work together. Among them, the electronic device 100 can instruct the electronic device 300 to provide note-taking and answering services, and instruct the electronic device 200 to provide course video playback services. The application used to provide note-taking and answering services in the electronic device 300 is the note-taking and answering application. The application used to provide course video playback services in the electronic device 200 includes the course video playback application and the Huawei video application. The electronic device 100 can display the following Figure 5C The application selection interface 530 shown. The application selection interface 530 may include an application option area 521 and a determination control 532. The application option area 521 may include options for a course video playback application and options for a Huawei video application. In response to a user operation of selecting an option for a course video playback application and a user operation acting on the determination control 532, the electronic device 100 may instruct the electronic device 200 to call the course video playback application. In addition, the electronic device 300 may call a note-taking and answering application to provide note-taking and answering services.
[0199] In some embodiments, the electronic device 100 can specify the application called by the electronic device working with it according to the snapshot information of session A. Exemplarily, according to the snapshot information of session A, the electronic device 100 can determine that in the process of working with the electronic devices 200 and 300, the application called by the electronic device 200 is the course video playback application, and the application called by the electronic device 300 is the note-taking and answering application. In response to the user operation acting on the device 521B used last time, the electronic device 100 can instruct the electronic device 200 to call the course video playback application, and instruct the electronic device 300 to call the note-taking and answering application.
[0200] In some embodiments, the electronic device 100 may respond to a user operation on any electronic device in the last used device 521B and instruct the electronic device to provide a corresponding service. For example, in response to a user operation on an electronic device named "Zhang San's Tablet" in the last used device 521B, the electronic device 100 may instruct the electronic device named "Zhang San's Tablet" to provide note-taking and question-answering services. Further, in response to a user operation on an electronic device named "Zhang San's TV" in the last used device 521B, the electronic device 100 may instruct the electronic device named "Zhang San's TV" to provide a course video playback service.
[0201] Nearby collaborative recommendation devices 521C may include electronic devices that are searched by the electronic device 100 but are not working in collaboration under the instruction of the electronic device 100. For example, an electronic device named "Li Si's Tablet" and an electronic device named "Li Si's TV". Among them, according to the snapshot information of the above-mentioned session 1, the electronic device 100 can recommend electronic devices of the same type as the historical collaborative device as electronic devices that perform the same type of collaborative work as the historical collaborative device. For example, the electronic device named "Li Si's Tablet" is an electronic device of the same type as the electronic device 300. The electronic device 100 can determine the electronic device named "Li Si's Tablet" as a learning terminal. That is, in response to the user operation acting on the nearby collaborative recommendation device 521, the electronic device 100 can instruct the electronic device named "Li Si's Tablet" to call the note-taking and answering applications. Similarly, the electronic device named "Li Si's TV" is an electronic device of the same type as the electronic device 200. The electronic device 100 can determine the electronic device named "Li Si's TV" as a video output device. That is, in response to the user operation on the nearby collaborative recommendation device 521, the electronic device 100 can instruct the electronic device named "Li Si's TV" to play the course video. The method for the electronic device 100 to search for the electronic device in the nearby collaborative recommendation device 521C can refer to the aforementioned Figure 2E The embodiments shown will not be described in detail here.
[0202] The second recommendation box 522 can be used to display the electronic device information that the electronic device 100 requests to work collaboratively through the network disk application A. The second recommendation box 522 may include a network disk application A icon 522A, a last used device 522B, and a nearby collaborative recommended device 522C. The last used device 522B and the nearby collaborative recommended device 522C can refer to the introduction in the aforementioned first recommendation box 521, which will not be repeated here. The network disk application A can be a traditional application in the aforementioned embodiment. It can be seen from the second recommendation box 522 that the electronic device 100 once indicated the electronic device named "Zhang San's Tablet" through the network disk application A to perform collaborative work on document editing.
[0203] The third recommendation box 522 can be used to display the electronic device information that the electronic device 100 requests to work collaboratively through the network disk application B. The third recommendation box 522 may include a network disk application B icon 523A and a nearby collaborative recommendation device 523B. The nearby collaborative recommendation device 523B may include electronic devices that the electronic device 100 requests to perform the same type of collaborative work through applications other than the network disk application B. Exemplarily, the electronic device 100 does not request other electronic devices to work collaboratively through the network disk application B. The electronic device 100 can find in the aforementioned collaborative record storage module that it has indicated that the electronic device named "Zhang San's Tablet" calls the document editing application A through the network disk application A. The nearby collaborative recommendation device 523B may include an electronic device named "Zhang San's Tablet". The nearby collaborative recommendation device 523B may also include a prompt "The last time the network disk application A document was edited collaboratively, the document editing application A was used" to recommend records of the same type of collaborative work to the user.
[0204] like Figure 5D As shown, in response to the user operation on the nearby collaborative recommendation device 523B, the electronic device 100 can instruct the electronic device named "Zhang San's Tablet" to call the document editing application A through the network disk application B. In this way, for an application in the electronic device 100 that does not work with other electronic devices, the user can also conveniently call the electronic device he is used to through the application on the electronic device 100 to work collaboratively, thereby improving the user's experience. The specific method of the electronic device 100 recommending the same type of collaborative electronic devices can be referred to the aforementioned Figure 4A to Figure 4D The embodiment shown.
[0205] The user interface 520 may also include more or fewer recommendation boxes associated with applications in the electronic device 100 .
[0206] Electronic device 100 displays Figure 5A The method of the negative one screen interface 510 shown can refer to the implementation method in the prior art, and the embodiment of the present application is not limited to this.
[0207] Figure 5A to Figure 5D The example shows some user operations of requesting other electronic devices to work together through an application on the electronic device 100. In the process of the electronic device 100 requesting other electronic devices to work together through an application, the method of establishing a communication connection between electronic devices, the method of creating a session and storing snapshot information of the session by the electronic device 100 can all refer to the above embodiments. Figure 3A to Figure 3F and Figure 4A to Figure 4D The user actions shown are Figure 5A to Figure 5D As shown in the user operation, the user can more conveniently establish a communication connection with other electronic devices through an application in the shortcut toolbar in the negative one screen interface 510 and request the above other electronic devices to work in collaboration.
[0208] The following is based on Figure 2A to Figure 2I The scenario shown introduces a communication system 500 provided in an embodiment of the present application.
[0209] Figure 6 FIG. 5 is a schematic diagram showing an exemplary architecture of a communication system 500. Figure 6 As shown, the communication system 500 may include an electronic device 100, an electronic device 200, and an electronic device 300. The electronic device 100, the electronic device 200, and the electronic device 300 are installed with program installation packages of different services in the course learning distributed application. For example, the electronic device 100 is installed with an exercise answer providing application. The exercise answer providing application can provide exercise answer services (i.e., ability1). The exercise answer providing application can be the aforementioned Figure 2A The application corresponding to the learning application icon 211 in the figure. A course video playback application is installed in the electronic device 200. The course video playback application can provide a course video playback service (i.e., ability2). A note-taking and question-answering application is installed in the electronic device 300. The note-taking and question-answering application can provide a note-taking and question-answering service (i.e., ability3). The above-mentioned exercise answer providing application, the above-mentioned course video playback application, and the above-mentioned note-taking and question-answering application all belong to course learning distributed applications. The application package name of the above-mentioned course learning distributed application may be, for example, com.example.study. An application that can provide a service in a distributed application may also have a service package name. For example, the above-mentioned note-taking and question-answering application may also have a service package name, such as: .StudyNotePadServiceAbility. This application does not limit the above-mentioned application package names. Optionally, applications used to provide different services in a distributed application may also have different application package names.
[0210] In some embodiments, the exercise answer providing application in the electronic device 100 also includes a device connection program. The device connection program can be used for the electronic device 100 to work in coordination with other electronic devices. Among them, by running the device connection program, the electronic device 100 can establish a communication connection with the electronic device indicated in the device connection program. The electronic device 100 can also instruct the electronic device connected thereto to call the corresponding application. Optionally, the device connection program and the exercise answer providing application can be respectively included in two independent program installation packages. When the electronic device 100 installs the exercise answer providing application and the device connection program, the electronic device 100 can use the interface (such as Figure 2D The video output device selection control 242 and the student learning device selection control 243 shown in the figure receive relevant user operations and execute the device connection program to call other electronic devices to work together. Alternatively, the electronic device 100 can Figure 5A The interface in the shortcut toolbar 513 (such as the collaborative device recommendation control 513C) receives relevant user operations and executes the device connection program to call other electronic devices to work collaboratively.
[0211] Exemplarily, the device connection procedure in the electronic device 100 may be:
[0212]
[0213]
[0214] The above instruction "reqConnections" can be used to define different types of collaborative work. The type of collaborative work can be determined by the type of action that the electronic device 100 instructs other electronic devices to perform. The following Table 1 can illustrate the fields that need to be determined when defining different types of collaborative work, and the meaning of each field.
[0215] Fields Required describe action yes Types of Actions devices yes Types of devices that can be connected bundleName no Application package name abilityName no Service Pack Name label no Name of the action
[0216] Table 1
[0217] As can be seen from Table 1, the fields "action" and "devices" are required fields. The fields "bundleName", "abilityName", and "label" are optional fields. Not limited to the above fields, more or fewer fields can be included when defining different types of collaborative work.
[0218] It can be seen from the above-mentioned device connection procedure that two different types of collaborative work are defined in the above-mentioned instruction "reqConnections". Among them, the first type of collaborative work is the collaborative work in which the electronic device 100 instructs other electronic devices to play videos. In this first type of collaborative work, the types of devices that the electronic device 100 can connect to include: mobile phones, tablets, TVs, and smart cars. That is, when the electronic device 100 searches for electronic devices, it can search for the device types included in the above-mentioned field "devices". This first type of collaborative work does not specify the application package name and service package name. That is, when the electronic device 100 instructs other electronic devices to play course videos, it does not specify the application called by the above-mentioned other electronic devices.
[0219] In a possible implementation, the electronic device 100 instructs the electronic device 200 to play the course video through the exercise answer providing application. The electronic device 200 may preferentially call an application (such as a course video playing application) that belongs to the same distributed application as the exercise answer providing application to play the course video. If the course video playing application is not installed in the electronic device 200, the electronic device 100 may call other applications (such as the Huawei video application) to play the course video.
[0220] In another possible implementation, the electronic device 100 once provided an application to instruct the electronic device 200 to play the course video through the exercise answers, and the electronic device 200 called the above-mentioned course video playback application to play the course video. The snapshot information of session 1 is stored in the electronic device 100. The session 1 is a session based on the application provided by the exercise answers when the current device account is logged in on the electronic device 100. The snapshot information of the session 1 may include the application identifier of the above-mentioned course video playback application (i.e., the application package name com.example.study of the course learning distributed application). When the electronic device 100 again provides an application to instruct the electronic device 200 to play the course video through the exercise answers, the electronic device 100 can send the application identifier of the above-mentioned course video playback application to the electronic device 200 to instruct the electronic device 200 to call the historical collaborative application (i.e., the above-mentioned course video playback application) to play the course video. If the electronic device 200 cannot call the above-mentioned course video playback application, the electronic device 200 can also call other applications (such as Huawei Video Application) to play the course video.
[0221] In another possible implementation, the electronic device 100 provides an application instruction to the electronic device 200 to play the course video through the answer to the exercise. The electronic device 200 can search for an application that can be used to play the video and display the application options of the found application. In response to the user operation of selecting one of the above application options, the electronic device 200 can call the application corresponding to the application option to play the course video.
[0222] The second type of collaborative work is a collaborative work in which the electronic device 100 instructs other electronic devices to provide note-taking and answering services. The second type of collaborative work specifies the application package name and the service package name. The above application package name and service package name can be used to indicate the implementation method of the electronic device collaborative work. That is, when the electronic device 100 instructs other electronic devices to provide note-taking and answering services, it specifies the application called by the above other electronic devices.
[0223] Exemplarily, the electronic device 100 provides an application through the exercise answer to instruct the electronic device 300 to call the above-mentioned note-taking and answering application. If the note-taking and answering application is installed in the electronic device 300, the electronic device 300 can call the note-taking and answering application. If the note-taking and answering application is not installed in the electronic device 300, the electronic device 300 can obtain the note-taking and answering application from the cloud server and call it.
[0224] In some embodiments, when defining a type of collaborative work in the above-mentioned device connection program, only the application package name can be specified without specifying the service package name. Exemplarily, the electronic device 100 provides an application instruction through the answer to the exercise to instruct the electronic device 200 to call a traditional application (such as the Huawei video application) to play the course video. The definition of the above-mentioned first type of collaborative work may include the field "bundleName". The value of the field "bundleName" can be the application package name of the Huawei video application.
[0225] The above instruction "onConnectAbilityReq" can be used for the electronic device 100 to establish a connection with the electronic device 300, and instruct the electronic device 300 to call the note-taking and question-answering application.
[0226] In some embodiments, the electronic device 100 first requests other electronic devices to work together through the above exercise answer providing application. For example, the electronic device 100 requests the electronic device 300 to call the note-taking and question-answering application. The electronic device 300 calling the note-taking and question-answering application may display the following: Fig.2I The user interface 280. The electronic device 100 can create Figure 6 The electronic device 100 can determine the session identifier of session 1 according to the device account logged in on the electronic device 100 and the application package name of the application providing the exercise answer (such as com.example.study). The electronic device 100 can allocate a storage sandbox (i.e. Figure 6 The session 1 storage sandbox A is shown). The location of the session 1 storage sandbox A may be: ... / data / user / <device account of electronic device 100> / com.example.study / <session identifier of session 1> / ….
[0227] Since the definition of the second type of collaborative work specifies the application package name and the service package name, the electronic device 100 can pass the session identifier of the above session 1 to the electronic device 300 and instruct the electronic device 300 to call the note-taking and question-answering application. In the electronic device 300, the session identifier of the above session 1 can be passed to the above note-taking and question-answering application. The electronic device 300 can allocate a storage sandbox (i.e., Figure 6 The session 1 storage sandbox C is shown). The location of the session 1 storage sandbox C may be: ... / data / user / <device account of the electronic device 300> / com.example.study / <session identifier of session 1> / ….
[0228] Session 1 storage sandbox A can be used to store snapshot information of session 1. The snapshot information of session 1 may include connection information between electronic device 100 and electronic device 300. The connection information may include: device identification of electronic device 100, device identification of electronic device 300, application identification of the application called by electronic device 300 to serve the service, service identification of the service called by electronic device 300, and type of action of electronic device 300. The snapshot information of session 1 may also include activity information of note-taking and question-answering applications in electronic device 300. The activity information may include: note data, question-answering data. Not limited to the above content, the snapshot information of session 1 may also include more or less content.
[0229] The session 1 storage sandbox C can be used to store the activity information of the note-taking and question-answering application in the electronic device 300. When the note-taking and question-answering application is called again, the electronic device 300 can determine the state of the note-taking and question-answering application according to the activity information stored in the session 1 storage sandbox C. In this way, when the electronic device 100 instructs the electronic device 300 to call the note-taking and question-answering application again, the electronic device 300 can restore the note-taking and question-answering application to the state of the last exit of the note-taking and question-answering application.
[0230] The scenario in which the electronic device 100 creates session 1 is not limited to the scenario in which the electronic device 100 requests other electronic devices to work together for the first time through the exercise answer providing application. In some embodiments, the electronic device 100 has requested the electronic device 300 to call the note-taking and answering service through the exercise answer providing application, and the session created by the process has been cleared. Then, when the electronic device 100 requests other electronic devices to work together again through the exercise answer providing application, the electronic device 100 cannot find the corresponding session identifier. The electronic device 100 can create session 1. This session 1 is a session based on the exercise answer providing application when the electronic device 100 logs in to the current device account.
[0231] In other embodiments, when the electronic device 100 requests other electronic devices to work together through the exercise answer providing application, the session tag of session 1 can be queried. That is, the electronic device 100 has requested other electronic devices to work together through the exercise answer providing application. The electronic device 100 can obtain the snapshot information of session 1 from the storage sandbox A of the session 1. The electronic device 100 can send the session identifier of session 1 to the electronic device indicated by the snapshot information of session 1 (such as electronic device 300), and request the electronic device 300 to call the note-taking and question-answering application. Among them, the electronic device 300 can display the following information: Figure 3F User interface 280 is shown.
[0232] The instruction for the electronic device 100 to establish a connection with the electronic device 200 and instruct the electronic device 200 to play the course video can refer to the above-mentioned instruction "onConnectAbilityReq".
[0233] In some embodiments, the electronic device 100 stores a session identifier of session 1 and snapshot information of session 1. The snapshot information of session 1 may be stored in storage sandbox A of session 1.
[0234] Since the application package name and service package name are not specified in the definition of the first type of collaborative work, when the electronic device 100 provides an application through the above-mentioned exercise answers to instruct the electronic device 200 to play the course video, the session identifier of the above-mentioned session 1 can be passed to the electronic device 200. The electronic device 200 can select an application that can be used to play the course video (such as a course video playback application, a Huawei video application, etc.). The specific selection method can be: selecting an application that belongs to the same distributed application as the above-mentioned exercise answer providing application, selecting an application that the electronic device 200 has used to play the video when working in collaboration with the electronic device 100 according to the snapshot information of session 1, and selecting according to the received user operation for selecting an application to play the course video. The embodiment of the present application does not limit the method for the electronic device 200 to select an application that can be used to play the course video. For example, the electronic device 200 can choose to call the course video playback application. Then, in the electronic device 200, the session identifier of the above-mentioned session 1 can be passed to the above-mentioned course video playback application. The electronic device 200 can allocate a storage sandbox (i.e., a storage sandbox) for session 1 locally. Figure 6 The session 1 storage sandbox B is shown). The location of the session 1 storage sandbox B may be: ... / data / user / <device account of electronic device 200> / com.example.study / <session identifier of session 1> / ….
[0235] Session 1 storage sandbox B can be used to store activity information of the course video playback application in electronic device 200. The activity information may include the course identifier and playback progress of the course video played by electronic device 200. When the above-mentioned course video playback application is called again, electronic device 100 can determine the state of the course video playback application based on the activity information stored in session 1 storage sandbox B. In this way, when electronic device 100 instructs electronic device 200 to call the course video playback application again, electronic device 200 can restore the course video playback application to the state of the last exit of the course video playback application. For example, electronic device 200 can display the following: Figure 3F User interface 260 is shown.
[0236] If the electronic device 100 provides the service of providing answers to exercises for the first time to instruct other electronic devices to play the course video, and the electronic device 200 is selected, and the electronic device 200 calls the course video playing application, then the electronic device 100 can store the connection information between the electronic device 100 and the electronic device 200 in the session 1 storage sandbox A. The connection information between the electronic device 100 and the electronic device 200 may include: the device identification of the electronic device 100, the device identification of the electronic device 200, the application identification of the application called by the electronic device 200, the service identification of the service called by the electronic device 200, and the action type of the electronic device 200. The connection information between the electronic device 100 and the electronic device 200 may include snapshot information with session 1. The snapshot information of session 1 may also include activity information of the course video playing application of the electronic device 200.
[0237] If the electronic device 100 has instructed the electronic device 200 to play the course video through the exercise answer providing service, and the electronic device 200 calls the course video playing application to play the video, then the snapshot information of session 1 stored in the session 1 storage sandbox A may include the connection information between the electronic device 100 and the electronic device 200. The snapshot information of session 1 may also include the activity information of the course video playing application of the above-mentioned electronic device 200. When the connection information between the electronic device 100 and the electronic device 200 is stored in the session 1 storage sandbox A, the method in which the electronic device 100 requests other electronic devices to play the course video through the above-mentioned exercise answer providing application can be the method in which the electronic device 100 again requests other electronic devices to call the note-taking and answering service through the exercise answer providing application in the aforementioned embodiment. It will not be repeated here.
[0238] The following describes a method for the electronic device 100 to update the snapshot information of the session 1.
[0239] In some embodiments, the electronic device 100 may periodically record snapshot information of session 1.
[0240] The electronic device 100 can request the electronic device 200 and the electronic device 300 to work with it according to the method in the above embodiment. Figure 6 As shown, the electronic device 100 can instruct the electronic device 200 to call the course video playback application through the exercise answer providing application, and instruct the electronic device 300 to call the note-taking and answering application. In the above collaborative work process, the electronic device 100 can store the session 1 storage sandbox A. Figure 6 Shown is the snapshot information of session 1.
[0241] like Figure 6 As shown, the snapshot information of session 1 may include one or more records. Among them, a record may include the connection information between the electronic device 100 and an electronic device, the activity information of calling an application in the above electronic device under the connection relationship, and the recording time of this record. The connection information in the above record may include the source device identifier, the destination device identifier, the application identifier, and the service identifier. The source device may be an electronic device that instructs other electronic devices to call related applications (such as electronic device 100). The destination device may be an electronic device that receives a call instruction to call related applications (such as electronic device 200, electronic device 300). The application identifier may be the application package name of the application called by the destination device (such as com.example.study). The service identifier may be the service package name of the service called by the destination device. The above service identifier may be an optional field. For example, if the application called by the destination device does not provide a program installation package in units of services, the service identifier in a record where the destination device is located may be empty. The recording time of a record may be determined by the activity information of this record. That is, the above activity information may be the activity information of calling the application in the destination device at the above recording time. For example, Figure 6 The first record shown is a record of the electronic device 100 and the electronic device 200 working together. The recording time of this record is t1. The activity information of this record may include the course identification and the playing progress of the course video played by the electronic device 200 at the time t1.
[0242] The specific method by which the electronic device 100 can periodically record the snapshot information of the session 1 can be: the electronic device 100 can request to obtain the activity information of the course video playback application in the electronic device 200 at every preset time period. When the above activity information is obtained, the electronic device 100 can update Figure 6 The activity information and recording time of the first record in the snapshot information of session 1 are shown.
[0243] The electronic device 200 can store the activity information of the course video playback application in the session 1 storage sandbox B. The electronic device 200 can also periodically record the above activity information. Not limited to the course identification and playback progress of the above course video, the session 1 storage sandbox B can also store cached data of the course video, etc. This embodiment of the application is not limited to this.
[0244] Electronic device 100 records Figure 6 The method of storing the second record in the snapshot information of session 1 can refer to the above embodiment. A record in the snapshot information of session 1 can also include more or fewer fields. For example, a field of a record can also include the type of action of the destination device, etc. The embodiment of the present application does not limit the storage form of the snapshot information of the session. Figure 6 The snapshot information may be stored in the storage sandbox in other forms, such as the table form shown.
[0245] In other embodiments, the electronic device 100 may record snapshot information of session 1 in response to a user operation.
[0246] Exemplarily, during the process of the electronic device 100 and the electronic device 200 working together, in response to a user operation on the electronic device 200 for exiting the course video playback, the electronic device 200 may send the course identifier and playback progress of the course video played when exiting the course video playback (such as at time t3) to the electronic device 100. The electronic device 100 may use the received course identifier and playback progress of the course video played at time t3 to update the activity information and recording time of the first record in the snapshot information of session 1.
[0247] Depend on Figure 6 It can be seen from the communication system 500 shown that when the electronic device 100 requests other electronic devices to work together to implement application scenario A through application A (such as the application providing the answers to the exercises mentioned above), the electronic device 100 can pass the session identifier of session A (such as the above session 1) to the electronic device working with it. The electronic device 100 can exchange data with the electronic device in the same session with itself. The above session A is a session based on application A when logging into the current device account on the electronic device 100. The electronic device 100 can use the snapshot information of session A to restore the connection relationship with the historical collaborative device. The above historical collaborative device can be an electronic device that has established a connection relationship with the electronic device 100 when the application scenario A was implemented. In this way, the user does not need to operate on multiple electronic devices separately to establish the connection relationship between these multiple electronic devices. This not only simplifies the user operation when multiple electronic devices establish a connection, but also facilitates the user to call the electronic device they are accustomed to, enter the familiar application scenario more quickly, and improve the user experience.
[0248] In addition, the snapshot information of the above-mentioned session A may also include the activity information of the electronic device 100 and the historical collaborative device respectively calling the application when implementing the application scenario A. Optionally, the historical collaborative device may also locally store the interactive information of its own calling the application. According to the above-mentioned activity information, when the electronic device 100 and the historical collaborative device call the application to implement the application scenario A, the state of the application can be restored to the state indicated by the activity information. The activity information is, for example, the playback progress of the video. The electronic device can play the video from the playback progress indicated by the activity information. In this way, the electronic device 100 and the historical collaborative device can continue to work together from the location where the collaborative work was last interrupted to implement the application scenario A.
[0249] Another communication system 600 provided in an embodiment of the present application is introduced below.
[0250] Figure 7 FIG. 6 is a schematic diagram showing an exemplary architecture of a communication system 600. Figure 7 As shown, the communication system 600 may include an electronic device 100, an electronic device 200, and an electronic device 400. The device account logged in on the electronic device 100 is different from the device account logged in on the electronic device 400.
[0251] The electronic device 100, the electronic device 200 and the electronic device 400 may be installed with program installation packages of different services in the course learning distributed application. For example, both the electronic device 100 and the electronic device 400 are installed with an exercise answer providing application. The exercise answer providing application can provide exercise answer providing services (i.e., ability1). The electronic device 200 is installed with a course video playing application. The course video playing application can provide course video playing services (i.e., ability2).
[0252] The electronic device 100 can request the electronic device 200 to play the course video by installing the exercise answer providing application. The electronic device 400 can also request the electronic device 200 to play the course video by installing the exercise answer providing application. The implementation process of the electronic device 100 and the electronic device 400 requesting the electronic device 200 to play the course video can refer to the aforementioned Figure 6 The embodiment shown.
[0253] Depend on Figure 7 It can be seen that when the electronic device 100 provides an application to instruct the electronic device 200 to play the course video through the answer to the exercise, the electronic device 100 can send the session identifier of session 1 to the electronic device 200. The electronic device 200 can call the course video playback application and allocate a storage sandbox for session 1 (i.e., session 1 storage sandbox B). The location of session 1 storage sandbox B can be: ... / data / user / <device account of electronic device 200> / com.example.study / <session identifier of session 1> / …. In the process of electronic devices 100 and electronic devices 200 communicating based on the above session 1, the course video playback application can read the data in session 1 storage sandbox B and write data to session 1 storage sandbox B.
[0254] The electronic device 400 includes a session 2 storage sandbox A. The session 2 storage sandbox A can be used to store snapshot information of session 2. The session 2 is a session based on the above-mentioned exercise answer providing application when the electronic device 400 logs in to the current device account. When the electronic device 400 instructs the electronic device 200 to play the course video through the exercise answer providing application, the electronic device 400 can send the session identifier of session 2 to the electronic device 200. The electronic device 200 can call the course video playback application and allocate a storage sandbox (i.e., session 2 storage sandbox B) for session 2. The location of session 2 storage sandbox B can be: ... / data / user / <device account of electronic device 200> / com.example.study / <session identifier of session 2> / …. In the process of electronic devices 400 and electronic devices 200 communicating based on the above-mentioned session 2, the course video playback application can read data in session 2 storage sandbox B and write data to session 2 storage sandbox B.
[0255] It can be seen from the above embodiments that the electronic device can isolate the local storage sandbox based on the application and session.
[0256] In some embodiments, an electronic device may receive instructions from different electronic devices for calling the same application. The device accounts logged in on the above-mentioned different electronic devices are different. The above-mentioned different electronic devices may respectively send session identifiers of the sessions they created to the above-mentioned electronic device. When receiving the session identifiers of different sessions, the above-mentioned electronic device may allocate storage sandboxes for these different sessions respectively. Since the above-mentioned different electronic devices instruct the above-mentioned electronic device to call the same application, the storage sandboxes of the above-mentioned different sessions can all read and write data by the above-mentioned same application. Among them, in the process of the above-mentioned electronic devices working together based on a session, the application called by the above-mentioned electronic device can read and write data on the storage sandbox of this session. That is, the same application can read and write data on different storage sandboxes under different sessions.
[0257] In other embodiments, an electronic device instructs another electronic device to call application D and application E through application C. A session identifier of session C exists in the above electronic device. The session identifier of session C is based on the session of the above application C when the above electronic device logs in to the current device account. When the above electronic device instructs the above another electronic device to call application D through application C, the above electronic device can pass the session identifier of session C to the above another electronic device. The above another electronic device can assign the local storage sandbox D to session C. The above application D can read and write data to the storage sandbox D. When the above electronic device instructs the above another electronic device to call application E through application C, the above electronic device can pass the session identifier of session C to the above another electronic device. The above another electronic device can assign the local storage sandbox E to session C. The above application E can read and write data to the storage sandbox E. That is, different applications can read and write data to different storage sandboxes under the same session.
[0258] In some embodiments, snapshot information of a session may be stored in a distributed storage system. The above-mentioned distributed storage system may include multiple storage devices. These multiple storage devices may share and synchronize data. Multiple electronic devices related to a session may obtain snapshot information of this session from the distributed storage system. Multiple electronic devices related to a session may be a main device (such as electronic device 100) and a sub-device (an electronic device that works in conjunction with electronic device 100 in this session) in a session. The above-mentioned method may facilitate electronic devices related to a session to obtain snapshot information of this session. In addition, the storage device in the distributed storage system may be a device with better computing performance and storage performance than multiple electronic devices related to a session. Using the above-mentioned distributed storage system, multiple electronic devices related to a session can save their own computing resources and storage resources.
[0259] The following is a detailed Figure 8 The communication system 700 shown is used to introduce a distributed storage method involved in an embodiment of the present application.
[0260] like Figure 8 As shown, the communication system 700 may include an electronic device 100, an electronic device 200, an electronic device 300, and a distributed storage system 710. Among them, the electronic device 100 can provide an application to instruct the electronic device 200 to call the course video playback application through the exercise answers. The connection information and the activity information of the course video playback application in this collaborative work process can be included in the snapshot information of session 1. Session 1 is a session in which the electronic device 100 provides an application based on the exercise answers when logging into the current device account. The electronic device 200 can provide an application to instruct the electronic device 200 to use the course video playback application through the exercise answers. The connection information and the activity information of the course video playback application in this collaborative work process can be included in the snapshot information of session 2. Session 2 is a session in which the electronic device 400 provides an application based on the exercise answers when logging into the current device account. The device accounts logged in to the electronic device 100 and the electronic device 400 are different.
[0261] In a possible implementation, the distributed storage system 710 may include a session 1 storage sandbox 711, a session 2 storage sandbox 712, and other storage sandboxes allocated to other sessions. The location of a storage sandbox of a session in the distributed storage system 710 can be determined based on the device account of the main device in this session, the application identifier of the application on the main device that calls the sub-device to work collaboratively, and the session identifier of this session. Multiple electronic devices related to a session can all perform read and write operations on the storage sandbox of this session in the distributed storage system 710. The above-mentioned session 1 storage sandbox 711 and session 2 storage sandbox 712 are storage sandboxes allocated by the distributed storage system 710 for session 1 and session 2, respectively.
[0262] When the electronic device 100 establishes session 1, it can instruct the distributed storage system 710 to allocate a storage sandbox for session 1. The location of the session 1 storage sandbox 711 can be determined by the device account of the electronic device 100, the application identifier of the exercise answer providing application, and the session identifier of session 1. When the electronic device 100 requests other electronic devices to call the course video playback application through the exercise answer providing application, the electronic device 100 can obtain the snapshot information of session 1 from the session 1 storage sandbox 711 of the distributed storage system 710. The snapshot information of session 1 may include the connection information between the electronic device 100 and the electronic device 200. Then, the electronic device 100 can request to connect with the electronic device 200 and instruct the electronic device 200 to call the course video playback application. The electronic device 100 can pass the session identifier of session 1 to the electronic device 200. The electronic device 200 determines that it is in the communication connection of session 1. The electronic device 200 can store the activity information of the course video playback application (such as the course identifier and playback progress of the course video) in the session 1 storage sandbox 711 of the distributed storage system 710.
[0263] The method for determining the session 2 storage sandbox 712 when the electronic device 400 establishes session 2 can refer to the method for determining the session 1 storage sandbox 711 when the electronic device 100 establishes session 1. When the electronic device 200 determines that it is in the communication connection of session 2, it can perform read and write operations on the session 2 storage sandbox 712.
[0264] The multiple storage devices in the distributed storage system 710 may include one or more electronic devices in the main device and sub-device of each session. For example, the multiple storage devices in the distributed storage system 710 may include electronic device 100 and electronic device 200. Optionally, the multiple storage devices in the distributed storage system 710 may also include electronic devices other than the main device and sub-device of each session. For example, electronic device 100 and electronic device 200 are both connected to the same router. In a scenario where electronic device 100 provides an application through answers to exercises to instruct electronic device 100 to call a course video playback application, electronic device 100 may instruct the router connected to itself to allocate a storage sandbox for session 1. Session 1 storage sandbox 711 may exist in the router. The router can be a storage device in the distributed storage sandbox 710.
[0265] In a possible implementation, the electronic device 100 may perform read and write operations on the session 1 storage sandbox in the router. The electronic device 200 may send the activity information of the course video playback application to the electronic device 100. Further, the electronic device 100 may store the received activity information of the course video playback application in the session 1 storage sandbox 711.
[0266] In another possible implementation, the electronic device 100 may send the location of the session 1 storage sandbox 711 in the router to the electronic device 200. The electronic device 200 may obtain the snapshot information of the session 1 from the session 1 storage sandbox 711, and store the activity information of the course video playback application in the session 1 storage sandbox 711. In this way, if the electronic device 100 leaves the process of instructing the electronic device 200 to play the course video through the exercise answer providing application, the electronic device 200 may continue to update the snapshot information of the session 1.
[0267] In some embodiments, the master device and the slave device in a session can still allocate local Figure 6 and Figure 7 The storage sandbox shown in the figure stores the snapshot information of the session in the local storage sandbox.
[0268] The embodiment of the present application does not limit the method for establishing communication connection between the master device and the sub-device in each session and the storage device in the distributed storage system 710. For details, reference may be made to the implementation method of the distributed storage technology in the prior art.
[0269] Through the above distributed storage system, the main device and the sub-device in a session can easily obtain and record the snapshot information of this session. In addition, the storage device in the distributed storage system can be a device with better computing performance and storage performance than multiple electronic devices related to a session. Using the above distributed storage system, multiple electronic devices related to a session can save their own computing resources and storage resources.
[0270] In some embodiments, when an electronic device requests other electronic devices to work with it through an application, the electronic device can prioritize the electronic devices it has searched for, and can select the electronic device with the highest priority that can work with it.
[0271] The following is an introduction to a method for an electronic device to select an electronic device to work with the electronic device provided in an embodiment of the present application.
[0272] Here, the electronic device 100 is specifically introduced as an example of requesting other electronic devices to play a course video by providing a service through an exercise answer. Among them, the electronic device 100 can establish a session 1. The session 1 can be a session based on the exercise answer providing application when the electronic device 100 logs in to the current device account.
[0273] First, the electronic device 100 can obtain the snapshot information of session 1 from the storage sandbox of session 1. If the snapshot information of session 1 contains the connection information of the electronic device 100 requesting other electronic devices to play the course video, the electronic device 100 can instruct the historical collaborative device to call the historical collaborative application to play the course video according to the connection information. For example, the snapshot information of session 1 includes Figure 6 The session 1 shown stores the first record of the snapshot information in sandbox A. The first record may indicate that the electronic device 100 instructs the electronic device 200 to call the course video playback application. Then the historical collaborative device is the electronic device 200. The historical collaborative application is the course video playback application. If the electronic device 200 is in an available state, the electronic device 100 may instruct the electronic device 200 to call the course video playback application. Optionally, if the electronic device 200 cannot call the course video playback application, the electronic device 200 may call other applications that can be used to play course videos (such as the Huawei video application) to play the course video. The electronic device 200 being in an available state may indicate that the electronic device can establish a communication connection with other electronic devices and run applications installed by itself.
[0274] In some embodiments, if the electronic device 100 finds multiple historical collaborative devices that are instructed to play the course video from the snapshot information of session 1, and these multiple historical collaborative devices are all in an available state, the electronic device 100 can prioritize these multiple historical collaborative devices according to the device type. The device type can indicate the privacy of the device. The lower the privacy of the electronic device, the higher the ranking. The privacy of different types of devices can be TV = speaker < tablet < watch = mobile phone. For example, these multiple historical collaborative devices include a TV and a tablet, and the electronic device 100 can give priority to instructing the TV to call the course video playback application. Optionally, the device connection program of the electronic device 100 includes a priority ranking of the device. The priority ranking can be, for example, TV, tablet, mobile phone, smart car. Among them, the TV has the highest priority ranking. If these multiple historical collaborative devices include a TV and a tablet, the electronic device 100 can give priority to instructing the TV to call the course video playback application.
[0275] The electronic device 100 may require the user to confirm on the electronic device with high privacy when requesting the electronic device with high privacy to work together. The electronic device with lower privacy is ranked higher. The electronic device 100 may give priority to the electronic device with lower privacy to simplify the user operation during the connection process and improve the efficiency of device connection.
[0276] In some embodiments, if the electronic device 100 finds the above historical collaborative device from the snapshot information of session 1 but the historical collaborative device is in an unavailable state, the electronic device 100 can prioritize the electronic devices that it has searched for but have never played the course video under its own instructions. Among them, the priority ranking of the searched electronic devices can be from front to back: electronic devices with the same device account and the same device type as the historical collaborative device, electronic devices with the same device account as the historical collaborative device but different device type, electronic devices with different device accounts as the historical collaborative device but the same device type, and electronic devices with different device accounts and different device types as the historical collaborative device.
[0277] Among them, if there are multiple electronic devices with the same device account as the historical collaborative device but different device types, these multiple electronic devices can be prioritized according to the above privacy level, or prioritized according to the order defined in the device connection program of the electronic device 100. If there are multiple electronic devices with different device accounts and different device types from the historical collaborative device, these multiple electronic devices can also be prioritized according to the above privacy level, or prioritized according to the order defined in the device connection program of the electronic device 100. The electronic device 100 can instruct the electronic device with the highest priority and capable of collaborative work to play the course video.
[0278] In some embodiments, if the electronic device 100 does not find the historical collaborative device instructed to play the course video from the snapshot information of session 1, the electronic device 100 can search the collaborative record storage module described in the aforementioned embodiment to see whether the electronic device 100 has instructed other electronic devices to perform the same type of collaborative work (i.e., instruct other electronic devices to play the video). For example, the electronic device 100 instructs the electronic device 200 to call the Huawei video application through an application (an application other than the exercise answer providing application). The electronic device 100 can provide the user with the option of connecting to the electronic device 200 and calling the Huawei video application to play the course video. Alternatively, the electronic device 100 can directly instruct the electronic device 200 to call the Huawei video application to play the course video.
[0279] In some embodiments, the electronic device 100 can recommend the electronic devices it has searched for to the user in the order of the above priority ranking, and receive a user operation for selecting a device. The electronic device 100 can instruct the selected electronic device to call a course video playback application.
[0280] From the above method of selecting electronic devices for collaborative work, it can be seen that the main device in a session can give priority to requesting historical collaborative devices to work together again. This makes it convenient for users to call their accustomed electronic devices and enter familiar application scenarios more quickly, improving the user experience. In addition, if the historical collaborative device is not available, the main device can select the electronic device that is ranked first and can work together according to the above priority sorting to work together.
[0281] In some embodiments, a communication system composed of a master device and a sub-device of a session may include a multi-level connection. The master device may store the connection information between each node in the multi-level connection in a storage sandbox of the session. Based on the connection information between each node, the master device may restore the multi-level connection.
[0282] Below Fig. 9 The communication system 800 shown is taken as an example to introduce the method for establishing a multi-level connection of an electronic device provided in an embodiment of the present application.
[0283] like Fig. 9 As shown, the communication system 800 may include an electronic device 810, an electronic device 820, an electronic device 830, an electronic device 840, and an electronic device 850. Among them, the electronic device 810 may have an application 811 installed. The electronic device 820 may have an application 821 installed. The electronic device 830 may have an application 831 installed. The electronic device 840 may have an application 841 installed. The electronic device 850 may have an application 851 installed.
[0284] The communication system 800 may be composed of a master device and sub-devices of a session 801. The master device of a session may be used to establish a connection relationship between multiple electronic devices working in cooperation in the session. The session identifier of the session may be determined by the device account of the master device and the application identifier of the application on the master device requesting other electronic devices to work in cooperation. A session may have only one master device. The sub-devices of a session may be electronic devices working in cooperation with the master device in the session. Fig. 9 As shown, the main device of session 801 is electronic device 810 , and the sub-devices include electronic device 820 , electronic device 830 , electronic device 840 , and electronic device 850 .
[0285] In session 801, electronic device 810 instructs electronic device 820 to call application 821 through application, and instructs electronic device 840 to call application 841. Electronic device 820 instructs electronic device 830 to call application 831 through application 821. Electronic device 840 instructs electronic device 850 to call application 851 through application 841. Among them, an electronic device can store its own way of opening an application. The above-mentioned way of opening an application can include passive opening and active opening. Passive opening can mean that the electronic device receives an instruction from other electronic devices to instruct to call this application, and opens this application. Active opening can mean that the electronic device receives a user operation for opening this application (such as a user operation acting on the application icon of this application), and opens this application. In the case where the opening method of electronic device 820 to open application 821 is the above-mentioned passive opening, the connection information of electronic device 820 instructing electronic device 830 to call application 831 through application 821 is included in the snapshot information of session 801. If electronic device 820 actively opens application 821 and instructs electronic device 830 to call application 831 through application 821, electronic device 820 can create a session as a master device and store the connection information with electronic device 830 in the storage sandbox of the session created by itself.
[0286] The communication system 800 includes two levels of connection. The first level connection is the connection between the main device (i.e., electronic device 810) and the electronic devices in the first layer nodes (such as electronic device 820, electronic device 840). The second level connection is the connection between the electronic devices in the first layer nodes and the electronic devices in the second layer nodes. For example, the connection between electronic device 820 and electronic device 830, and the connection between electronic device 840 and electronic device 850.
[0287] In a possible implementation, the electronic device 810 may store the following in the storage sandbox of session 1: Fig. 9 The connection information table 812 shown. The connection information table 812 may include connection information between each node in the session 801. Here, the main device and the sub-device in the session are all locally allocated storage sandboxes for this session. That is, the above-mentioned connection information table 812 may store the storage sandbox allocated for session 1 in the electronic device 810. For example, the fields in the connection information table 812 may include the source application in the source device and the target application in the destination device. The source device may represent an electronic device in the primary connection that instructs other electronic devices to call related applications. The source application may represent an application in the source device that is used to instruct other electronic devices to call related applications. The destination device may represent an electronic device in the primary connection that receives a call instruction to call a related application. The destination application may represent an application called by the destination device receiving the call instruction.
[0288] It should be noted that the data in the connection information table may specifically be the device identifier of the electronic device and the application identifier of the application. If the above application can provide a service in a distributed application, the application identifier of the application may include the application package name of the distributed application and the service package name of the service. If the above application is a traditional application, the application identifier of the application may be the application package name of the traditional application. Fig. 9 In each connection information identifier shown, the electronic device number and the application number are used to represent the device identifier of the electronic device and the application identifier of the application respectively. The above electronic device number and application number should not constitute a limitation to this application.
[0289] It can be seen from the connection information table 812 that when the source device is the electronic device 810 and the source application is the application 811, the destination device may be the electronic device 820 and the electronic device 840. Among them, the destination application in the electronic device 820 is the application 821. The destination application in the electronic device 840 is the application 841. When the source device is the electronic device 820 and the source application is 821, the destination device may be the electronic device 830. The destination application in the electronic device 830 is the application 831. When the source device is the electronic device 840 and the source application is 841, the destination device may be the electronic device 850. The destination application in the electronic device 850 is the application 851.
[0290] When receiving an instruction for restoring the connection relationship indicated by the snapshot information of the session 801, the electronic device 810 can restore the multi-level connection in the communication system 800 according to the connection information table 812. The instruction for restoring the connection relationship indicated by the snapshot information of the session 801 can be automatically triggered by the application 811, or can be triggered by a user operation in the application 811 (e.g., Figure 3B The user operation of the video output device selection control 242 is shown). The embodiment of the present application does not limit the above instructions.
[0291] Specifically, the electronic device 810 can obtain the above-mentioned connection information table 812 from the storage sandbox of the session 801. According to the connection information table 812, the electronic device 810 can be connected to the electronic device in the first layer node, and instruct the electronic device in the first layer node to call the corresponding destination application. The electronic device 810 can also send the connection information between the electronic device in the first layer node and the electronic device in the subsequent layer node of the first layer node to the electronic device in the first layer node. For example, the electronic device 810 can be connected to the electronic device 820, and instruct the electronic device 820 to call the application 821 through the application 811. The electronic device 810 can also send the connection information between the electronic device 820 and the electronic device 830 to the electronic device 820. Then, the electronic device 820 can be connected to the electronic device 830, and instruct the electronic device 830 to call the application 831 through the application 821.
[0292] In a possible application scenario, electronic device 810 is a mobile phone. Application 811 is the exercise answer providing application in the aforementioned embodiment. Electronic device 820 is a television. Application 821 is the course video playback application in the aforementioned embodiment. Electronic device 830 is a speaker. Application 831 is an audio playback application. The mobile phone can instruct the television to call the course video playback application through the exercise answer providing application, and send the connection information between the television and the speaker to the television. According to the connection information between the television and the speaker, the television instructs the speaker to call the audio playback application through the course video playback application. In the application scenario implemented by the collaborative work of the mobile phone, television, and speaker, the mobile phone can be used to provide exercise answers. The television can display the user interface of the course video. The speaker can play the audio of the course video.
[0293] If in session 801, electronic device 830 is also connected to an electronic device, and instructs the electronic device to call a corresponding application through application 831, connection information table 812 may also include connection information between electronic device 830 and the electronic device. In addition to the connection information between electronic device 820 and electronic device 830, electronic device 810 may also send the connection information between electronic device 830 and the electronic device to electronic device 820. Further, electronic device 820 may send the connection information between electronic device 830 and the electronic device to electronic device 830. In this way, electronic device 830 may be connected to the electronic device.
[0294] In some embodiments, a sub-device of a session may store connection information between itself and electronic devices in subsequent hierarchical nodes. For example, electronic device 820 is a sub-device of session 801. Electronic device 820 may store Fig. 9 The connection information table 822 shown. It can be seen from the connection information table 822 that when the source device is the electronic device 820 and the source application is the application 821, the destination device can be the electronic device 830. The destination application in the electronic device 830 is the application 831. The connection information table 822 can be stored in the storage sandbox that the electronic device 820 locally allocates for the session 801. When receiving an instruction from the application 811 in the electronic device 810 to call the application 821, the electronic device 820 can call the application 821 and connect with the electronic device 830 according to the connection information table 822, instructing the electronic device 830 to call the application 831.
[0295] The connection information table 822 can also be used for the same type of collaborative recommendation. Specifically, the electronic device 820 may include the collaborative record storage module in the aforementioned embodiment. The electronic device 820 may store the data of the collaborative work between the electronic device 820 and the electronic device 830 in the collaborative record storage module. These data may include the application identifiers of the applications respectively called by the electronic device 820 and the electronic device 830 when working in collaboration (such as the application identifiers of the application 821 and the application 831), and the type of action performed by the electronic device 830 calling the application 831. If the electronic device 820 requests other electronic devices to work in collaboration through the installed application 823, and the type of the collaborative work is the same as the type of action performed by the electronic device 820 instructing the electronic device 830, the electronic device 820 may instruct the electronic device 830 to call the application 831 through the application 823. The type of the above-mentioned collaborative work can be determined by the field "action" in the aforementioned device connection program. Exemplarily, the above-mentioned application 821 is a course video playback application. Application 831 is an audio playback application. The collaborative record storage module in the electronic device 820 may include the data of the collaborative work of the electronic device 820 instructing the electronic device 830 to call the application 831 through the application 821. When electronic device 820 requests other electronic devices to play audio through the Huawei video application, electronic device 820 can find the data of the collaborative work of electronic device 820 instructing electronic device 830 to call application 831 through application 821 from the collaborative record storage module. Then, electronic device 820 can instruct electronic device 830 to call application 831 to play audio through the Huawei video application.
[0296] The connection process of electronic device 810 instructing electronic device 840 to call application 841 through application 811, and electronic device 840 instructing electronic device 850 to call application 851 through application 841 can refer to the connection process of electronic device 810, electronic device 820 and electronic device 830 in the aforementioned embodiment, which will not be repeated here. The connection information between electronic devices in the first layer node and subsequent layer nodes in the connection information table 812 can be transmitted to electronic device 810 by reporting layer by layer. For example, in session 801, the connection information between electronic device 820 and electronic device 830 can be sent by electronic device 820 to electronic device 810. If in session 801, electronic device 830 is also connected to an electronic device. Electronic device 830 can send its connection information with this electronic device to electronic device 820. Further, electronic device 820 can send the connection information between electronic device 830 and this electronic device to electronic device 810.
[0297] In some embodiments, the electronic device 810 can restore the above-mentioned multi-level connections in stages. For example, the electronic device 810 can restore the first-level connection first. The first-level connection may include: a connection between the electronic device 810 and the electronic device 820, and a connection between the electronic device 810 and the electronic device 840. In response to a user operation acting on an electronic device in a first-layer node for requesting other electronic devices to work in collaboration, the electronic device 810 may instruct the electronic device in the first-layer node to restore the second-level connection. The second-level connection may include: a connection between the electronic device 820 and the electronic device 830, and a connection between the electronic device 840 and the electronic device 850.
[0298] In some embodiments, the electronic device 910 can restore a portion of the multi-level connections. For example, in response to a user operation on the electronic device 810 for requesting the electronic device 820 to work in coordination, the electronic device 810 can restore the Fig. 9 The connection between the electronic device 810 and the electronic device 820 and the connection between the electronic device 820 and the electronic device 830 are shown. The connection between the electronic device 810 and the electronic device 840 can be restored after the electronic device 810 receives a corresponding user operation.
[0299] In some embodiments, the storage sandbox of session 801 may also be located in a distributed storage system. Both the master device and the sub-device in session 801 may perform read and write operations on the storage sandbox of session 801 in the distributed storage system. The implementation method of distributed storage collaboration to allocate storage sandboxes for session 801 may refer to the aforementioned Figure 8 The embodiments shown will not be described in detail here.
[0300] Depend on Fig. 9 The communication system shown is not limited to Figure 3F In the single-stage connection shown, the master device in a session can store the connection information of the multi-stage connection. The master device can restore the multi-stage connection based on the connection information of the multi-stage connection. This can simplify the user operation when establishing connections between multiple electronic devices, making it easier for users to call their favorite electronic devices and enter familiar application scenarios more quickly.
[0301] In some embodiments, when a master device in a session restores the connection relationship between multiple electronic devices in the session based on the snapshot information of the session, there may be problems such as circular calling and unavailability of historical collaborative devices. The above-mentioned problem of circular calling may mean that the source device instructs the destination device to call the destination application through the source application. The above-mentioned destination device in turn instructs the above-mentioned source device to call the above-mentioned source application through the destination application. The above-mentioned circular calling may cause the connection information between two electronic devices to be circulated between the two devices, wasting the computing resources and storage resources of the two electronic devices.
[0302] Below Fig.10 The communication system 900 shown is used as an example to introduce a method for avoiding the above-mentioned circular calling problem during the device connection process, as well as a method for transmitting connection information when the historical collaborative device is unavailable.
[0303] like Fig.10 As shown, the communication system 900 may include an electronic device 910, an electronic device 920, an electronic device 930, an electronic device 940, an electronic device 950, an electronic device 960, an electronic device 970, an electronic device 980, an electronic device 990, and an electronic device 9100. Among them, the electronic device 910, the electronic device 920, the electronic device 930, the electronic device 940, the electronic device 950, the electronic device 960, the electronic device 970, the electronic device 980, the electronic device 990, and the electronic device 9100 may be installed with application 911, application 921, application 931, application 941, application 951, application 961, application 971, application 981, application 991, and application 9101, respectively.
[0304] The communication system 900 may be composed of a master device and sub-devices of the session 901. As can be seen from the aforementioned embodiment, the electronic device 910 is the master device of the session 901. All electronic devices in the communication system 900 except the electronic device 910 are sub-devices of the session 901. The method for establishing a connection relationship between electronic devices in the communication system 900 may refer to the aforementioned embodiment. The data and functions contained in the connection information table 912 in the electronic device 910, the connection information table 922 in the electronic device 920, the connection information table 932 in the electronic device 930, the connection information table 952 in the electronic device 950, the connection information table 972 in the electronic device 970, and the connection information table 920 in the electronic device 980 may all refer to the aforementioned embodiment. Fig. 9 The embodiments shown in the figure are not described in detail here.
[0305] In some embodiments, according to the connection information table 912, the electronic device 910 can use the application 911 to instruct the electronic device 950 to call the application 951. The electronic device 910 can also send the connection information of the electronic device 950 as the source device to the electronic device 950. The connection of the electronic device 950 as the source device may include: the electronic device 950 instructs the electronic device 960 to call the application 961 through the application 951, and the electronic device 950 instructs the electronic device 910 to call the application 911 through the application 951. Then, in the session 901, the electronic device 910 instructs the electronic device 950 to call the application 951 through the application 911, and the electronic device 950 instructs the electronic device 910 to call the application through the application 951, which will lead to the above-mentioned circular calling problem. Among them, the electronic device 910 sends a call instruction to the electronic device 950 through the application 911, and the electronic device 950 sends a call instruction to the electronic device 910 through the application 951.
[0306] In order to avoid the problem of the above-mentioned circular call, the main device and the sub-device in a session can store their own hierarchical identification. The hierarchical identification of an electronic device can be determined by the connection distance between the electronic device and the main device. The connection distance can represent the number of devices between an electronic device and the main device. The more device data there is between an electronic device and the main device, the greater the connection distance between the electronic device and the main device, and the higher the hierarchical identification of the electronic device. In a possible implementation, in a session, when an electronic device with a high hierarchical identification indicates that an electronic device with a low hierarchical identification calls an application, a call instruction can be sent to the electronic device with a low hierarchical identification. If the electronic device with a low hierarchical identification recognizes that the application called by the call instruction indicates that it has been called in a session, the electronic device with a low hierarchical identification may not execute the call instruction (such as abandoning the call instruction) and send a response message to the electronic device with a high hierarchical identification. The response message can be used to indicate that the above call instruction is an invalid instruction. In another possible implementation, the electronic device with a high hierarchical identification can find out whether the destination device is a connection information of an electronic device with a hierarchical identification lower than its own hierarchical identification from the connection information of itself as a source device. If it exists, the electronic device with a higher level identifier can further determine whether the target application in the connection information is an application that has been called in this session. If so, the electronic device with a higher level identifier may not send a call instruction to the electronic device with a lower level identifier according to the connection information. In this way, the above-mentioned circular call problem can be avoided between two electronic devices in a session, thereby saving computing resources and storage resources of the electronic devices.
[0307] Exemplarily, the layer identification of the main device, that is, electronic device 910, can be layer 0. The layer identification of the sub-devices (such as electronic device 920, electronic device 950, electronic device 970) directly connected to the main device in session 901 can be layer 1. The layer identification of the sub-devices (such as electronic device 930, electronic device 960, electronic device 980) directly connected to the electronic device with the layer identification of layer 1 in session 901 can be layer 2. The layer identification of the sub-devices (such as electronic device 940, electronic device 990) directly connected to the electronic device with the layer identification of layer 2 in session 901 can be layer 3. By analogy, electronic devices with layer identifications of layer 4, layer 5, etc. in a session can be determined.
[0308] It can be seen from the connection information table 952 that the electronic device 950 can obtain the connection information that it is the source device and the electronic device 910 is the destination device: the electronic device 950 instructs the electronic device 910 to call the application 911 through the application 951. Since the application 911 is an application that has been called in the session 901. The electronic device 950 sends a call instruction to call the application 911 to the electronic device 910 through the application 951. The electronic device 910 can determine that the application 911 is an application that has been called in the session 901, and the sending device of the call instruction is an electronic device with a higher level identification than itself. The electronic device 910 can discard the call instruction and send the above-mentioned response message to the electronic device 950. Alternatively, the electronic device 950 can determine that the application 911 is an application that has been called in the session 901, and the receiving device of the call instruction is an electronic device with a lower level identification than itself. The electronic device 950 can delete the connection information between itself and the electronic device 910 in the connection information table 952.
[0309] In some embodiments, the connection information table 972 in the electronic device 970 may include: connection information between the electronic device 970 and the electronic device 980, and connection information between the electronic device 980 and the electronic device 990. That is, in the session 901, the electronic device 970 once instructed the electronic device 980 to call the application 981 through the application 971. The electronic device 980 once instructed the electronic device 990 to call the application 991 through the application 981. When the electronic device 970 requested the electronic device 980 to call the application 981 through the application 971, the electronic device 970 found that the electronic device 980 was in an unavailable state. For example, the electronic device 980 is turned off. The electronic device 970 cannot connect to 980. The electronic device 970 can select the electronic device 9100 according to the method of selecting an electronic device to work with itself in the aforementioned embodiment. Among them, in the session 901, the electronic device 970 has never been connected to the electronic device 9100. The connection information between the electronic device 970 and the electronic device 9100 cannot be found in the above connection information table 912 and the connection information table 972.
[0310] When electronic device 970 is connected to electronic device 9100 and instructs the electronic device to call application 9101 through application 971, electronic device 970 can add the connection information between itself and electronic device 9100 to the connection information table 972 and send the connection information to electronic device 910. Electronic device 910 can add the connection information between electronic device 970 and electronic device 9100 to connection information table 912. In addition, electronic device 970 can pass the session identifier of session 901 to electronic device 9100.
[0311] Application 9101 may be the same application as application 981 (for example, both are course video playback applications), or application 9101 and application 981 may be different applications, but the two applications may provide the same service. For example, application 981 is a course video playback application. Application 9101 is a Huawei video application. Both applications may provide video playback services.
[0312] Since electronic device 980 is unavailable, electronic device 970 may terminate the transmission of connection information that the source device is electronic device 980. That is, electronic device 980 may not send the connection information between electronic device 980 and electronic device 990 to electronic device 9100 to avoid inappropriate restoration of the device connection relationship and affecting the user experience.
[0313] The connection information in a session snapshot can be based on the aforementioned Fig. 9 and Fig.10 The activity information of the application in the snapshot information of a session can also be transmitted according to the aforementioned Fig. 9 and Fig.10 The method shown is passed. I will not repeat it here.
[0314] In some embodiments, the session identifier of a session can be jointly determined by the device account of the main device, the application identifier of the application running on the main device requesting the sub-device to work together, and the application account of the application running on the main device requesting the sub-device to work together. In other words, the device account on the main device remains unchanged. The main device requests the sub-device to work together through an application. If different application accounts are logged in to this application successively, the main device can create different sessions. A session can be a session based on an application account in this application when the main device logs in to the current device account. The snapshot information of a session can refer to the aforementioned embodiment. By combining the application account to identify the session identifier of the session, the main device can distinguish the activity information of the application called on the sub-device when the above-mentioned application is logged in with different application accounts.
[0315] For example, the main device instructs the sub-device to call the course video playback application through the exercise answer providing application in the aforementioned embodiment. When the application account logged in on the exercise answer providing application is user A and user B, the playback progress of the course video in the course video playback application on the sub-device is different. Under the above different application accounts, the activity information of calling the application on the sub-device can be stored in the storage sandbox of different sessions respectively.
[0316] Optionally, the activity information of calling the application on the sub-device can be associated with the application account and stored in the cloud server. The sub-device can obtain the activity information associated with the application account from the cloud server to reply to the application status called by itself.
[0317] The embodiments of the present application do not limit the types of electronic devices mentioned in the above embodiments. The electronic devices in the above embodiments may be, for example, mobile phones, tablet computers, televisions, wearable electronic devices, car computers, laptop computers, handheld computers, netbooks, personal digital assistants (PDAs), augmented reality (AR) devices, virtual reality (VR) devices, artificial intelligence (AI) devices, etc., and may also be Internet of Things (IOT) devices or smart home devices, such as speakers, air conditioners, refrigerators, water heaters, lamps, etc.
[0318] The following is a schematic structural diagram of an electronic device 100 provided in an embodiment of the present application.
[0319] like Fig.11 As shown, the electronic device 100 may 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, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0320] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0321] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (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 may be independent devices or integrated into one or more processors.
[0322] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0323] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0324] The USB interface 130 is an interface that complies with the USB standard specification, and specifically 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 electronic device 100, and can also be used to transfer data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.
[0325] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.
[0326] The power management module 141 is used to connect the battery 142, the charging management module 140 and 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 screen 194, the camera 193, and the wireless communication module 160.
[0327] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0328] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0329] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0330] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the 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. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
[0331] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0332] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0333] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0334] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0335] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.
[0336] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto 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 passes the electrical signal to the ISP to be converted 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 an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0337] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0338] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0339] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0340] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0341] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0342] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0343] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
[0344] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.
[0345] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.
[0346] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals.
[0347] The earphone jack 170D is used to connect a wired earphone.
[0348] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
[0349] The gyro sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.
[0350] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
[0351] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover can be automatically unlocked.
[0352] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.
[0353] The distance sensor 180F is used to measure the distance. The electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
[0354] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector such as a photodiode.
[0355] The ambient light sensor 180L is used to sense the ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
[0356] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.
[0357] The temperature sensor 180J is used to detect the temperature.
[0358] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. 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 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.
[0359] Bone conduction sensor 180M can obtain vibration signals.
[0360] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.
[0361] Motor 191 can generate vibration prompts.
[0362] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0363] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to or separated from the electronic device 100 by inserting it into or removing it from the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
[0364] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.< / studynotepadserviceability>
Claims
1. A device management method, characterized in that: The method is applied to a communication system, the communication system comprising a first electronic device and a second electronic device, the first electronic device having a first application installed therein, and the second electronic device having an application for providing a first service installed therein; The method comprises: The first electronic device receives a first operation on the first application, where the first operation is used to call the first service provided by the second electronic device; In response to the first operation, the first electronic device obtains first snapshot information of the first session, where the first snapshot information includes first connection information, and the first connection information includes a device identifier of the second electronic device and an identifier of the first service; The first electronic device sends a first instruction to the second electronic device according to the first connection information, where the first instruction is used to instruct the second electronic device to provide the first service; The second electronic device receives the first instruction and provides the first service.
2. The method according to claim 1, characterized in that The method further comprises: The first electronic device receives a second instruction, where the second instruction is used to instruct the first electronic device to call the second electronic device to provide the first service through the first application; The first electronic device creates the first session and stores the first snapshot information; The first electronic device sends the first instruction to the second electronic device according to the second instruction.
3. The method according to claim 1 or 2, characterized in that: The first session has a first session identifier, which is determined by a device account of the first electronic device and an application identifier of the first application; the first session identifier is used by the first electronic device to obtain the first snapshot information; The first instruction includes the first session identifier.
4. The method according to claim 1 or 2, characterized in that: The second electronic device is installed with a second application, the second application is used to provide the first service, the first connection information further includes an application identifier of the second application, and the first instruction is used to instruct the second electronic device to run the second application to provide the first service; The second electronic device provides the first service, and the method includes: The second electronic device runs the second application to provide the first service.
5. The method according to claim 1 or 2, characterized in that: The second electronic device is installed with a second application and a third application, and the second application and the third application are both used to provide the first service. After the second electronic device receives the first instruction, the method further includes: The second electronic device determines whether the second application is available; If it is determined that the second application is available, the second electronic device runs the second application to provide the first service; If it is determined that the second application is not available, the second electronic device determines whether the third application is available; If it is determined that the third application is available, the second electronic device runs the third application to provide the first service.
6. A device management method applied to a communication system, characterized in that: The communication system includes a first electronic device and a second electronic device, the first electronic device having a first application installed therein, and the second electronic device having an application for providing a first service installed therein; The method comprises: The first electronic device receives a first operation on a first application, where the first operation is used to call a first service provided by the second electronic device; In response to the first operation, the first electronic device obtains first snapshot information of the first session, the first snapshot information includes first connection information, the first connection information includes a device identifier of the second electronic device and an identifier of the first service; the second electronic device is installed with an application for providing the first service; The first electronic device sends a first instruction to the second electronic device according to the first connection information, where the first instruction is used to instruct the second electronic device to provide the first service.
7. The method according to claim 6, characterized in that The method further comprises: The first electronic device receives a second instruction, where the second instruction is used to instruct the first electronic device to call the second electronic device to provide the first service through the first application; The first electronic device creates the first session and stores the first snapshot information; The first electronic device sends the first instruction to the second electronic device according to the second instruction.
8. The method according to claim 6 or 7, characterized in that: The first session has a first session identifier, which is determined by a device account of the first electronic device and an application identifier of the first application; the first session identifier is used by the first electronic device to obtain the first snapshot information; The first instruction includes the first session identifier.
9. The method according to claim 6 or 7, characterized in that: The second electronic device is installed with a second application, the second application is used to provide the first service, the first connection information also includes an application identifier of the second application, and the first instruction is used to instruct the second electronic device to run the second application to provide the first service.
10. The method according to claim 6 or 7, characterized in that: The method further comprises: The first electronic device receives and stores first activity information sent by the second electronic device, where the first activity information is included in the first snapshot information; the first activity information includes data for indicating that a user interface of an application providing the first service presents content at a first moment in the process of the second electronic device providing the first service; the first moment is any moment in the process of the second electronic device providing the first service.
Citation Information
Patent Citations
Information processing method and electronic device
CN106302976A
A method and apparatus for searching for a host program
CN109710832A
Function calling method and device, terminal device and storage medium
CN110309006A
Application function implementation method and electronic device
CN111684778A
Intelligent service sharing method and device, equipment and storage medium
CN112702306A