Method and electronic device for multi-device data collaboration
By displaying a document editing application on a second electronic device and sending notification messages to the first electronic device, near-field communication technology is used to achieve data collaboration between multiple devices, solving the problem of the limited document creation methods on personal computers and improving user experience and the flexibility of data collaboration.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2020-08-06
- Publication Date
- 2026-07-07
AI Technical Summary
In existing technologies, the document creation method based on personal computers is limited, requiring users to sit in front of the computer for long periods of time to input, which cannot meet the needs of changing scenarios and makes it difficult to achieve convenient data collaboration between multiple devices.
By displaying the first document editing application on the second electronic device and sending notification messages to the first electronic device, data collaboration is established. Near Field Communication technology is used to realize communication connections between different devices, supporting the switching of multiple document editing applications and data recovery, thus optimizing the user operation process.
It improves the convenience and applicability of document creation for users in various scenarios, reduces the operational difficulty of data collaboration, avoids data loss, and enhances the user experience.
Smart Images

Figure CN114065706B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a method and electronic device for multi-device data collaboration. Background Technology
[0002] Office work is the primary use case for personal computers (PCs), and document creation is one of the main office scenarios. Currently, the main method of document creation involves users sitting in front of a computer and using a keyboard or stylus to input text into relevant document editing applications, such as Word / TXT and other software with long text editing capabilities.
[0003] Currently, the methods for editing long texts on personal computers are limited and rely on users sitting in front of the computer for extended periods of time to input text. This makes it impossible to change the creative environment and meet users' needs for adapting to different document creation scenarios. Summary of the Invention
[0004] This application provides a method and electronic device for multi-device data collaboration, which can meet the needs of users for changing scenarios in document creation.
[0005] In a first aspect, embodiments of this application provide a method for multi-device data collaboration, applied to a second electronic device on which a first document editing application can run. In response to a first operation on the first document editing application on the second electronic device, the second electronic device displays a first document editing box of the first document editing application on the second electronic device; the second electronic device sends a first notification message to the first electronic device, the first notification message being used to establish data collaboration between the first electronic device and the second electronic device; the second electronic device receives first text data sent by the first electronic device and displays the first text data on the first document editing box.
[0006] Using the above method, the second electronic device can send a first notification message to the first electronic device in response to a first operation on the first document editing application on the second electronic device. This enables the first electronic device to establish data collaboration with the second electronic device. This method of establishing data collaboration is simple and convenient, effectively reducing the operational difficulty of establishing data collaboration and improving the convenience and applicability for users creating documents in various scenarios. It eliminates the need for users to simultaneously open corresponding data collaboration interfaces on both the second and first electronic devices to actively establish a data collaboration scenario, thus improving the user experience.
[0007] One possible implementation, considering the user's personalized customization of the first document editing application that triggers the data collaboration scenario, and to avoid accidental triggering of the data collaboration scenario when not in use, is to configure a document editing whitelist for the document editing application, so that the first document editing application is the application configured in the user's whitelist. This improves the user experience of data collaboration.
[0008] One possible implementation is that the first operation includes at least one of the following: opening the first document editing application, clicking the document editing box in the first document editing application, switching the first document editing application, and switching the document editing box in the first document editing application.
[0009] Through the above method, the second electronic device can determine the user's desired document editing scenario based on the user's operations in the first document editing application, thereby triggering the establishment of data collaboration with the first electronic device. This reduces the cumbersome operations caused by the user actively triggering the data collaboration scenario. In addition, for users who have never used the data collaboration scenario before, data collaboration with the first electronic device can be triggered seamlessly, which is conducive to the user successfully establishing the data collaboration scenario and improving the user's experience of using data collaboration.
[0010] In one possible implementation, before the second electronic device sends the first notification message to the first electronic device, a first device search interface may be displayed on the second electronic device; the first device search interface is used to display at least one electronic device that has established a communication connection with the second electronic device; in response to a confirmation operation performed by the first electronic device among the at least one electronic device on the first device search interface, the second electronic device determines the first electronic device that sent the first notification message.
[0011] Using the above method, considering that the second electronic device may establish a communication connection with at least one electronic device, the second electronic device can display at least one electronic device to the user by displaying the first device search interface. In response to the confirmation operation of the first electronic device among the at least one electronic device on the first device search interface, the first electronic device selected by the user can be determined. Thus, based on the user's needs, data collaboration can be established between the second electronic device and the first electronic device, improving the flexibility and adaptability of data collaboration.
[0012] One possible implementation involves receiving a communication connection request from the first electronic device; the communication connection request is implemented using near-field communication technology; establishing a communication connection with the first electronic device; and displaying a first connection message on the second electronic device; the first connection message is used to prompt the user that the second electronic device has established a communication connection with the first electronic device.
[0013] Near-field communication (NFC) technology enables communication connections between a first electronic device and a second electronic device, eliminating the need for the first and second electronic devices to be on the same local area network to establish a communication connection. This reduces the difficulty of establishing communication connections between different electronic devices, thereby improving the compatibility of establishing data collaboration between different electronic devices and increasing the diversity and flexibility of scenarios for achieving data collaboration.
[0014] In one possible implementation, after the second electronic device sends a first notification message to the first electronic device, it can also receive a first response message sent by the first electronic device. The first response message is used to confirm that the first electronic device and the second electronic device have established data cooperation; thus, the second electronic device can display the first response message on the second electronic device.
[0015] Using the above method, the first electronic device can send a first response message to the second electronic device, enabling the second electronic device to confirm that data collaboration has been established between them. Furthermore, the second electronic device displays the first response message, allowing the user to confirm that data collaboration has been successfully established, thus improving the user experience.
[0016] One possible implementation includes: the second electronic device including multiple document editing applications; sending a second notification message to the first electronic device; the second notification message notifying the second electronic device that the multiple document editing applications are included; receiving a switching message sent by the first electronic device; the switching message instructing the second electronic device to switch the focus of the second electronic device from the first document editing application to the second document editing application; switching the focus on the second electronic device to the second document editing box of the second document editing application; receiving third text data sent by the first electronic device and displaying the third text data on the second document editing box.
[0017] Considering that multiple document editing applications may be open on the second electronic device, and users need to collaborate on data within the document editing boxes of these applications, the user can send a switching message to the second electronic device while collaborating with the first document editing box of the first application. This allows the second electronic device to switch focus to the second document editing box of the second application, enabling the input of third text data within the second document editing box. This expands the applicability of the data collaboration function to scenarios involving multiple document editing applications.
[0018] Considering that during data collaboration, the second electronic device and / or the first electronic device may experience interruptions due to other events, in this application, the second electronic device can resume data collaboration in a third document editing application when it is determined to restore the data collaboration scenario. The third document editing application is the document editing application corresponding to the interruption of data collaboration between the first electronic device and the second electronic device. This avoids the loss of the second text data entered by the user due to the interruption of data collaboration and effectively improves the user experience.
[0019] One possible implementation involves displaying a third document editing application on the second electronic device when a first condition is met; the second electronic device receives second text data from the first electronic device and displays the second text data in a third document editing box of the third document editing application; the second text data is text data generated by the first electronic device when the data collaboration was interrupted. The first condition is: responding to a first switching operation on the application, the first switching operation being used to switch the focus of the second electronic device to the third document editing application; or receiving a data collaboration recovery message from the first electronic device, the data collaboration recovery message being used to request the restoration of data collaboration between the first electronic device and the second electronic device.
[0020] Using the above method, the user can perform a first switching operation on the second electronic device, or trigger a data collaboration recovery scenario by sending a data collaboration recovery message from the first electronic device to the second electronic device. As a result, the second electronic device displays the third document editing application and receives the second text data sent by the first electronic device. Since the second text data is the text data generated by the first electronic device when data collaboration is interrupted, the interruption of the data scenario does not affect the data collaboration process for the user, thus avoiding the risk of data loss caused by interrupted data collaboration and improving the user's experience in using data collaboration.
[0021] One possible implementation involves displaying the switched interface on the second electronic device in response to a second switching operation of the document editing application; the second switching operation is used to switch the focus of the second electronic device away from the third document editing application. A second notification message is sent from the second electronic device to the first electronic device; the second notification message is used to notify the second electronic device that data collaboration with the first electronic device has been interrupted.
[0022] Using the above method, the second electronic device can determine that the data collaboration between the first and second electronic devices has been interrupted by responding to a second switching operation of the document editing application. This triggers the second electronic device to send a second notification message to the first electronic device, allowing the first electronic device to store the second text data generated during the interruption of data collaboration, thus preventing data loss caused by the interruption.
[0023] In one possible implementation, the second electronic device receives an interruption notification message from the first electronic device, the interruption notification message being used to notify the second electronic device that data collaboration with the first electronic device has been interrupted.
[0024] Using the above method, the second electronic device can determine that the first electronic device has interrupted data collaboration through the interruption notification message, thus avoiding the second electronic device being unaware of the interruption of data collaboration and improving the user experience of the data collaboration process.
[0025] In one possible implementation, before the second electronic device receives the second text data from the first electronic device, it may also send a third notification message to the first electronic device; the third notification message is used to notify the first electronic device to resume data collaboration with the second electronic device.
[0026] Using the above method, the second electronic device can send a third notification message to the first electronic device when the data collaboration scenario is determined to be restored, so as to notify the first electronic device that the data collaboration scenario has been restored, thereby improving the efficiency of restoring the data collaboration scenario, enabling the first electronic device to send second text data to the second electronic device, reducing latency, and improving user experience.
[0027] In one possible implementation, before receiving the second text data from the first electronic device, the second electronic device may also send a third request message to the first electronic device; the third request message is used to request the restoration of data collaboration between the first electronic device and the second electronic device; the device receives a data collaboration restoration message sent by the first electronic device; the data collaboration restoration message is used to confirm the restoration of data collaboration between the first electronic device and the second electronic device.
[0028] Using the above method, the second electronic device can send a third request message to the first electronic device to allow the user to confirm whether to restore the data collaboration scenario on the first electronic device. After receiving the data collaboration restoration message from the first electronic device, the second electronic device confirms the restoration of the data collaboration scenario, thereby triggering the display of a third document editing box to receive the second text data sent by the first electronic device. By having the user confirm the restoration of data collaboration, the accuracy of the timing of the second electronic device's restoration of data collaboration is improved, and the smoothness of the user's use of both the second and first electronic devices is enhanced.
[0029] Secondly, this application provides a method for multi-device data collaboration, applied to a first electronic device. The first electronic device receives a first notification message from a second electronic device and displays a first prompt box. The first notification message is used to request the first electronic device to establish data collaboration with the second electronic device. The first prompt box includes at least one of the following: a first prompt message and a first control. In response to a first user operation applied to the first control, a data collaboration interface is displayed. First voice data is collected, the first voice data is converted into first text data, and the first text data is displayed on the data collaboration interface. In response to a second user operation, the first text data is sent to the second electronic device.
[0030] The first user operation can be a confirmation operation by the user on the first control, and the second user operation can be a confirmation operation by the user on the data collaboration interface.
[0031] Using the above method, the first electronic device can receive a first notification message from the second electronic device and prompt the user via a first dialog box whether to establish data collaboration. In response to the operation of the first control, the data collaboration interface is displayed on the first electronic device, thereby collecting the user's input voice data, converting it into first text data, and sending it to the second electronic device to achieve data collaboration between the two devices. In this process, establishing data collaboration between the first and second electronic devices is simple. The method of sending the first notification message through the second electronic device reduces the operational difficulty of establishing data collaboration and improves the convenience and applicability for users creating documents in various scenarios.
[0032] In one possible implementation, the data collaboration interface further includes: an editing control; recognizing the first voice data as initial text data and displaying the initial text data on the data collaboration interface; in response to a third user operation acting on the editing control, determining an editing instruction for the initial text data and displaying the edited initial text data on the data collaboration interface; and in response to a confirmation operation acting on the data collaboration interface, using the edited initial text data as the first text data.
[0033] Using the above method, the initial recognized text data can be edited through the editing controls of the data collaboration interface, improving the operability of users inputting text data by voice. The format of the initial text data can also be edited through the editing controls, thereby generating editing instructions for the initial text data and displaying the status of the edited initial text data, improving the ability to edit text data and enhancing the convenience of inputting text on the second electronic device through data collaboration.
[0034] One possible implementation is that the first text data includes: initial text data and editing instructions for the initial text data.
[0035] By using the above method, the editing instructions of the initial text data in the first text data enable the second electronic device to display the edited initial text data on the second electronic device after receiving the first text data, thereby improving the applicability of data collaboration.
[0036] In one possible implementation, the first electronic device may also receive a first confirmation message sent by the second electronic device, wherein the first confirmation message is used to indicate that the second electronic device has successfully received the first text data; thereby, the first electronic device may delete the first text data displayed on the data collaboration interface.
[0037] Using the above method, after confirming that the second electronic device has successfully received the first text data, the first electronic device can delete the first text data displayed on the data collaboration interface. For the user, this improves the operability of inputting voice data and editing the text data displayed on the data collaboration interface. For the first electronic device, this reduces memory usage and improves performance.
[0038] In one possible implementation, the first electronic device further includes a near-field wireless communication device; before receiving a first notification message from the second electronic device, the first electronic device may also send a communication connection request to the second electronic device via near-field communication when it determines that the distance to the second electronic device meets a first distance threshold; the first electronic device establishes a communication connection with the second electronic device and displays a first connection message; the first connection message is used to prompt the user that the second electronic device has established a communication connection with the first electronic device.
[0039] Using the above method, when the distance between the short-range wireless communication devices of the first electronic device and the second electronic device meets a first distance threshold, a communication connection can be established between the two devices. This does not limit the first and second electronic devices to being located on the same local area network, thus improving the convenience and applicability of data collaboration for users. The first distance threshold can be set according to the short-range wireless communication device or determined by other methods, and is not limited here.
[0040] In one possible implementation, in response to a first user operation applied to the first control, the first electronic device may also send a first response message to the second electronic device; the first response message is used to confirm the establishment of data collaboration between the first electronic device and the second electronic device.
[0041] Using the above method, data collaboration is established by user confirmation, that is, by operating the first control, a first response message is sent to the second electronic device, so that the second electronic device confirms that the first electronic device and the second electronic device have established data collaboration.
[0042] In one possible implementation, the second electronic device includes multiple document editing applications; the first electronic device can also receive application notification messages from the second electronic device and display controls of the multiple document editing applications on the data collaboration interface; the application notification messages are used to indicate that the second electronic device includes the multiple document editing applications; in response to a switching operation acting on the controls of the multiple document editing applications, a switching message is sent to the second electronic device; the switching operation is used to indicate that the focus of the second electronic device switches from the first document editing application to the second document editing application; the switching message is used to indicate that the second electronic device switches the focus of the second electronic device to the second document editing box of the second document editing application; second voice data is acquired, the second voice data is converted into third text data, and the third text data is displayed on the data collaboration interface; in response to a confirmation operation acting on the data collaboration interface, the third text data is sent to the second electronic device.
[0043] Considering that multiple document editing applications may be open on the second electronic device, the first electronic device can display controls for these applications on the data collaboration interface upon receiving application notification messages. This allows the user to switch between these applications on the first electronic device, for example, from the first to the second. A switching message is sent to the second electronic device, causing it to focus on the second document editing window of that application, enabling the user to input third text data within the second document editing window. This makes the data collaboration function applicable to scenarios with multiple document editing applications, improving its overall usability.
[0044] One possible implementation is that, when a second condition is met, the first electronic device caches the second text data; the second text data is the text data displayed on the data collaboration interface when the data collaboration between the first electronic device and the second electronic device is interrupted; the second condition is used to indicate that the data collaboration between the first electronic device and the second electronic device is interrupted; when a third condition is met, the data collaboration interface is displayed, and the second text data is displayed on the data collaboration interface; the third condition is used to indicate that the data collaboration between the first electronic device and the second electronic device is resumed; the first electronic device sends the second text data to the second electronic device.
[0045] Using the above method, when the second condition is met, the data collaboration scenario is determined to be interrupted. As a result, the first electronic device will cache the text data displayed on the data collaboration interface to avoid the loss of user-inputted text due to the interruption of the data collaboration scenario. When data collaboration is restored, that is, when the third condition is met, the first electronic device sends the second text data to the second electronic device, thereby avoiding the loss of the second text data input by the user due to the interruption of data collaboration and the inability to transmit it to the second electronic device, effectively improving the user experience.
[0046] One possible implementation is that the second condition is: the first electronic device receives a second notification message sent by the second electronic device, the second notification message being used to notify the second electronic device that the data collaboration with the first electronic device is interrupted; or, the first electronic device responds to the application switching operation of the first electronic device and displays the switched application interface on the first electronic device; the application switching operation is used to launch the switched application on the first electronic device.
[0047] Using the above method, considering the scenario where the second electronic device triggers the interruption of data collaboration, the first electronic device can determine that data collaboration has been interrupted by sending a second notification message to itself. Alternatively, the interruption can also be determined by the first electronic device in response to its application switching operation.
[0048] In one possible implementation, after responding to the application switching operation of the first electronic device, the second electronic device may also send an interruption notification message to the second electronic device; the interruption notification message is used to notify the second electronic device that the data collaboration with the first electronic device has been interrupted.
[0049] Considering a scenario where the first electronic device interrupts data collaboration, the first electronic device can send an interruption notification message to the second electronic device, thereby enabling the second electronic device to determine that data collaboration has been interrupted.
[0050] One possible implementation, with the third condition being:
[0051] A first triggering condition includes at least one of the following: in response to detecting a gesture on the first electronic device, determining that the gesture satisfies a first gesture condition; the first gesture condition includes: the first electronic device moves to a distance from the user that is greater than a first threshold and less than a second threshold; the gesture includes: raising an arm or moving a hand downward; or, the first electronic device is not in a call state; or, the camera module of the first electronic device is not in an on state; or, receiving a third notification message sent by the second electronic device, the third notification message being used to notify the first electronic device to resume data collaboration with the second electronic device; or, receiving a third request message sent by the second electronic device, the third request message being used to request the first electronic device to resume data collaboration with the second electronic device, displaying the third request message in a second prompt box on the first electronic device, and confirming the resumption of data collaboration between the first electronic device and the second electronic device in response to an operation on the second prompt box.
[0052] The above method allows for different data collaboration scenarios to be adapted to, thereby improving the availability of data collaboration scenarios. For example, a first electronic device may determine that it wants to restore the data collaboration scenario when the first triggering condition is met; a second electronic device may send a third request message to the first electronic device when it wants to restore the data collaboration scenario; or the second electronic device may send a third notification message to the first electronic device after confirming the restoration of data collaboration.
[0053] In one possible implementation, in response to the operation of the second prompt box, after confirming the restoration of data collaboration between the first electronic device and the second electronic device, the first electronic device may also send a data collaboration restoration message to the second electronic device; the data collaboration restoration message is used to confirm the restoration of data collaboration between the first electronic device and the second electronic device.
[0054] Using the above method, the first electronic device can send a data collaboration recovery message to the second electronic device to notify the second electronic device to resume data collaboration, thereby avoiding accidental triggering of the data collaboration scenario when data collaboration is not resumed and improving the user's experience with data collaboration.
[0055] Thirdly, this application provides a method for multi-device data collaboration, applied to a system including a first electronic device and a second electronic device, wherein a first document editing application can run on the second electronic device. In response to a first operation on the first document editing application on the second electronic device, the second electronic device displays a first document editing box of the first document editing application on the second electronic device; the second electronic device sends a first notification message to the first electronic device, the first notification message being used to establish data collaboration between the first electronic device and the second electronic device; the first electronic device receives the first notification message from the second electronic device and displays a first prompt box; the first prompt box includes at least one of the following: a first prompt message and a first control; the first prompt message is used to prompt the user whether to enable data collaboration with the second electronic device; in response to a first user operation acting on the first control, the data collaboration interface is displayed; first voice data is collected, the first voice data is converted into first text data, and the first text data is displayed on the data collaboration interface; in response to a second user operation, the first text data is sent to the second electronic device. The second electronic device receives the first text data sent by the first electronic device and displays the first text data on the first document editing box. The first user operation can be a user confirmation operation on the first control, and the second user operation can be a user confirmation operation on the data collaboration interface.
[0056] One possible implementation is that the first document editing application is an application in a document editing whitelist configured by the user.
[0057] One possible implementation is that the first operation includes at least one of the following: opening the first document editing application, clicking the document editing box in the first document editing application, switching the first document editing application, and switching the document editing box in the first document editing application.
[0058] In one possible implementation, the data collaboration interface further includes: an editing control; recognizing the first voice data as initial text data and displaying the initial text data on the data collaboration interface; in response to a third user operation applied to the editing control, determining an editing instruction for the initial text data and displaying the edited initial text data on the data collaboration interface; and in response to a confirmation operation applied to the data collaboration interface, using the edited initial text data as the first text data.
[0059] One possible implementation is that the first text data includes: initial text data and editing instructions for the initial text data.
[0060] In one possible implementation, the first electronic device may also receive a first confirmation message sent by the second electronic device, wherein the first confirmation message is used to indicate that the second electronic device has successfully received the first text data; thereby, the first electronic device may delete the first text data displayed on the data collaboration interface.
[0061] In one possible implementation, before the second electronic device sends the first notification message to the first electronic device, a first device search interface may be displayed; the first device search interface is used to display at least one electronic device that has established a communication connection with the second electronic device; in response to a confirmation operation of the first electronic device among the at least one electronic device acting on the first device search interface, the first electronic device that sends the first notification message is determined.
[0062] In one possible implementation, the first electronic device further includes a near-field wireless communication device; when the first electronic device determines that the distance between itself and the second electronic device meets a first distance threshold, it sends a communication connection request to the second electronic device via near-field communication; the second electronic device establishes a communication connection with the first electronic device and displays a first connection message on the second electronic device or on the first electronic device; the first connection message is used to prompt the user that the second electronic device has established a communication connection with the first electronic device.
[0063] In one possible implementation, after the first electronic device responds to a first operation applied to the first control, it can also send a first response message to the second electronic device; the first response message is used to confirm the establishment of data collaboration between the first electronic device and the second electronic device. After the second electronic device sends a first notification message to the first electronic device, it can also receive the first response message sent by the first electronic device, the first response message being used to confirm the establishment of data collaboration between the first electronic device and the second electronic device; thus, the second electronic device can display the first response message.
[0064] In one possible implementation, the second electronic device includes multiple document editing applications; a second notification message is sent to the first electronic device; the second notification message is used to notify the second electronic device that the multiple document editing applications are included; the first electronic device can also receive application notification messages from the second electronic device and display controls of the multiple document editing applications on the data collaboration interface; the application notification message is used to indicate that the second electronic device includes the multiple document editing applications; in response to a switching operation acting on the controls of the multiple document editing applications, a switching message is sent to the second electronic device; the switching operation is used to indicate that the focus of the second electronic device is switched from the first document editing application to the second document editing application; the second electronic device receives the switching message sent by the first electronic device; the switching message is used to indicate that the second electronic device switches the focus of the second electronic device from the first document editing application to the second document editing application; the focus is switched to a second document editing box of the second document editing application on the second electronic device; the first electronic device acquires second voice data, converts the second voice data into third text data, and displays the third text data on the data collaboration interface; in response to a second user operation, the first electronic device sends the third text data to the second electronic device. The second electronic device receives the third text data sent by the first electronic device and displays the third text data on the second document editing box.
[0065] One possible implementation involves the following steps: When a second condition is met, the first electronic device caches second text data; the second text data is the text data displayed on the data collaboration interface when the data collaboration between the first and second electronic devices is interrupted; the second condition indicates that the data collaboration between the first and second electronic devices is interrupted; when a third condition is met, the data collaboration interface is displayed, and the second text data is displayed on the data collaboration interface; the third condition indicates that the data collaboration between the first and second electronic devices is resumed; the first electronic device sends the second text data to the second electronic device. When the second electronic device determines that the first condition is met, it displays a third document editing application; the second electronic device receives the second text data from the first electronic device and displays the second text data on the third document editing box of the third document editing application; the second text data is the text data generated by the first electronic device when the data collaboration is interrupted. The first condition is either: the second electronic device determines that it is responding to a first switching operation on the application, the first switching operation being used to switch the focus of the second electronic device to the third document editing application; or, the second electronic device determines that it receives a resume data collaboration message from the first electronic device, the resume data collaboration message being used to request the resumption of data collaboration between the first and second electronic devices.
[0066] One possible implementation is that the second condition is: the first electronic device receives a second notification message sent by the second electronic device, the second notification message being used to notify the second electronic device that data collaboration with the first electronic device has been interrupted; or, the first electronic device, in response to a switching application operation performed on the first electronic device, displays the switched application interface; the switching application operation is used to launch the switched application on the first electronic device.
[0067] In one possible implementation, the second electronic device determines a second switching operation in response to the document editing application and displays the switched interface on the second electronic device; the second switching operation is used to switch the focus of the second electronic device away from the third document editing application. The second electronic device sends a second notification message to the first electronic device; the second notification message is used to notify the second electronic device that data collaboration with the first electronic device has been interrupted.
[0068] One possible implementation, with the third condition being:
[0069] A first triggering condition includes at least one of the following: in response to detecting a gesture on the first electronic device, determining that the gesture satisfies a first gesture condition; the first gesture condition includes: the first electronic device moves to a distance from the user that is greater than a first threshold and less than a second threshold; the gesture includes: raising an arm or moving a hand downward; or, the first electronic device is not in a call state; or, the camera module of the first electronic device is not in an on state; or, receiving a third notification message sent by the second electronic device, the third notification message being used to notify the first electronic device to resume data collaboration with the second electronic device; or, receiving a third request message sent by the second electronic device, the third request message being used to request the first electronic device to resume data collaboration with the second electronic device, displaying the third request message in a second prompt box on the first electronic device, and confirming the resumption of data collaboration between the first electronic device and the second electronic device in response to an operation on the second prompt box.
[0070] One possible implementation is that the first electronic device sends an interruption notification message to the second electronic device, and the second electronic device receives the interruption notification message from the first electronic device. The interruption notification message is used to notify the second electronic device that the data cooperation between the second electronic device and the first electronic device has been interrupted.
[0071] In one possible implementation, before the second electronic device receives the second text data from the first electronic device, it may also send a third notification message to the first electronic device; the third notification message is used to notify the first electronic device to resume data collaboration with the second electronic device.
[0072] In one possible implementation, before the second electronic device receives the second text data from the first electronic device, it may also send a third request message to the first electronic device; the third request message is used to request the restoration of data collaboration between the first electronic device and the second electronic device; the first electronic device sends a restore data collaboration message to the second electronic device; the second electronic device receives the restore data collaboration message sent by the first electronic device; the restore data collaboration message is used to confirm the restoration of data collaboration between the first electronic device and the second electronic device.
[0073] Fourthly, this application provides an electronic device comprising: a display screen; one or more processors; and one or more memories; wherein the one or more memories store one or more computer programs, the one or more computer programs including instructions that, when executed by the one or more processors, cause the electronic device to perform any possible technical solution in the first or second aspect described above.
[0074] Fifthly, an electronic device is also provided, comprising modules / units for performing any possible design method of the first or second aspect; these modules / units may be implemented in hardware or by executing corresponding software in hardware.
[0075] Sixthly, embodiments of this application provide a chip coupled to a memory in an electronic device to execute any possible technical solution of the first or second aspect of embodiments of this application; in embodiments of this application, "coupling" means that two components are directly or indirectly combined with each other.
[0076] In a seventh aspect, embodiments of this application provide a system that includes an electronic device according to the fourth aspect or an electronic device according to the fifth aspect.
[0077] Eighthly, a computer program product is provided, comprising: a computer program (also referred to as code or instructions) that, when executed, causes a computer to perform the method in any possible implementation of the first or second aspect described above.
[0078] Ninthly, a computer-readable storage medium is provided that stores a computer program (also referred to as code or instructions) that, when executed on a computer, causes the computer to perform the methods in any of the possible implementations of the first or second aspect described above.
[0079] A tenth aspect also provides a graphical user interface for an electronic device, the electronic device having a display screen, one or more memories, and one or more processors, the one or more processors being configured to execute one or more computer programs stored in the one or more memories, the graphical user interface including a graphical user interface displayed when the electronic device executes any possible technical solution of the first, second, or third aspect of the embodiments of this application. Attached Figure Description
[0080] Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of this application;
[0081] Figure 2 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0082] Figure 3 This application provides a schematic diagram of an Android operating system structure.
[0083] Figure 4a This application provides a schematic flowchart of a method for multi-device data collaboration.
[0084] Figures 4b-4g A schematic diagram of the interface involved in document editing for the second electronic device provided in the embodiments of this application;
[0085] Figures 5a-5c This is a schematic diagram of the data collaboration control interface of the second electronic device provided in the embodiments of this application;
[0086] Figure 5d This is a schematic diagram of the data collaboration control interface of the second electronic device provided in the embodiments of this application;
[0087] Figures 6a-6c A schematic diagram of the interface of the first electronic device provided in an embodiment of this application;
[0088] Figures 7a-7b This is a schematic diagram of the data collaboration interface of the second electronic device provided in an embodiment of this application;
[0089] Figures 8a-8b A schematic diagram of the data collaboration interface of the first electronic device provided in an embodiment of this application;
[0090] Figure 9a A schematic diagram of a rich text field provided in an embodiment of this application;
[0091] Figure 9b A schematic diagram illustrating the process of parsing text data into the keyboard buffer, as provided in an embodiment of this application;
[0092] Figure 10a This is a schematic flowchart of a multi-device data collaboration method provided in an embodiment of this application;
[0093] Figure 10b A schematic diagram of the data collaboration control interface of the first electronic device provided in the embodiments of this application;
[0094] Figure 10c This is a schematic diagram of the data collaboration control interface of the second electronic device provided in the embodiments of this application;
[0095] Figure 11 A gesture diagram of the first electronic device provided in the embodiments of this application;
[0096] Figure 12a This is a schematic flowchart of a multi-device data collaboration method provided in an embodiment of this application;
[0097] Figure 12b This is a schematic diagram of the data collaboration control interface of the second electronic device provided in the embodiments of this application;
[0098] Figure 12c A schematic diagram of the data collaboration control interface of the first electronic device provided in the embodiments of this application. Detailed Implementation
[0099] With the rapid development of society, mobile terminals such as mobile phones are becoming increasingly widespread. Mobile phones not only have communication functions but also powerful processing capabilities, storage capacity, and camera functions. Therefore, mobile phones can serve not only as communication tools but also as mobile file libraries for users. They can connect to other electronic devices to transfer various personal information, photos, videos, and other data. Therefore, based on the portability and convenience of mobile terminals, document creation via mobile terminals, combined with the document editing functions of document editing software on personal computers, can be applicable to various document creation scenarios. Based on this, this application provides a multi-device data collaboration method.
[0100] The embodiments of this application can be applied to electronic devices such as mobile phones, tablets, wearable devices (e.g., watches, bracelets, helmets, headphones, etc.), in-vehicle devices, augmented reality (AR) / virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), and smart home devices (e.g., smart TVs, smart speakers, smart cameras, etc.). It is understood that the embodiments of this application do not impose any limitations on the specific type of electronic device.
[0101] refer to Figure 1 This is a simplified schematic diagram of a system architecture provided in an embodiment of this application. Figure 1 As shown, the system architecture may include a first electronic device 101 and a second electronic device 102. The first electronic device 101 and the second electronic device 102 can access the same local area network (LAN) or different LANs. Specifically, an example of the first electronic device 101 and the second electronic device 102 accessing the same LAN is that they establish a wireless connection with the same wireless access point. For example, the first electronic device 101 and the second electronic device 102 may access the same Wi-Fi hotspot, or they may access the same Bluetooth beacon via Bluetooth. Furthermore, the first electronic device 101 and the second electronic device 102 may also initiate a communication connection via a near-field communication (NFC) tag, transmitting encrypted information for authentication via Bluetooth. After successful authentication, data transmission occurs via point-to-point (P2P).
[0102] The second electronic device 102 also supports the network communication protocol used by the first electronic device 101 to establish a network connection. The second electronic device 102 can act as a target client for text collaboration, enabling the input of collaborative data into the first electronic device 101 and the output of text data into the second electronic device 102. In some embodiments, the second electronic device 102 can be a mobile phone, tablet, or computer; the computer can be a desktop computer or a laptop computer, etc.
[0103] The following describes a first electronic device 101, a graphical user interface (GUI) for the first electronic device 101, and embodiments for the first electronic device 101. In some embodiments of this application, the first electronic device 101 may be a portable electronic device that also includes other functions such as a personal digital assistant and / or music player, such as a mobile phone, tablet computer, or wearable device with wireless communication capabilities (such as a smartwatch). Exemplary embodiments of the portable electronic device include, but are not limited to, devices equipped with... Alternatively, it could be a portable electronic device with another operating system. The aforementioned portable electronic device could also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of this application, the aforementioned first electronic device 101 may not be a portable electronic device, but rather a desktop computer with a touch-sensitive surface (e.g., a touch panel).
[0104] It should be understood that in the embodiments of this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, a and b, a and c, b and c, or a, b, and c, where a, b, and c can be single or multiple.
[0105] Please refer to Figure 2 The electronic device 200 can be either the first electronic device 101 or the second electronic device 102 in this application embodiment. This application embodiment uses the first electronic device 101 as an example to describe the electronic device 200 provided in this application embodiment. Those skilled in the art will understand that... Figure 2 The electronic device 200 shown is merely an example and does not constitute a limitation on the electronic device 200. The electronic device 200 may have more or fewer components than those shown in the figure, may combine two or more components, or may have different component configurations. Figure 2 The various components shown can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.
[0106] Electronic device 200 may include a processor 210, an external memory interface 220, an internal memory 221, a USB interface 230, a charging management module 240, a power management module 241, a battery 242, antenna 1, antenna 2, a mobile communication module 251, a wireless communication module 252, an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, a headphone jack 270D, a sensor module 280, buttons 290, a motor 291, an indicator 292, a camera 293, a display screen 294, and a SIM card interface 295, etc. The sensor module 280 may include a gyroscope sensor 280A, an accelerometer sensor 280B, a proximity sensor 280G, a fingerprint sensor 280H, and a touch sensor 280K (of course, electronic device 200 may also include other sensors, such as temperature sensors, pressure sensors, distance sensors, magnetic sensors, ambient light sensors, barometric pressure sensors, bone conduction sensors, etc., not shown in the figure).
[0107] Processor 210 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, memory, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). Different processing units may be independent devices or integrated into one or more processors. The controller may serve as the central nervous system and command center of the electronic device 200. The controller can generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution.
[0108] The processor 210 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. This memory can store instructions or data that the processor 210 has just used or that are used repeatedly. If the processor 210 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 210, and thus improves the efficiency of the system.
[0109] The processor 210 can run the audio output method provided in the embodiments of this application, so as to reduce the user's operational complexity, improve the intelligence of the terminal device, and enhance the user experience. The processor 210 may include different devices. For example, when integrating a CPU and a GPU, the CPU and GPU can cooperate to execute the audio output method provided in the embodiments of this application. For example, some algorithms in the audio output method are executed by the CPU, and other algorithms are executed by the GPU to obtain faster processing efficiency.
[0110] Display screen 294 is used to display images, videos, etc. Display screen 294 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 (AMOLED), a flexible light-emitting diode (FLED), a Minied, MicroLED, Micro-OLED, quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 200 may include one or N displays screens 294, where N is a positive integer greater than 1. Display screen 294 can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces (GUIs). For example, display screen 294 can display photos, videos, web pages, or documents, etc. As another example, display screen 294 can display... Figure 1 The graphical user interface of the first electronic device 101 shown. Wherein, as... Figure 1 The graphical user interface shown includes a status bar, a dock, a hideable navigation bar, a time and weather widget, and application icons, such as browser icons. The status bar includes the carrier name (e.g., China Mobile), mobile network (e.g., 4G), time, and remaining battery power. The navigation bar may include a back button icon, a home button icon, and a forward button icon. Furthermore, it is understood that in some embodiments, the status bar may also include Bluetooth icons, Wi-Fi icons, external device icons, etc. It is also understood that in other embodiments, Figure 1The graphical user interface shown may also include a Dock, which may contain frequently used application icons. When the processor 210 detects a touch event by the user's finger (or stylus, etc.) on an application icon, it responds to the touch event by opening the user interface of the application corresponding to that application icon and displaying the user interface of that application on the display 294.
[0111] In this embodiment, the display screen 294 can be a single flexible display screen, or it can be a spliced display screen composed of two rigid screens and a flexible screen located between the two rigid screens. When the processor 210 runs the audio output method provided in this embodiment, the processor 210 can control the external audio output device to switch the output audio signal.
[0112] Camera 293 (either a front-facing camera or a rear-facing camera, or a single camera that can function as both) is used to capture still images or videos. Typically, camera 293 may include a photosensitive element such as a lens assembly and an image sensor. The lens assembly includes multiple lenses (convex or concave lenses) for collecting light signals reflected from the object being photographed and transmitting these signals to the image sensor. The image sensor then generates a raw image of the object being photographed based on the light signals.
[0113] Internal memory 221 can be used to store computer executable program code, which includes instructions. Processor 210 executes various functional applications and data processing of electronic device 200 by running the instructions stored in internal memory 221. Internal memory 221 may include a program storage area and a data storage area. The program storage area can store the operating system, application code (such as camera applications, WeChat applications, etc.), etc. The data storage area can store data created during the use of electronic device 200 (such as images and videos captured by camera applications, etc.).
[0114] The internal memory 221 may also store one or more computer programs 1310 corresponding to the audio output algorithm provided in this embodiment. These one or more computer programs 1310 are stored in the memory 221 and configured to be executed by the one or more processors 210. The one or more computer programs 1310 include instructions that can be used to perform actions such as... Figure 4a , Figure 10a and Figure 12aIn the various steps of the corresponding embodiments, the computer program 1310 may include an account verification module 2211 and a priority comparison module 2212. The account verification module 2211 is used to authenticate the system authentication accounts of other terminal devices within the local area network; the priority comparison module 2212 is used to compare the priority of the audio output request service with the priority of the audio output device's current output service. The status synchronization module 2213 is used to synchronize the device status of the audio output device currently connected to the terminal device to other terminal devices, or to synchronize the device status of the audio output device currently connected to other devices to the local device. When the audio output algorithm code stored in the internal memory 221 is run by the processor 210, the processor 210 can control the audio output device to switch the output audio signal.
[0115] In addition, the internal memory 221 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0116] Of course, the audio output algorithm code provided in this embodiment can also be stored in external memory. In this case, the processor 210 can run the audio output algorithm code stored in external memory through the external memory interface 220, and the processor 210 can control the audio output device to switch the output audio signal.
[0117] The functions of sensor module 280 are described below.
[0118] The gyroscope sensor 280A can be used to determine the motion attitude of the electronic device 200. In some embodiments, the gyroscope sensor 280A can determine the angular velocity of the electronic device 200 about three axes (i.e., the x, y, and z axes). That is, the gyroscope sensor 280A can be used to detect the current motion state of the electronic device 200, such as jitter or stillness.
[0119] When the display screen in this embodiment is a foldable screen, the gyroscope sensor 280A can be used to detect folding or unfolding operations performed on the display screen 294. The gyroscope sensor 280A can report the detected folding or unfolding operations as events to the processor 210 to determine the folding or unfolding state of the display screen 294.
[0120] Accelerometer 280B can detect the magnitude of acceleration of electronic device 200 in various directions (generally three axes). That is, gyroscope sensor 280A can be used to detect the current motion state of electronic device 200, such as whether it is shaking or stationary. When the display screen in this embodiment is a foldable screen, accelerometer 280B can be used to detect folding or unfolding operations acting on display screen 294. Accelerometer 280B can report the detected folding or unfolding operations as events to processor 210 to determine the folding or unfolding state of display screen 294.
[0121] The proximity sensor 280G may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The LED may be an infrared LED. The mobile phone emits infrared light outward through the LED. The mobile phone uses the photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the mobile phone. When insufficient reflected light is detected, the mobile phone can determine that there is no object near the mobile phone. When the display screen in this embodiment is a foldable screen, the proximity sensor 280G may be disposed on the first screen of the foldable display screen 294. The proximity sensor 280G may detect the size of the folding angle or unfolding angle between the first screen and the second screen based on the optical path difference of the infrared signal.
[0122] The gyroscope sensor 280A (or accelerometer 280B) can send the detected motion state information (such as angular velocity) to the processor 210. The processor 210 determines whether the current state is handheld or tripod based on the motion state information (for example, if the angular velocity is not 0, it means that the electronic device 200 is in handheld mode).
[0123] The fingerprint sensor 280H is used to collect fingerprints. The electronic device 200 can utilize the characteristics of the collected fingerprints to achieve fingerprint unlocking, accessing application locks, taking photos with fingerprints, answering calls with fingerprints, etc.
[0124] Touch sensor 280K, also known as a "touch panel," can be located on display screen 294. The touch sensor 280K and display screen 294 together form a touchscreen, also known as a "touchscreen." Touch sensor 280K detects touch operations applied to or near it. The touch sensor can transmit 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 display screen 294. In other embodiments, touch sensor 280K may also be located on the surface of electronic device 200, in a different position than display screen 294.
[0125] For example, the display screen 294 of the electronic device 200 displays a main interface, which includes icons for multiple applications (such as a camera application, a WeChat application, etc.). The user taps the camera application icon on the main interface using the touch sensor 280K, triggering the processor 210 to launch the camera application and open the camera 293. The display screen 294 then displays the camera application's interface, such as the viewfinder.
[0126] The wireless communication function of electronic device 200 can be implemented through antenna 1, antenna 2, mobile communication module 251, wireless communication module 252, modem processor, and baseband processor.
[0127] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 200 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with a tuning switch.
[0128] The mobile communication module 251 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 200. The mobile communication module 251 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 251 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 251 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 251 may be housed in the processor 210. In some embodiments, at least some functional modules of the mobile communication module 251 and at least some modules of the processor 210 may be housed in the same device. In this embodiment, the mobile communication module 251 can also be used to interact with other terminal devices, i.e., send audio output requests to other terminal devices, or the mobile communication module 251 can be used to receive audio output requests and encapsulate the received audio output requests into a message of a specified format.
[0129] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates 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 processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through audio devices (not limited to speaker 270A, receiver 270B, etc.) or displays images or videos through the display screen 294. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 210 and may be housed in the same device as the mobile communication module 251 or other functional modules.
[0130] The wireless communication module 252 can provide solutions for wireless communication applications on the electronic device 200, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), NFC, and infrared (IR) technologies. The wireless communication module 252 can be one or more devices integrating at least one communication processing module. The wireless communication module 252 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 210. The wireless communication module 252 can also receive signals to be transmitted from processor 210, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2. In this embodiment, the wireless communication module 252 is used to establish a connection with an audio output device and output voice signals through the audio output device. Alternatively, the wireless communication module 252 can be used to access an access point device, send messages corresponding to audio output requests to other terminal devices, or receive messages corresponding to audio output requests sent from other terminal devices. Optionally, the wireless communication module 252 can also be used to receive voice data from other terminal devices.
[0131] In addition, the electronic device 200 can implement audio functions through an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, a headphone jack 270D, and an application processor, such as music playback and recording. The electronic device 200 can receive input from buttons 290, generating key signal inputs related to user settings and function control. The electronic device 200 can use a motor 291 to generate vibration alerts (such as vibration alerts for incoming calls). The indicator 292 in the electronic device 200 can be an indicator light, used to indicate charging status, battery level changes, messages, missed calls, notifications, etc. The SIM card interface 295 in the electronic device 200 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 295 to achieve contact and separation with the electronic device 200.
[0132] It should be understood that, in practical applications, electronic device 200 may include more than Figure 2 The number of more or fewer components shown is not limited in the embodiments of this application. The illustrated electronic device 200 is merely an example, and the electronic device 200 may have more or fewer components than shown in the figure, may combine two or more components, or may have different component configurations. The various components shown in the figure may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.
[0133] The software system of a terminal device can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This embodiment of the invention uses the layered architecture Android system as an example to illustrate the software structure of the terminal device. Figure 3 This is a software structure block diagram of a terminal device according to an embodiment of the present invention. For example, Figure 3 This is a schematic diagram of a software architecture that can run in the aforementioned first electronic device. The layered architecture divides the software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. For example... Figure 3 As shown, the software architecture can be divided into five layers: the application layer, the application framework layer, the Android runtime and system libraries, the hardware abstraction layer, and the Linux kernel layer.
[0134] The application layer is the top layer of the operating system and includes native applications such as email clients, SMS, call services, calendars, browsers, and contacts. The APP (App) mentioned in this application is a software program capable of performing one or more specific functions. Typically, multiple applications can be installed on a terminal device. Examples include camera applications, email applications, and smart home control applications. The applications mentioned below can be system applications pre-installed on the terminal device or third-party applications downloaded from the network or obtained from other terminal devices during user operation.
[0135] Of course, for developers, this means writing applications and installing them into this layer. The application framework layer can include a window manager, content providers, a view system, a phone manager, a resource manager, a notification manager, and so on. The window manager, in particular, manages window applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.
[0136] In some embodiments of this application, the application layer can be used to implement the presentation of a settings interface, which can be used by the user to configure the data collaboration function of the first electronic device 101. For example, the user can enable or disable the data collaboration function in the settings interface, and can also configure the data collaboration function, such as setting the document types available for data collaboration, and setting the username and password for login authentication. Exemplarily, the settings interface can be the content in the status bar or notification bar displayed on the touch screen of the first electronic device 101, or it can be the collaboration control interface displayed on the touch screen of the first electronic device 101.
[0137] In one possible implementation, the application can be developed using the Java language, by calling the application programming interface (API) provided by the application framework layer. Developers can then interact with the underlying operating system (such as the hardware abstraction layer, kernel layer, etc.) through the application framework to develop their own applications. This application framework primarily consists of a series of services and management systems for the operating system.
[0138] In some embodiments of this application, the application framework layer includes a document editing discovery service, which is primarily responsible for calling the service interface for communication with the hardware abstraction layer to pass requests to enable or disable data collaboration functions to the hardware abstraction layer. It is also responsible for managing document editing discovery service information, such as managing the document types that trigger the service (Word, Outlook, TXT, Notepad++, UltraEdit, etc.), and managing login authentication usernames and passwords. For example, the document editing discovery service may include modules for managing various data collaboration functions. For instance, the document editing discovery service includes an interface adapter, document discovery settings, a document discovery state machine, and a local controller. The document editing discovery service may also include a configuration file. This configuration file may include a whitelist of applications that can trigger document creation corresponding to the document editing discovery service. For example, the whitelist may include: document editing applications such as Word, Excel, WPS, TXT, Notepad++, UltraEdit, etc.; email applications such as Outlook; instant messaging applications such as WeChat, DingTalk, Taobao client, etc.; and browser applications such as IE, Firefox, etc. Of course, other applications that may involve document creation can also be included, such as photo editing applications and other multimedia applications. For example, users may need to edit text when creating multimedia files such as photo albums, video files, and audio files. Therefore, users can add such applications to the whitelist, so that the whitelisted applications are stored in the aforementioned configuration file. This allows the document editing discovery service to determine when to enable document editing scenarios when a whitelisted application is running.
[0139] In some other embodiments, the data collaboration function is implemented as a sub-function of the original document editing function in the first electronic device. For example, the data collaboration function can be implemented as a sub-function of the Huawei Share function of Huawei mobile phones. In this case, the document editing discovery service can exist as a sub-module in the Huawei Share application.
[0140] The interface adapter provides services to the upper-level settings interface. For example, when a user operates the collaboration switch button of the data collaboration function, the interface adapter can provide corresponding services to the settings interface to change the state of the collaboration switch button (e.g., from off to on). The document editing discovery service settings are mainly responsible for saving the document type that triggers the document editing discovery service and / or the username and password for login authentication. The document discovery state machine is mainly responsible for monitoring the running status of the underlying collaboration service. The local controller is mainly responsible for controlling the signals at the lower level. The configuration file is mainly used to store the collaboration directory, file directory, user collaboration scope settings, etc. The content provider is used to store and retrieve data and make this data accessible to applications. The data may include video, images, audio, made and received calls, browsing history and bookmarks, phone books, etc. The view system includes visual controls, such as controls for displaying text and controls for displaying images. The view system can be used to build applications. The display interface may consist of one or more views. For example, a display interface including a text notification icon may include a view for displaying text and a view for displaying images. The phone manager is used to provide communication functions for terminal devices. For example, call status management (including connection, hang-up, etc.). The resource manager provides applications with various resources, such as localized strings, icons, images, layout files, video files, etc. The notification manager allows applications to display notifications in the status bar, which can be used to convey informational messages and can disappear automatically after a short pause without user interaction. For example, the notification manager can be used to notify of download completion, message alerts, etc. The notification manager can also display notifications as icons or scrolling text in the system's top status bar, such as notifications from background applications, or as dialog windows on the screen. Examples include displaying text messages in the status bar, emitting alert sounds, vibrating the terminal device, and flashing indicator lights.
[0141] In this embodiment, the application framework layer may further include a file observer, a Wi-Fi service, and a notification manager. These three modules are primarily responsible for working with the document editing discovery service to provide data collaboration functionality. For example, the Wi-Fi service is used to monitor whether the first electronic device is connected to a wireless access point. As another example, the notification manager is used to transmit notification messages to the upper layer for display on the touchscreen of the first electronic device.
[0142] The Android runtime consists of the core libraries and the virtual machine. The Android runtime is responsible for scheduling and managing the Android system. The Android core libraries consist of two parts: one part contains the functionalities that Java needs to call, and the other part contains the core libraries of the Android system. The application layer and application framework layer run in the virtual machine. Taking Java as an example, the virtual machine executes the Java files in the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0143] The system library can include multiple functional modules. For example: a surface manager, a media library, a 3D graphics processing library (e.g., OpenGL ES), and a 2D graphics engine (e.g., SGL). The surface manager manages the display subsystem and provides the fusion of 2D and 3D layers for multiple applications. The media library supports playback and recording of various common audio and video formats, as well as still image files. The media library supports various audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG. The 3D graphics processing library implements 3D graphics drawing, image rendering, compositing, and layer processing. The 2D graphics engine is the drawing engine for 2D graphics.
[0144] In some embodiments of this application, the system library may further include: a data collaboration configuration, a document editing discovery service password, and a document editing discovery configuration file. These are responsible for providing a service interface for communication with the application framework layer, and also for managing the data collaboration service, the document discovery configuration file, and the document editing discovery service password. The document discovery configuration file can be used to store document editing discovery service information; for example, the document editing discovery service password can be used to store login authentication usernames and passwords.
[0145] The Hardware Abstraction Layer (HAL) supports the application framework and serves as a crucial link between the application framework layer and the Linux kernel layer. It provides services to developers through the application framework layer.
[0146] For example, the data collaboration service and document editing discovery service functions of this application embodiment can be implemented by configuring a first process in the hardware abstraction layer. The first process can be a sub-process built separately in the hardware abstraction layer. The first process can include modules such as an interface, a document editing discovery controller, a data collaboration controller, and a document editing discovery configuration interface. The aforementioned interface is a service interface for communicating with the application framework layer. The document editing discovery controller is used to monitor the configuration of the upper-layer document editing discovery service, for example, controlling whether authentication is required. The document editing discovery controller is mainly responsible for monitoring whether the input data in the first electronic device needs to be cached or updated. When the input data needs to be cached or updated, it can notify the upper layer to cache or update the collaboration directory, etc. The hardware abstraction layer may also include a daemon process, which can be used to cache data in the first process; this daemon process can be a sub-process built separately in the hardware abstraction layer.
[0147] The Linux kernel layer provides core system services for the operating system, such as security, memory management, process management, network protocol stack, and driver models. The Linux kernel also serves as an abstraction layer between the hardware and software stacks. This layer contains many drivers related to electronic devices, including: display drivers; Linux-based framebuffer drivers; keyboard drivers as input devices; Flash drivers for memory-based devices; camera drivers; audio drivers; Bluetooth drivers; and Wi-Fi drivers. In some embodiments of this application, the Linux kernel relies on a local file system. This local file system can be accessed through a collaboration service, and the collaboration data in the local file system can be configured through the service interface of the hardware abstraction layer.
[0148] The technical solutions involved in the following embodiments can all be implemented in electronic devices with the above-described hardware and software architectures.
[0149] For ease of understanding, this application embodiment uses a mobile phone as the first electronic device and a laptop computer as the second electronic device, and takes accessing collaborative data in the mobile phone via a laptop computer as an example to specifically describe the multi-device text processing method provided in this application embodiment. For example... Figure 4a As shown, it includes the following steps:
[0150] S401, Document editing discovery service of the second electronic device, determines that the second electronic device is in a document editing scenario.
[0151] In some embodiments of this application, in response to a first operation on a document editing application of the second electronic device, a first document editing box of the document editing application is displayed on the second electronic device. The first operation may include at least one of the following: opening the first document editing application, clicking on a document editing box in the first document editing application, switching the first document editing application, and switching the document editing box in the first document editing application.
[0152] One possible approach is for the document editing discovery service to determine the currently running document editing application on the second electronic device by examining the current processes. For example, in response to an operation to open a Word application on the second electronic device, the second electronic device starts the Word application process, and the document editing discovery service can determine that the Word application process is running within the process flow. Similarly, in response to an operation to open an email application on the second electronic device, the second electronic device starts the email application process, and the document editing discovery service can determine that the email application process is running within the process flow. Alternatively, the aforementioned applications could also be whitelisted applications such as browser applications or instant messaging applications, which are not limited here.
[0153] Another possible approach is for the second electronic device to have a document editing discovery service. For example, this service could identify that the current focus of the second electronic device is a text editing box. This text editing box could be a text editing box within an application that has text editing capabilities. Such applications (document editing applications) could be browsers, email applications, image editing applications, call applications, video browsing applications, document editing applications, etc.
[0154] The following examples, using methods 1 and 2, illustrate the possible ways in which the document editing discovery service of the second electronic device can determine that the second electronic device is in a document editing scenario.
[0155] Method 1, taking Word as an example of a document editing application, in response to the user's action of opening the Word application, the second electronic device opens the Word application and displays a document opening interface on the screen of the second electronic device. The document opening interface can display controls for opening the document (e.g., ...). Figure 4b As shown, open control 4013, etc. (e.g.) Figure 4b As shown, in response to a user opening a first document, the second electronic device can display an open document interface 4016. This open document interface 4016 may include multiple text editing boxes 4017, such as a text editing box for entering a filename, a text editing box for entering a document path, and a search input box. The second electronic device displays the editing interface of the first document within a Word application. Figure 4cAs shown, the editing interface of the first document may include at least one editable text editing box. For example, it may include a main text editing interface 4010, a text editing box 4011 for a search bar, and text editing boxes in a toolbar. For example, the "Home" tab in the toolbar may include a text editing box 4012 for font and font size, and the "Page Layout" tab in the toolbar may include text editing boxes for paragraphs. For example, ... Figure 4d As shown, when the equation editor interface is opened in Word, the equation editor interface can also include a text editing box for equation editing (4014), or, as... Figure 4e As shown, the Word editing interface can also include an editable text editing box 4015. The content that can be inserted into this text editing box includes: image type, PPT type, and other editable image types, such as files generated by drawing applications such as Visio.
[0156] In response to a click action applied to an editable text editing box, the Word application can make the editable text editing box editable (e.g., ...). Figure 4e The dashed box indicated by 4015 (of course, other methods can also be used to indicate editability, which are not limited here) allows the user to edit the inserted content. In response to a close operation on an editable text box, the Word application can render the editable text box non-editable, thus disabling the ability to edit the inserted content.
[0157] The following examples, using methods 1.1 to 1.3, illustrate the possible scenarios for determining S403.
[0158] In method 1.1, the document editing discovery service treats all document editing boxes in the application as document editing boxes within the document editing scenario. At this point, the second electronic device can execute S403 after determining the document editing scenario.
[0159] In response to operations applied to text editing boxes, the Word application can switch the focus between text editing boxes. For example, in response to a click on the main interface, the Word application displays the cursor of the first document on the main interface 4010. At this time, the document editing discovery service can recognize that the second electronic device currently has the focus on the main interface 4010. In response to a click on text editing box 4015, the Word application displays the focus of the first document within text editing box 4015. At this time, the document editing discovery service can recognize that the second electronic device currently has the focus on text editing box 4015. In response to a close operation on text editing box 4015, the Word application displays the focus of the first document within the main interface 4010. At this time, the document editing discovery service can recognize that the second electronic device currently has the focus on text editing box 4010.
[0160] Method 1.2 can be achieved by triggering the document editing box in the data collaboration scenario through user confirmation in S403 below, thereby establishing a data collaboration scenario through user confirmation, and triggering the second electronic device to send a first notification message to the first electronic device.
[0161] For example, such as Figure 4f As shown in (a), the operation that triggers a data collaboration scenario can be the control 4018 on the document editing discovery service interface, such as... Figure 4f As shown in (b) above, it could also be a document editing discovery control 4018 embedded in a document editing application, which is not limited here. In this mode, in response to the user's selection of a text editing box in the document editing application (e.g., the main interface 4010) and the operation of a control that triggers a data collaboration scenario, the second electronic device can determine that a data collaboration scenario has been triggered.
[0162] In method 1.3, the document editing discovery service can determine the document editing box that triggers the document editing scenario based on the type of document editing box in the application. For example, in response to the user selecting a preset type of text editing box, the second electronic device determines that a data collaboration scenario is triggered. For instance, the preset type of text editing box can be a text editing box that the user or system has preset for potential data collaboration, such as a text editing box for inputting long text. In the above example, the preset type of text editing box could be the main interface 4010, text editing box 4010, etc. At this time, the second electronic device can determine the triggering of the data collaboration scenario based on the fact that the display focus of the second electronic device is located on the main interface 4010, and then execute S403.
[0163] Method 2, taking a document editing application as an example of an email application, in response to the user's action of opening the email application, the second electronic device opens the email application and displays the email application interface on the screen of the second electronic device, such as... Figure 4gAs shown in (a), the email application interface can display controls for opening email editing (e.g., such as...). Figure 4g The file control in (a) can also include a text editing box 4021 in the search bar, etc. In response to the user opening the first email, the second electronic device displays the editing interface of the first email in the email application. For example... Figure 4g As shown in (b), the editing interface of the first email may include at least one editable text editing box. For example, it may include a main text editing interface 4020, a recipient editing box 4022, a subject editing box 4023, etc., and may also include a text editing box 4024 in the search bar.
[0164] The following examples, using methods 2.1 to 2.3, illustrate the possible scenarios for determining S403.
[0165] In method 2.1, the document editing discovery service identifies editing boxes in the application, such as text editing box 4021, main interface 4020, recipient editing box 4022, subject editing box 4023, and text editing box 4024, as document editing boxes in the document editing scenario. At this point, the second electronic device can execute S403 after determining the document editing scenario.
[0166] In response to operations applied to text editing boxes, the email application can switch the focus between text editing boxes. For example, in response to a click on the main interface 4020, the email application displays the cursor of the first document on the main interface 4020. At this time, the document editing discovery service can recognize that the current focus of the second electronic device is the main interface 4020. In response to an operation applied to text editing box 4022, the email application displays the focus of the first document within text editing box 4022. At this time, the document editing discovery service can recognize that the current focus of the second electronic device is text editing box 4022.
[0167] Method 2.2 can be achieved by triggering the document editing box in the data collaboration scenario through user confirmation in S403 below, thereby establishing a data collaboration scenario through user confirmation, and triggering the second electronic device to send a first notification to the first electronic device.
[0168] For example, the operation that triggers a data collaboration scenario can be a control on the document editing discovery service interface that triggers a data collaboration scenario, or it can be a document editing discovery control embedded in a document editing application; there is no limitation here. In this method, in response to the user's selection of the text editing box 4020 of the document editing application and the control that triggers a data collaboration scenario, the second electronic device can determine that a data collaboration scenario has been triggered. For details, please refer to the implementation method in Method 1.2, which will not be repeated here.
[0169] Method 2.3: The document editing discovery service can determine the document editing box that triggers the document editing scenario based on the type of document editing box in the application. For example, in response to the user selecting a preset type of text editing box, the second electronic device determines that a data collaboration scenario is triggered. For instance, the preset type of text editing box can be a text editing box that the user or system has preset for potential data collaboration, such as a text editing box for inputting long text. In the above example, the preset type of text editing box could be the main interface 4020, text editing box 4024, etc. At this time, the second electronic device can determine the triggering of the data collaboration scenario based on the fact that the display focus of the second electronic device is located on the main interface 4020, and then execute S403.
[0170] In some embodiments of this application, the document editing discovery service can be implemented as a sub-function of the data collaboration function in a second electronic device. For example, in a Huawei computer, the data collaboration function can be implemented as a sub-function of the computer's Huawei Share function. See also Figure 5a Users can operate the data collaboration control interface displayed on the computer screen to enable the document editing discovery service of the second electronic device. For example, the data collaboration control interface 510 may include a switch button 520 for the Huawei Share function and a switch button for the document editing discovery service. Thus, in response to the operation of the switch button for the Huawei Share function, the Huawei Share function can be turned on or off. Alternatively, in response to the operation of the switch button for the document editing discovery service, the document editing discovery service can be turned on or off.
[0171] For example, see Figure 5b Users can operate the system through the collaborative control interface displayed on the computer screen, or by interacting with the notification bar or taskbar of the second electronic device. These notification bars are used to configure whether the second electronic device enables data collaboration or document editing discovery services. Figure 5b As shown in (a) above, this is the prompt box displayed on the second electronic device when the user is not performing any operation. Figure 5b As shown in (b), this is a prompt box displayed on the second electronic device when the user operates the controls of the Huawei Share function. In this case, the controls for the Huawei Share function include the Huawei Share enable and disable controls. The above operations can also be performed on related icons in the notification bar or taskbar of the second electronic device, and are not limited here.
[0172] To avoid accidental triggering of the document editing discovery service, this service can be configured with a document editing whitelist and document editing control IDs. The document editing whitelist can include the application types that trigger the document editing discovery service, such as Word, Outlook, TXT, Notepad++, UltraEdit, etc. When the user's input focus switches to an application on this whitelist, the document editing discovery service is triggered to send a notification message to the second electronic device. For example, the applications in the document editing whitelist can be set by the user. For example, such as... Figure 5a As shown, the data collaboration control interface 501 may also include a document editing whitelist that triggers the document editing discovery service.
[0173] Furthermore, such as Figure 5a As shown, the data collaboration control interface 501 may also include a control for the list of first electronic devices, so as to set the list of first electronic devices that can be used for the data collaboration function, thereby preventing untrusted first electronic devices from establishing data collaboration connections with second electronic devices and improving the security of the data collaboration function.
[0174] S402, The first electronic device establishes a communication connection with the second electronic device.
[0175] There are several ways for the first electronic device and the second electronic device to establish a communication connection. They can establish a communication connection via Bluetooth, NFC, or Wi-Fi. For example, the second electronic device can trigger a communication connection via NFC to discover the first electronic device, receive a communication connection request from the first electronic device, and then establish a communication connection with it. Examples of methods a1-a3 are given below.
[0176] In method a1, the first electronic device and the second electronic device can establish a wireless connection with the same Wi-Fi / hotspot. The second electronic device can find the first electronic device with which it has established a communication connection through the communication connection. After the second electronic device establishes a wireless connection with the Wi-Fi hotspot, it can broadcast a Wi-Fi frame. The Wi-Fi frame can carry the identifier of the Wi-Fi hotspot with which the second electronic device has established a wireless connection, so that the first electronic device can know whether the second electronic device and the first electronic device have established a wireless connection with the same Wi-Fi hotspot based on the received Wi-Fi frame.
[0177] The interface for the data collaboration function of the second electronic device can display the identifier of the first electronic device discovered by the second electronic device. The identifier of the first electronic device may include the device icon of the first electronic device and / or the discovery name when the first electronic device acts as a collaboration server. For example, such as... Figure 5cAs shown in (a), taking a mobile phone as the first electronic device and a laptop as the second electronic device as an example, the user opens the laptop's data collaboration function. In response to the user's click, the laptop displays a first device search interface. This first device search interface can be a device search interface 530 for the laptop's data collaboration service. This device search interface 530 can include an identifier of the discoverable first electronic device, specifically, such as... Figure 5c As shown, the device search interface includes a mobile phone icon 540 and the discovery name 550 when the mobile phone acts as a collaboration server. This allows users to easily distinguish the type of collaboration server device discovered by the second electronic device, such as whether the collaboration server device type is a tablet or a mobile phone. In some other embodiments of this application, the first device search interface may not distinguish the discovered devices according to the type of collaboration server device.
[0178] For example, in some other embodiments, the user can interact with a prompt box in the notification bar or taskbar of the second electronic device, and in response to the interaction, the second electronic device opens the first device search interface. In other embodiments, the user can interact with relevant icons in the notification bar or taskbar of the second electronic device, and in response to the interaction, the second electronic device opens the first device search interface. In response to a data collaboration request operation performed on the first device search interface, the second electronic device displays a login interface, which prompts the user to enter a username and password for login authentication. This login interface can also be referred to as a verification interface, used to prompt for the user to enter a username and password for login authentication.
[0179] When passwordless access is not permitted on the first electronic device, the user... Figure 5c In the first device search interface shown, after an operation is performed on the identifier of the first electronic device, in response to the operation, the second electronic device displays a login interface for the user to enter a username and password for login authentication. The second electronic device then sends the entered username and password to the first electronic device in a communication connection request message.
[0180] After receiving confirmation input from the user, the second electronic device can send the username and password entered by the user to the first electronic device via the aforementioned wireless access point, carrying the communication connection request information.
[0181] For example, in combination Figure 5c In (a), the user is Figure 5c In the first device search interface 530 shown in (a), after clicking the identifier of the first electronic device, in response to the click operation on the identifier of the first electronic device, as follows: Figure 5cAs shown in (b), the laptop displays a login interface 560, which may include a pop-up window for the user to enter a username and password for login authentication. After the laptop displays the pop-up window, the user can enter the username and password in the pop-up window and click the connect button after entering them. In response to the click operation on the connect button, the laptop sends the username and password entered by the user in a communication connection request message to the mobile phone via the wireless access point.
[0182] The first electronic device receives a communication connection request from the second electronic device from the first port and verifies the validity of the username and password carried in the communication connection request. The first port is the service port of the local area network cooperative access protocol.
[0183] In this system, after the first electronic device enables the data collaboration function, it can monitor the first port to promptly detect whether other electronic devices need to establish a communication connection with it. After the first electronic device receives a communication connection request from the second electronic device forwarded via the wireless access point from the first port, it can verify the legitimacy of the second electronic device based on this request. Specifically, the first electronic device can verify the username and password entered by the user carried in the received communication connection request. For example, this legitimacy verification operation can be performed at the application layer or at the hardware abstraction layer.
[0184] In other embodiments of this application, after the first electronic device passes the legitimacy verification of the second electronic device, the first electronic device may also display a notification message to inform the user that a device has successfully established a connection with the first electronic device, and can establish a data transmission scenario with the first electronic device. For example, the legitimacy verification is performed by the hardware abstraction layer. After the hardware abstraction layer passes the legitimacy verification of the second electronic device, the hardware abstraction layer may send a notification message to the application framework layer indicating that an existing electronic device has successfully established a connection with the local device and can establish data collaboration with the local device. After receiving the notification message, the application framework layer forwards the notification message to the application layer. After receiving the notification message, the application layer may display a notification message on the notification bar or status bar displayed on the mobile phone touchscreen to indicate that an existing electronic device has successfully established a connection with the local device and can establish data collaboration with the local device. For example, the mobile phone may display a notification message in the notification bar displayed on the mobile phone touchscreen to inform the user that an existing electronic device has successfully established a connection with the local device and can establish a data collaboration scenario with the local device.
[0185] In other embodiments of this application, where passwordless access is permitted on the first electronic device side, the user... Figure 5cIn the first query device interface shown, after operating on the identifier of the first electronic device, in response to the operation on the identifier of the first electronic device, the second electronic device can send a data collaboration request message to the first electronic device to request the activation of the data collaboration function of the first electronic device.
[0186] In method a2, the second electronic device can locate the first electronic device with which it has established a communication connection.
[0187] The communication connection between the first electronic device and the second electronic device can be established in various ways mentioned above. One possible implementation is that the second electronic device discovers the first electronic device via a local area network (LAN). For example, the first and second electronic devices could be located on the same LAN, allowing the second electronic device to search for all first electronic devices within that LAN. Alternatively, the second electronic device could discover the first electronic device via NFC. In this case, both the first and second electronic devices are not limited to being connected to a LAN; they can also discover each other. For instance, if the first electronic device is not connected to the internet, but the second electronic device is connected to a mobile network via data traffic, the second electronic device can locate the first electronic device via NFC.
[0188] For example, a communication connection request can be triggered by a first electronic device, that is, the first electronic device sends a communication connection request to a second electronic device. For instance, a user can use the scanning function of the first electronic device to scan a QR code or other identifier on the second electronic device, thereby the first electronic device sending a communication connection request to the second electronic device based on the obtained identifier; or, the user can use the NFC function of the first electronic device to obtain the NFC identifier of the second electronic device and send a communication connection request to the second electronic device. The second electronic device can respond to the operation acting on the found communication connection request of the first electronic device by sending a communication connection response to the first electronic device. The first electronic device confirms the establishment of a communication connection by sending the communication connection response.
[0189] For example, a communication connection request can also be triggered by a second electronic device. For instance, a user can obtain the Bluetooth identifier of the first electronic device through the Bluetooth function of the second electronic device and send a communication connection request to the first electronic device. Upon receiving the communication connection request, the first electronic device sends a communication connection response to the second electronic device. The second electronic device confirms the establishment of a communication connection with the first electronic device based on the sent communication connection response. Alternatively, before sending a communication connection response to the second electronic device, the first electronic device can display a connection request interface, and the user can confirm the establishment of a communication connection with the second electronic device in response to operations performed on the communication connection request interface.
[0190] The process of sending a communication connection request in method a2 to perform verification on the first electronic device can be referred to method a1, and will not be repeated here.
[0191] In method a3, if the first electronic device and the second electronic device can establish connections with the Wi-Fi hotspot respectively, and the first electronic device and the second electronic device trust each other, then the first electronic device that can establish a communication connection with the second electronic device is determined.
[0192] One possible implementation is that the second electronic device establishes a communication connection with the first electronic device by default, thus avoiding disturbance to the user.
[0193] There are various scenarios where mutual trust exists, and the following examples illustrate these scenarios using method b1 and method b2.
[0194] Method b1: The first electronic device and the second electronic device log in to the same account. This account can be an account provided by the operator to the user, such as a Honor account or Huawei account, or an application account, such as a social application account or a video application account. The Wi-Fi frame can also carry this account so that the first electronic device can determine whether the second electronic device and the first electronic device are logged into the same account.
[0195] For example, when the first electronic device and the second electronic device establish a connection with the same Wi-Fi hotspot, the first electronic device obtains the second user identifier of the second electronic device, such as the Huawei account logged in by the second electronic device, and determines whether the second user identifier of the second electronic device is the same as the first user identifier stored in the first electronic device, such as the Huawei account logged in by the first electronic device. If the first electronic device determines that the second user identifier is the same as the first user identifier, it indicates that the first electronic device and the second electronic device trust each other. At this time, the first electronic device can automatically establish a communication connection with the second electronic device.
[0196] Method b2, a scenario of mutual trust, can be a first electronic device and a second electronic device that have previously established a communication connection.
[0197] For example, the second electronic device may store the first electronic device with which it has previously established a communication connection. The second electronic device may regard the first electronic device as a trusted first electronic device. At this time, the interface of the second electronic device may display a list of trusted first electronic device identifiers. In response to the selection operation in the list of trusted first electronic device identifiers, the second electronic device determines the first electronic device with which it currently establishes a communication connection, and sends a communication connection request to the first electronic device. The second electronic device then receives a communication connection response from the first electronic device to complete the establishment of a communication connection between the first electronic device and the second electronic device.
[0198] Optionally, a notification message can also be displayed on the screen of the second electronic device. For example, a first connection message can be displayed on the second electronic device to prompt the user that the second electronic device has established a communication connection with the first electronic device. Similarly, a notification message can also be displayed on the touchscreen of the first electronic device to notify the user that the second electronic device has established a communication connection with the first electronic device. For example, a first connection message can be displayed on the first electronic device to prompt the user that the second electronic device has established a communication connection with the first electronic device.
[0199] The process of sending a communication connection request in method a3 to perform authentication on the first electronic device can be referred to method a1, and will not be repeated here.
[0200] Optionally, a first response message can also be displayed on the screen of the second electronic device. This first response message confirms that the first and second electronic devices have enabled data collaboration. That is, the first response message notifies the user that the first electronic device has enabled the data collaboration function and that a communication connection has been established between the first and second electronic devices. Figure 5d As shown, a data collaboration control interface can also be displayed on the notification bar of the second electronic device. This interface includes a prompt message, such as: "Use HUWEI p40 to perform data collaboration with this device." The data control interface 510 can also include a prompt message for the first electronic device (e.g., the discovery name of the first electronic device is HUAWEI p40), such as: "HUAWEI p40 connected." This notifies the user that the first electronic device has enabled the data collaboration function and that a communication connection has been established between the first and second electronic devices. Similarly, a notification message can also be displayed on the touchscreen of the first electronic device to notify the user that the first electronic device has enabled the data collaboration function and that a communication connection has been established between the second and first electronic devices. For example, as... Figure 6b As shown in (a), a data collaboration control interface 710 is displayed on the notification bar of the first electronic device. The data collaboration control interface 710 includes a prompt message for the data collaboration service, which may be: "Use your mobile phone to collaborate with HUWEI MATEBOOK". The data control interface 710 may also include a prompt message for a second electronic device (e.g., the discovery name of the second electronic device is HUWEIMATEBOOK) that establishes a connection, which may be: "Connected to HUAWEI MATEBOOK".
[0201] In a scenario where the first electronic device establishes a communication connection with the second electronic device, the second electronic device can detect the first electronic device, thus preparing for the user to receive collaborative data sent by the first electronic device on the second electronic device.
[0202] Furthermore, during the process of establishing a communication connection between the first electronic device and the second electronic device, in order to avoid frequent operation of the data collaboration function by the user, one possible implementation is that the second electronic device can pre-set the trigger conditions for enabling the data collaboration function. For example, when the first electronic device and the second electronic device establish a communication connection and the second electronic device opens a document editing application, the second electronic device automatically enables the data collaboration function.
[0203] Correspondingly, the first electronic device can also pre-set trigger conditions for enabling the data collaboration function. For example, after the first electronic device establishes a communication connection with the second electronic device, the first electronic device automatically enables the data collaboration function. After enabling data collaboration, it sends a first response message to the second electronic device. The first response message is used by the second electronic device to confirm that the first electronic device and the second electronic device have enabled data collaboration. Optionally, the second electronic device can also display the first response message on the display screen, which can be displayed in the notification bar (e.g., as shown in the notification bar). Figure 5d The message "Connected to HUAWEI p40" can be displayed in the system or via a pop-up window. For details on how it is displayed, please refer to the display method of the first notification message.
[0204] Another possible implementation, considering that the communication connection is used to implement data collaboration functionality, allows the user to configure the data collaboration control interface on the second electronic device to search for first electronic devices that have enabled data collaboration. This ensures that the second electronic device only establishes a communication connection with the first electronic device that has enabled data collaboration, thereby improving the security of the communication connection. For example, the second electronic device establishes a communication connection with the first electronic device only when it determines that the first electronic device has enabled data collaboration.
[0205] Correspondingly, the first electronic device can be pre-configured to enable data collaboration.
[0206] The following examples illustrate how to enable data collaboration features (A1-A5).
[0207] In method A1, the second electronic device can send a data collaboration request to the first electronic device in response to a data collaboration request operation performed on the first electronic device. The first electronic device, in response to a confirmation operation on the data collaboration request, displays a data collaboration control interface. In response to an operation performed on the data collaboration control interface, it confirms that the data collaboration function is enabled.
[0208] In this embodiment, the data collaboration function of the first electronic device can be implemented as a sub-function of the Chinese manuscript editing service function of the first electronic device. For example, in a Huawei mobile phone, the data collaboration function can be implemented as a sub-function of the HuaweiShare function of the phone. In this case, see [link to relevant documentation]. Figure 6a Users operate on the collaboration control interface displayed on the mobile phone touchscreen to configure the data collaboration function of the first electronic device. For example, the data collaboration control interface 610 includes a Huawei Share function switch button 620, a data collaboration service switch button 630, and may also include a document editing whitelist for triggering the data collaboration function of the second electronic device, and a list of trusted second electronic devices.
[0209] The main function of the Huawei Share toggle button 620 is to enable / disable the Huawei Share function. Users can operate the Huawei Share toggle button 620. After receiving the user's operation, the mobile phone can call the relevant system service interface to enable / disable the Huawei Share function and can also respond to the user's operation by switching the state of the Huawei Share toggle button 602 (e.g., from off to on). The aforementioned data collaboration control interface 610 may also include a real-time status indicator for the Huawei Share function. Figure 6a (Not shown in the image). Similarly, the main function of the data collaboration service switch button 630 is to turn the data collaboration service on / off. Users can operate the data collaboration service switch button 630. After receiving the operation on the data collaboration service switch button 630, the mobile phone can call the relevant system service interface to turn the data collaboration service on / off, and can respond to the user's operation by switching the state of the data collaboration service switch button 630 (e.g., from off to on). The aforementioned data collaboration control interface 610 may also include a real-time status indicator for the data collaboration service (…). Figure 6a (Not shown in the image).
[0210] In one possible implementation, such as Figure 6b As shown in (a), the user operates the collaboration control 720 (input) of the data collaboration function on the first prompt box 710 in the notification bar displayed on the mobile phone touch screen to enable the data collaboration function of the first electronic device. The notification bar can be an interface displayed on the mobile phone touch screen, such as the one displayed after the user performs a swipe operation on the mobile phone's home screen.
[0211] For example, in combination Figure 3 and Figure 5a When a user wants to collaborate on text creation between a first electronic device and a second electronic device, the user can touch the collaboration switch button 502 for the data collaboration function on the collaboration control interface 501 displayed on the touchscreen of the first electronic device. At this time, the application layer of the operating system running on the phone can detect the operation to enable the data collaboration function. The application layer converts the detected operation into a request to enable the data collaboration function and passes it to the application framework layer of the operating system running on the phone. Upon receiving the request, the application framework layer calls the service interface that communicates with the hardware abstraction layer (HAL) of the operating system running on the phone to pass the request to enable the data collaboration function to the HAL. Upon receiving the request to enable the data collaboration function, the HAL enables the phone's data collaboration function. For example, the HAL can start two daemons to enable the phone's data collaboration function. The first daemon can provide data collaboration services, user permission verification, and can enable document editing discovery services, while the second daemon can enable the laptop to receive local text data files from the Linux kernel layer of the operating system on the phone.
[0212] In some other embodiments of this application, the collaboration switch button for the above-mentioned data collaboration function can be a physical button, which can be disposed on a surface of the first electronic device; when the user's finger presses or toggles the physical button (i.e., the first input mentioned above), the first electronic device enables the data collaboration function, and when the user's finger presses or toggles the physical button again, the first electronic device can disable the data collaboration function.
[0213] In method A2, the second electronic device establishes a communication connection with the first electronic device by default, and the first electronic device automatically enables the data collaboration function to avoid disturbing the user.
[0214] For example, the first electronic device can enable the data collaboration function in response to the user setting the default data collaboration function on the data collaboration control interface, before establishing a communication connection with the second electronic device.
[0215] In method A3, the first electronic device may also automatically activate the data collaboration function of the first electronic device when certain conditions are met (e.g., S404, the first electronic device receives a data collaboration request from the second electronic device, the first electronic device meets a preset gesture, etc.).
[0216] In method A4, the first electronic device and the second electronic device can each establish a connection with the Wi-Fi hotspot, and if the first electronic device and the second electronic device trust each other, the first electronic device that can establish a communication connection with the second electronic device can automatically enable the data collaboration function.
[0217] For example, the first electronic device can set up a trusted second electronic device in the data collaboration control interface, and after the first electronic device establishes a communication connection, the first electronic device can enable the data collaboration function.
[0218] In method A5, the interface of the second electronic device can display a list of trusted identifiers of the first electronic device. In response to a selection operation on the list of trusted identifiers of the first electronic device, the first electronic device currently establishing a communication connection with the second electronic device is determined, and the second electronic device sends a data collaboration request to that first electronic device. In response to a confirmation operation on the data collaboration request, the first electronic device confirms that the data collaboration function is enabled and establishes a communication connection with the second electronic device.
[0219] In this embodiment, after the data collaboration function is enabled, the touchscreen of the first electronic device can also display a collaboration status indicator, which indicates that the data collaboration function has been enabled. For example, after enabling the data collaboration function at the hardware abstraction layer, a notification message indicating that the data collaboration function has been enabled can be sent to the application framework layer. Upon receiving the notification message, the application framework layer forwards it to the application layer. Upon receiving the notification message, the application layer can display a collaboration status indicator on the phone's touchscreen to indicate that the data collaboration function has been enabled. For example, as... Figure 6c As shown, the mobile phone can display a collaboration icon 740 in the status bar 730 on the phone's touchscreen to indicate to the user that the phone's data collaboration function has been enabled. The first electronic device can monitor the real-time status of the data collaboration service in the settings database by registering as an observer. As the status of the data collaboration service changes, the real-time status indicator of the data collaboration service can be updated accordingly in the control interface 601, or it can be updated in the notification bar; this is not limited to this.
[0220] In conjunction with the above embodiments, the data collaboration control interface 610 may also include a switch button visible to the second electronic device. For example, the first electronic device can only receive the data collaboration request from the second electronic device when both the data collaboration service switch button 630 and the switch button visible to the second electronic device establishing the communication connection are simultaneously activated.
[0221] Optionally, the data collaboration control interface 610 may also include a pop-up window for toggling the visibility range. Figure 6a(Not shown in the image), this pop-up is used by the user to switch the visibility range of data collaboration. The user can trigger the pop-up to appear on the phone's touchscreen by operating in the settings interface or the notification options in the notification bar. If the pop-up was displayed, it will disappear when the status of the data collaboration service changes. In some embodiments, when the user selects "All Devices" as the visibility range, the phone may display a prompt pop-up to remind the user of the risks associated with enabling the data collaboration service when the phone is connected to an open Wi-Fi access point or allows passwordless access from other electronic devices. Additionally, when the user enables the data collaboration service, the phone can also verify the user's permissions, such as whether to allow enabling the data collaboration service and / or whether to allow access to the Huawei account.
[0222] In other embodiments of this application, users can also set the discovery name when the first electronic device acts as a collaboration server, the range of collaboration data that the collaboration client can access, and the username and password for login authentication in the collaboration control interface.
[0223] For example, in combination Figure 3 and Figures 5a-5dAs shown, taking the example of a user wanting to set a username and password for login authentication, the data collaboration control interface 510 also includes a computer access verification option. The user can operate on the computer access verification option in the data collaboration control interface 510. At this time, the application layer can detect the above operation. After the application layer converts the above operation into a request to set the username and password for login authentication, it passes it to the application framework layer. Upon receiving the request, the application framework layer provides the application layer with the function to set the username and password for login authentication. At this time, the application layer can, according to the function provided by the application framework layer, respond to the above operation and display a username and password setting window on the phone's touchscreen. The user can enter the corresponding username and password in this username and password setting window, and after entering them, click the OK button. Based on the click operation on the OK button, the application layer transmits the username and password entered by the user to the application framework layer. After receiving the username and password, the application framework layer calls the service interface for communication with the hardware abstraction layer to pass the received username and password to the hardware abstraction layer. After receiving the username and password, the Hardware Abstraction Layer (HAL) stores them in the Document Editing Discovery Service Password to enable the setting of the login authentication username and password. In other embodiments of this application, besides storing the username and password in the Document Editing Discovery Service Password of the HAL, a copy of the username and password can also be stored in the application framework layer. This allows for verification of the validity of the username and password entered by the user on the computer by retrieving the valid username and password from the copy stored in the application layer, reducing interactions between layers. In other embodiments of this application, the user may not set a login authentication username and password; in this case, the default configuration will be used. In other embodiments of this application, if the user deletes the default login authentication username and password and does not set a new one, the second electronic device can access the first electronic device automatically without needing to enter a username and password. Furthermore, in some embodiments of this application, the first electronic device can provide the user with an interface to select whether access to the second electronic device requires authentication, thus deciding whether to enable passwordless access.
[0224] For example, let's take the user wanting to set the discovery name when the mobile phone is used as a collaboration server as an example, such as... Figure 5aAs shown, the user can operate the computer-side display name option (first electronic device list) in the data collaboration control interface 510. At this time, the application layer can detect the above operation. After the application layer converts the above operation into a request to set the discovery name, it passes it to the application framework layer. Upon receiving the request, the application framework layer provides the application layer with the function to set the discovery name. At this time, the application layer, in response to the above operation, can display the discovery name setting window on the phone's touchscreen. The user can enter the corresponding name in this discovery name setting window and click the OK button after entering the name. Based on the click operation of the OK button, the application layer transmits the name entered by the user to the application framework layer. Upon receiving the name, the application framework layer calls the service interface for communication with the hardware abstraction layer to pass the received name to the hardware abstraction layer. After receiving the name, the hardware abstraction layer stores the received name in the data collaboration configuration file to realize the setting of the discovery name. In some embodiments, the mobile phone can also perform a validity check on the discovery name entered by the user before the user clicks the OK button. The user can only click the OK button if the entered discovery name is valid; if the entered discovery name is invalid, a prompt box can be displayed to inform the user that the discovery name is invalid. In other embodiments of this application, in addition to being stored in the data collaboration configuration file of the hardware abstraction layer, a copy of the discovery name can also be stored in the application framework layer. This way, when the discovery name needs to be queried later, it can be retrieved from the copy stored in the application layer, reducing the interaction between layers. In other embodiments of this application, the user may not set the discovery name, in which case the discovery name will use the default configuration. For example, as... Figure 5c As shown in (a), the default discovery name when the mobile phone acts as the collaboration server is: Huawei Mobile Phone 1. If the user does not modify this discovery name, the name of the collaboration server found on the laptop will be Huawei Laptop.
[0225] In this embodiment of the application, when a user sets up the data collaboration function for the first time, the first electronic device can display a series of guided interfaces to guide the user in setting up the data collaboration function. The first electronic device can also save the user's setting preferences so that the collaboration function can be set up according to the user's setting preferences next time.
[0226] It should be noted that there is no specific order requirement for S401 and S402. In practice, S401 and S402 can be executed simultaneously, or S402 can be executed first and S401 second, or vice versa. The steps for enabling the data collaboration function can be executed simultaneously with establishing a network connection, or after S404, depending on the specific scenario. The specific implementation method for executing after S404 is described below.
[0227] S403, in response to a first operation applied to a document editing application, the second electronic device sends a first notification message to the first electronic device.
[0228] like Figure 7a As shown, the second electronic device can determine that it is in a document editing scene based on whether its display focus is located in the document editing box 720 of the document editing application 710, or it can determine that it is in a document editing scene based on whether its display focus is located on the document editing application 710.
[0229] One possible implementation is that the second electronic device can send a first notification message to the first electronic device when it determines that the second electronic device is in a document editing scenario.
[0230] Another possible implementation is that the second electronic device can send a first notification message to the first electronic device when it determines that a data collaboration scenario has been triggered. Specifically, the second electronic device can determine that a data collaboration scenario has been triggered in response to an operation performed on the document editing application. Combining methods 1 and 2, the second electronic device determines that a data collaboration scenario has been triggered in response to a user selecting a text editing box in the document editing application and triggering the data collaboration scenario. Alternatively, the second electronic device can determine that a data collaboration scenario has been triggered in response to a user selecting a text editing box of a preset type. Thus, the second electronic device can send a first notification message to the first electronic device to establish a data collaboration scenario.
[0231] The first notification message sent by the second electronic device may also include an identifier of the document editing software in which the second electronic device is focused, to notify the user whether collaborative text input is required through the first electronic device in the document editing software in which the second electronic device is focused.
[0232] In some possible implementations, the document editing application may include only one window (interface). In other possible implementations, the document editing application may include multiple windows (interfaces), such as in cases of multiple application windows or floating windows. Considering the scenario where multiple application interfaces may be displayed simultaneously on the second electronic device, the second electronic device includes multiple editing interfaces. Figure 7b As shown, the second electronic device currently has two applications open: a document editing application and application 1. The document editing application has two interfaces: interface 710 for document 1 and interface 712 for document 2. Interface 710 includes an editing box 720 for document editing, and interface 712 includes an editing box 722 for document editing. Application 1 has one interface 711 open. Application 1 includes an editing box 721 for document editing. The second electronic device can switch the user's focus to the document editing application (e.g., ...). Figure 7b When the user opens a document editing application (such as the interface shown in Document 1), the second electronic device is determined to be in a document editing scenario. Figure 7b When the interface of document 1 or document 2 is shown, the second electronic device is determined to be in a document editing scenario. Therefore, the second electronic device can send notification messages of the multiple document editing applications to the first electronic device; these notification messages can be used to notify the second electronic device of multiple document editing boxes of the multiple document editing applications; thus, upon receiving the notification message, the first electronic device displays multiple editing preview interfaces of the multiple document editing boxes on the data collaboration interface (e.g., as shown in the image). Figure 8a The editing preview interface in the third control shown in (b) above, or, as... Figure 8a (c) shows the fourth control corresponding to the displayed editing preview interface; in response to a switching operation applied to the plurality of editing preview interfaces, a switching message is sent to the second electronic device; the switching operation is used to indicate the second document editing box after switching; after receiving the switching message sent by the first electronic device, the second electronic device switches the focus of the second electronic device to the second document editing box. Thus, the second electronic device can receive the third text data sent by the first electronic device and display the third text data on the second document editing box.
[0233] S404. The data collaboration service of the first electronic device receives the first notification message and displays the first prompt box on the first electronic device.
[0234] The first prompt can be displayed in the notification bar, for example, as shown below. Figure 6b As shown in (a) above, a first notification box 710 is displayed in the notification bar. Alternatively, the first notification box can also be displayed on the main interface of the first electronic device, for example, Figure 6bAs shown in (b) above, a first prompt box 730 is displayed on the main interface of the first electronic device. The first prompt box may include first prompt information to display a first notification message. Figure 6b As shown in (a) and (b), taking the second electronic device identified as HUWEIMATEBOOK as an example, the prompt message could be: "Use your mobile phone to collaborate with HUWEI MATEBOOK on data."
[0235] One possible implementation is to display a first control on the first prompt box in response to an operation performed on the first prompt box, such as a swipe operation, a selection operation, etc.
[0236] like Figure 6b As shown in (a) above, the first control 711 included in the first prompt box 710 can be a confirmation control, used to prompt the user to click the first control to enter the data collaboration display interface. The first prompt box 710 may also include an ignore control 712, used by the user to close the first prompt box 710. Figure 6b As shown in (b), the first control 731 included in the first prompt box 730 can be a confirmation control, used to prompt the user to click the first control to enter the data collaboration display interface. The first prompt box 730 may also include an ignore control 732, used by the user to close the first prompt box 730.
[0237] Furthermore, the first control can also be a collaboration switch for the data collaboration function. This switch can be used to turn the data collaboration function on or off. For example, as... Figure 6a As shown, the first prompt box can be a collaborative control interface popped up by the first electronic device. The collaboration switch button for the data collaboration function can be included in the collaborative control interface. For example, in some embodiments, the first operation can be the user's operation of the collaboration switch button 630 for the data collaboration function in the data collaboration control interface 610 displayed on the mobile phone touch screen. In response to the operation of the collaboration switch button 630 for the data collaboration function, the state of the collaboration switch button 630 for the data collaboration function will change, such as changing from a closed state to an open state. When the collaboration switch button for the data collaboration function is in the open state, the first electronic device confirms entry into the data collaboration scenario.
[0238] When a user activates the data collaboration function using the first control, the first electronic device displays the data collaboration interface. When a user deactivates the data collaboration function using the first control, the first electronic device displays a notification message indicating that the data collaboration function is deactivated. The display method of this notification message can refer to the display method of the first prompt box, and will not be repeated here. The user's operation of switching the data collaboration function on and off on the first electronic device can include: clicking, swiping, double-clicking, multi-gesture operations, or voice control, etc., and is not limited here.
[0239] S405, In response to the first user action applied to the first control, a data collaboration interface pops up.
[0240] The first user operation can be a confirmation operation. In this case, in response to the confirmation operation applied to the first control, the first electronic device can confirm that the data collaboration function is enabled. Optionally, the first electronic device can also execute S405a and send a first response message to the second electronic device. The first response message is used to confirm that the data collaboration function between the first and second electronic devices is enabled. Thus, after the second electronic device receives the first response message, the data collaboration service can be displayed in the notification bar, confirming that the first and second electronic devices have established data collaboration.
[0241] In response to a confirmation operation applied to the first control, the first electronic device displays a data collaboration interface on its screen. One possible implementation is that the data collaboration interface can be displayed on the first electronic device as a first display frame.
[0242] like Figure 8a As shown in (a), the first display box 810 may include at least one of the following: a second prompt message, and a second control 820.
[0243] The second prompt message can be used to indicate that a data collaboration scenario has been activated, and to request voice input.
[0244] The second control 820 may include a collaboration operation button for data collaboration functions. This operation button is used to enable or disable functions such as user voice collection, text input, and text manipulation.
[0245] Furthermore, considering that the second electronic device may have multiple document editing applications open, the first display box 810 may also include a third control, such as... Figure 8aAs shown in (b), the third control 830 can display the editing preview interface of multiple document editing boxes on the second electronic device, i.e., small icons of the interfaces of multiple document editing applications opened on the second electronic device (including Document 1, Document 2, and Application 1), used by the user to select the interface of the document editing application corresponding to the collaboratively created document. For example, in response to the operation on the icon of Document 1, the second electronic device switches to the document editing application of Document 1 to collaborate with the first electronic device. In response to the operation on the icon of Document 2, the second electronic device switches to the document editing application of Document 2 to collaborate with the first electronic device. In response to the operation on the icon of Application 1, the second electronic device switches to the document editing box of Application 1 to collaborate with the first electronic device. Of course, the switching process can be that the first electronic device sends the corresponding interface identifier to the second electronic device when it determines the small icon selected by the user, thereby achieving real-time switching. Another possible approach is that after the first electronic device determines the text to be sent and sends the text to be sent to the second electronic device, it simultaneously sends the interface identifier to the second electronic device. Thus, after receiving the text to be sent and the interface identifier, the second electronic device switches the focus to the interface and displays the text to be sent on that interface.
[0246] Considering that the second electronic device may have multiple document editing applications open, and each application may have at least one editable document editing box, the first electronic device can identify these applications by receiving notification messages from them. Consequently, multiple preview interfaces of these document editing applications are displayed on the data collaboration interface. This notification message can also be used to notify the first electronic device of the multiple document editing boxes on the second electronic device, allowing the first electronic device to identify these multiple document editing boxes and display them on the data collaboration interface.
[0247] In response to a switching operation applied to the plurality of editing preview interfaces, a switching message is sent to the second electronic device; the switching operation indicates the second document editing box after the switch; the switching message instructs the second electronic device to switch its focus to the second document editing box. For example, if the current focus of the second electronic device is on the first document editing box of the first document editing application, after receiving the switching message, the second electronic device can switch its focus from the first document editing box of the first document editing application to the second document editing box of the second document editing application. At this time, if the first electronic device collects second voice data, converts the second voice data into third text data, and displays the third text data on the data collaboration interface; in response to a second user operation, the third text data is sent to the second electronic device. Correspondingly, the second electronic device receives the third text data sent by the first electronic device and can display the third text data on the second document editing box.
[0248] In one possible embodiment, multiple editing preview interfaces can be displayed within a first display frame. For example, the first display frame may further include a fourth control, such as... Figure 8a As shown in (c), the fourth control 840 can be a button for the next focus interface (e.g., an edit box). In response to an operation performed on the fourth control 840, the focus in the second electronic device can be moved to the next editable edit box. Furthermore, the fourth control 840 may also include an editing preview interface for the focus interface in the second electronic device to ensure that the focus interface currently selected by the user is the focus interface desired by the user.
[0249] S406. In response to a first operation acting on a first display frame, receive first voice data from the user and display first text data on a data collaboration interface.
[0250] Users can perform actions on the collaboration buttons of the data collaboration function of the first electronic device, including clicking, swiping, double-clicking, multi-gesture operation, or voice control, etc., without limitation.
[0251] Users can perform voice input based on the second control 820 in the first display frame.
[0252] like Figure 8a As shown in (a)-(c), voice input can be achieved by long-pressing the second control. When the user presses the second control, voice signal reception begins; when the user releases the second control, voice signal reception stops, thus completing one voice input. Alternatively, clicking the second control triggers the voice input function, and the current voice input status is displayed in the first display box. Responding to the user clicking the second control again, voice signal reception stops, thus completing one voice input.
[0253] The second control 820 can call a speech recognition application to recognize the input speech. In this embodiment, the speech recognition application called by the second control can be the speech recognition application that is the default of the first electronic device, or it can be a third-party application that the user sets in the speech recognition settings interface. No limitation is made here.
[0254] The first voice data is recognized as initial text data, and the initial text data is displayed on the data collaboration interface. One possible approach is as follows: Figure 8b As shown in (a) above, the first display box may also include a preview interface 850. The preview interface 850 is used to display the converted initial text data.
[0255] There are several ways to display the text. For example, one possible approach is to simultaneously recognize the received voice data during voice input, convert it into text, and then display the converted text in the preview interface of the first display box. Another possible approach is to recognize the input voice data after each voice input is completed and display the recognized text on the preview interface. Furthermore, error correction can be performed on the recognized text, and the error correction process can be displayed simultaneously on the preview interface.
[0256] S407. In response to a confirmation operation performed on the first display frame, first text data is sent to the second electronic device.
[0257] The confirmation operation applied to the first display box can confirm that the text in the preview interface is the text data to be sent.
[0258] For example, such as Figure 8b As shown in (b), the first display box 810 may also include an editing control 860, which can be a confirmation button for the user to confirm that the text in the preview interface is the text to be sent.
[0259] Before the user confirms the text to be sent, the user can also edit the text in the preview interface. In this case, the data collaboration interface can include an editing control for editing the text in the preview interface. Thus, in response to a third user operation acting on the editing control, the first electronic device determines an editing instruction for the initial text data and displays the edited initial text data on the data collaboration interface; in response to a second user operation, the first electronic device uses the edited initial text data as the first text data. There can be multiple editing methods; methods c1-c3 are illustrated below.
[0260] In method c1, the preview interface 850 can be an editable interface, which can display a cursor to show the position of the currently inserted text. In response to user clicks on the cursor in the editable interface, such as moving the cursor or selecting at least one text, the preview interface 850 displays the cursor position or the selected text. In response to actions performed on the voice confirmation control, the system receives user-inputted voice data, recognizes the user's voice input, and inserts or updates the displayed text at the cursor position or the position of the selected text.
[0261] In method c2, the text in the preview interface 850 can be selected by the user. In response to the selection operation on the text, an editing control is displayed. This editing control can include sub-controls for deletion, insertion, line break, backspace, copy, and paste. In response to a click operation on the editing control, the text can be edited. For example, adding line breaks, punctuation marks, and modifying text content can be done.
[0262] In method c3, the preview interface 850 can be an editable interface. In response to a user clicking on this editable interface, a keyboard input box is displayed. Responding to actions performed on the keyboard input box, the system receives the text entered by the user and displays it in the preview interface, enabling text editing.
[0263] The text data sent from the first electronic device to the second electronic device can also be rich text data. For example, the first text data sent by the first electronic device may include: initial text data and editing instructions for the initial text data. One possible implementation is that the rich text data includes: fields for rich text editing operations. The protocol satisfied by the text data can be a pre-set protocol, for example, such as... Figure 9aAs shown, the protocol fields may include a protocol number (Cmd), fields corresponding to the requester and responder, and a text data field. For example, a Cmd value of 0x01 indicates that the requester sends a first notification message to the responder to establish a data collaboration scenario. A Cmd value of 0x02 indicates that the requester sends a second notification message to the responder to notify that the data collaboration scenario has been interrupted. A Cmd value of 0x03 indicates that the requester sends text data to the responder to notify the responder to receive the text data; this text data may consist only of text and exclude rich text editing instructions. A Cmd value of 0x04 indicates that the requester sends text data to the responder to notify the responder to receive the text data; this text data may include both text and rich text editing instructions. The fields corresponding to the requester and responder can occupy 4 bits; for example, 0x01 indicates that the second electronic device sends a text input request to the first electronic device, and 0x81 indicates that the first electronic device sends a text input response to the second electronic device. 0x02 indicates that the first electronic device sends a text input request to the second electronic device, and 0x82 indicates that the second electronic device sends a text input response to the first electronic device.
[0264] S408. The second electronic device receives the first text data and displays the first text data in the first document editing box of the first document editing application.
[0265] After receiving the first text data through the application layer, the second electronic device parses the text data field in the first text data and sends the text data field to the kernel layer. The kernel layer stores the text data field in the keyboard buffer, and then displays it on the first document editing box of the first document editing application through the keyboard buffer.
[0266] The following examples, C1-C3, illustrate how the application layer transmits text data fields and other fields of text data to the core layer and stores them in the keyboard buffer. Figure 9b As shown.
[0267] Method C1 converts the text data fields and other fields parsed from the protocol into UNICODE keyboard codes at the application layer, and sends the converted UNICODE keyboard codes to the keyboard buffer at the kernel layer.
[0268] Method C2 involves adding a keyboard driver at the application layer. This driver parses the text data field and other fields, generating a Unicode keyboard code. The generated Unicode keyboard code is then sent to the keyboard buffer via an interface between the keyboard driver and the buffer. This method improves the success rate of parsing the text data field and other fields.
[0269] Method C3 involves adding a third-party application's input method interface to the application layer. Through this interface, the first text data is transmitted to the corresponding keyboard driver of the third-party application. The keyboard driver then parses the text data fields and other fields, generating a UNICODE keyboard code, which is then input into the keyboard buffer. It should be noted that this method requires a second electronic device to load the third-party application to enable the text data to be stored in the keyboard buffer via the application's keyboard driver.
[0270] S409. The first electronic device determines that the second electronic device has successfully received the first text data, deletes the first text data, and deletes the first text data on the display interface of the first display box.
[0271] In some embodiments of this application, the first electronic device can determine that the second electronic device has successfully received the first text data by receiving a first confirmation message sent by the second electronic device. This first confirmation message is used to indicate that the second electronic device has successfully received the first text data.
[0272] In other embodiments of this application, the data collaboration function of the first electronic device can be turned off after the data collaboration scenario between the second electronic device and the first electronic device ends. One possible implementation is that the user actively turns off the data collaboration function of the first electronic device. In this case, in response to the closing operation on the data collaboration interface, the application layer can detect the closing operation on the data collaboration interface. After the application layer converts the above operation into a request to turn off the data collaboration function, it passes it to the application framework layer. After receiving the request, the application framework layer calls the service interface for communication with the hardware abstraction layer to pass the request to turn off the data collaboration function to the hardware abstraction layer. After receiving the request to turn off the data collaboration function, the hardware abstraction layer turns off the data collaboration function of the phone.
[0273] Another possible implementation is that the first electronic device can also dynamically monitor the communication connection status between itself and the second electronic device, or the connection status between itself and the wireless access point. If the first electronic device detects a disconnection between itself and the second electronic device, or a disconnection between itself and the wireless access point, it can automatically disable the data collaboration function to save power. Additionally, the first electronic device can display a notification message on its touchscreen to inform the user that its data collaboration function has been automatically disabled due to a disconnection between itself and the second electronic device, or a disconnection between itself and the wireless access point.
[0274] During collaborative text processing, the second electronic device needs to switch to other applications to handle other tasks, thus interrupting the data collaboration process. In the embodiments of this application, such as... Figure 10a As shown, the method for multi-device data collaboration may also include the following steps:
[0275] S501, the second electronic device responds to a second switching operation on the application and displays the switched interface on the second electronic device; the second switching operation is used to switch the focus of the second electronic device away from the third document editing application; the third document editing application is the third document editing application corresponding to the first electronic device when data collaboration with the second electronic device is interrupted. Thus, the data collaboration service of the second electronic device determines that the second electronic device has exited the data collaboration scenario.
[0276] One possible implementation is that the second switching operation on the application could be that the user jumps to another application, causing the focus of the second electronic device to switch to the display interface of that other application. The display interface of this other application could be the interface of a newly opened application, or it could be the interface of another already opened application that the user has switched the focus of the second electronic device to; there is no limitation on this.
[0277] Another possible implementation is that the second switching operation on the application could be displaying a notification message on the second electronic device, or receiving a pop-up window from another application (e.g., an instant messaging application, a video communication application, etc.), causing the focus of the second electronic device to switch to the display interface of the other application.
[0278] S502, the second electronic device sends a second notification message to the first electronic device.
[0279] The second notification message is used to notify the first electronic device that the focus of the second electronic device has been switched, so as to notify the second electronic device that the data collaboration with the first electronic device has been interrupted.
[0280] Furthermore, the data collaboration service of the second electronic device can store the third document editing box of the interrupted document editing application (third document editing application). When the data collaboration scenario is restored, the second electronic device can directly display the third document editing box of the third document editing application on the second electronic device based on the stored third document editing box, or move the focus of the second electronic device to the third document editing box of the third document editing application, thereby improving the response speed of restoring the data collaboration scenario.
[0281] S503, The first electronic device receives the second notification message and displays the second prompt box on the first electronic device.
[0282] The second prompt box is used to notify the user that the focus of the second electronic device has been switched.
[0283] like Figure 10b As shown in (a), the second prompt box 1010 may include a third prompt message, which may be: "The HUAWEI MATEBOOK data collaboration scenario has been interrupted." Furthermore, the second prompt box 1010 may also include a stop input control 1020, thereby, in response to an operation on the stop input control 1020, the first electronic device closes the data collaboration interface.
[0284] S504. Save the second text data that has not been sent on the preview screen.
[0285] One possible implementation is that the second text data can be directly stored in the cache area of the data collaboration service, or the second text data can also be cached in the corresponding file by creating a file corresponding to the document editing application selected by the user on the second electronic device.
[0286] In some embodiments of this application, the above-mentioned files can be dynamically updated. For example, the application framework layer can monitor the text data in the preview interface on the mobile phone. When it detects that the text data in the preview interface has changed, it notifies the hardware abstraction layer so that the hardware abstraction layer can update the corresponding files.
[0287] Furthermore, the first electronic device can close the preview interface.
[0288] Therefore, when the first condition is met, the second electronic device displays the third document editing box of the third document editing application on the second electronic device; the first condition is used to indicate the resumption of data collaboration between the first electronic device and the second electronic device; the first condition can include a variety of conditions, for example, the resumption of data collaboration between the first electronic device and the second electronic device can be triggered by the second electronic device, or the resumption of data collaboration between the first electronic device and the second electronic device can be triggered by the first electronic device. S505a and S505c are used as examples below.
[0289] S505a: In response to a first switching operation of the second electronic device on an application, the first switching operation being used to switch the focus of the second electronic device back to the third document editing application, the third document editing application being the document editing application corresponding to the interruption of data collaboration between the first and second electronic devices. Therefore, the data collaboration service of the second electronic device determines the scenario for resuming data collaboration between the second electronic device, and thus sends a third request message to the first electronic device, the third request message being used to request the resumption of data collaboration between the first and second electronic devices.
[0290] S506a, The first electronic device receives the third request message sent by the second electronic device and displays a third prompt box on the first electronic device.
[0291] The third notification box is used to inform the user that the focus of the second electronic device has been restored to the third document editing box of the third document editing application. The third notification box can be displayed in the notification bar or on the main interface; there is no limitation on this.
[0292] Taking displaying a third notification box in the notification bar as an example, such as Figure 10b As shown in (b), the third prompt box 1011 may include a prompt message, which may be: "Do you want to use your mobile phone to data collaborate with HUAWEI MATEBOOK?" Furthermore, the third prompt box 1011 may also include a control 1021 for restoring input. Thus, in response to an operation on the control for restoring input, the first electronic device displays a data collaboration interface and sends a data collaboration restoration message to the second electronic device. This data collaboration restoration message confirms that the first electronic device and the second electronic device have resumed data collaboration. Here, the data collaboration interface may be as follows: Figures 8a-8b The data collaboration interface shown is not described in detail here.
[0293] In the S505a-S506a scheme, confirmation is required from the first electronic device before the data collaboration between the first and second electronic devices is restored. This avoids interrupting other events that may be occurring on the first electronic device and improves the user experience.
[0294] S505b: In response to a first switching operation of the second electronic device on the application, the first switching operation being used to switch the focus of the second electronic device back to the document editing application, thereby, the data collaboration service of the second electronic device determines that the second electronic device is resuming the data collaboration scenario, and thus sends a third notification message to the first electronic device, the third notification message being used to confirm the resumption of data collaboration between the first electronic device and the second electronic device. Correspondingly, the first electronic device receives the third notification message sent by the second electronic device and displays a third prompt box on the first electronic device. At this time, the third prompt box may include a prompt message, which may be: "Resumption of data collaboration between mobile phone and HUAWEI MATEBOOK".
[0295] In the S505b solution, the first electronic device does not need to confirm and can directly restore the data collaboration scenario between the first and second electronic devices, avoiding excessive confirmation by the user and improving the user experience.
[0296] S505c: When the first electronic device determines that the first triggering condition is met, the data collaboration service of the second electronic device determines that the first electronic device resumes the data collaboration scenario, and then sends a resume data collaboration message to the second electronic device.
[0297] The first triggering condition is used to trigger the data collaboration service of the first electronic device. The following examples, d1-d2, illustrate possible implementations of the first triggering condition.
[0298] Method d1, in response to a recovery operation of the data collaboration service by the first electronic device, can be a gesture performed on the first electronic device, which may include raising an arm or moving a hand downwards. The first electronic device can determine whether the user is performing an upward or downward gesture using devices such as a gyroscope, accelerometer, or gravity accelerometer. Furthermore, to improve the accuracy of the first electronic device triggering the recovery of the data collaboration scenario, the first electronic device can also determine that it is in a data collaboration scenario when the gesture meets a first gesture condition.
[0299] like Figure 11 As shown, one possible implementation includes a first gesture condition that may include: the first electronic device moving to a distance from the user that is greater than a first threshold and less than a second threshold. For example, as... Figure 11As shown, when the first electronic device moves from its initial position to a first position, the corresponding first distance falls within a first threshold range. When the first electronic device moves from its initial position to a second position, the corresponding first distance falls within a range greater than a second threshold. When the first electronic device moves from its initial position to a third position, the corresponding first distance falls within a range greater than or equal to the first threshold and less than or equal to the second threshold. The first threshold can be the distance range between the first electronic device and the user when answering a call. The second threshold can be the distance range from which the user uses the front-facing camera of the terminal device.
[0300] In method d2, the first triggering condition may also include: the first electronic device is not in a call state, or the camera module of the first electronic device is not in an on state, etc.
[0301] When the first electronic device determines that the first triggering condition is met, it sends a data recovery collaboration message to the second electronic device. Upon receiving this message, the second electronic device switches its focus to the third document editing window of the interrupted third document editing application. The third document editing application is the document editing application that was used when the data collaboration between the first and second electronic devices was interrupted.
[0302] Furthermore, after receiving the data recovery collaboration message from the first electronic device, the second electronic device can display a fourth prompt box. This fourth prompt box is used to notify the user of the data recovery collaboration message sent from the first electronic device to the second electronic device, allowing the user to determine whether data recovery collaboration is necessary.
[0303] like Figure 10c As shown in (a), the fourth prompt box 1030 may include a prompt message, which may be: "Do you want to resume data collaboration using HUAWEI p40?" Furthermore, the fourth prompt box 1030 may also include a control 1031 for resuming input, thereby sending a resumption collaboration response to the first electronic device in response to an operation on the control for resuming input, to resume the data collaboration scenario.
[0304] S506c, The first electronic device receives a third notification message from the second electronic device and displays a third prompt box on the first electronic device.
[0305] The third notification message is used to notify the first electronic device to resume data collaboration with the second electronic device. The third prompt box is used to inform the user that the focus of the second electronic device has been restored to the document editing application interface. The third prompt box can be displayed in the notification bar or on the main interface; there is no limitation here. The display method of the third prompt box can be found in [reference needed]. Figure 10b The third prompt box 1011 in the text will not be described in detail here.
[0306] It should be noted that S506c can be an optional step. For example, the first electronic device and the second electronic device can negotiate in advance, with the first electronic device triggering the restoration of the data collaboration scenario without the second electronic device's confirmation. That is, the first electronic device confirms the restoration of the data collaboration scenario between the first and second electronic devices when it confirms that the first triggering condition is met. When the first electronic device confirms that the first triggering condition is met, a third prompt box is displayed on the first electronic device.
[0307] S507. In response to the operation performed on the third prompt box, the first electronic device displays the data collaboration interface.
[0308] The data collaboration interface can display text data that was not sent last time.
[0309] Furthermore, in response to an operation performed on the third prompt box, the first electronic device can also display a preview interface.
[0310] S508, In response to the second user's operation, send second text data to the second electronic device.
[0311] The second user operation can be a confirmation operation performed on the data collaboration interface, and the second text data is the unsent text data saved on the preview interface of the first electronic device.
[0312] In S508, the first electronic device can also send a confirmation message (e.g., a third notification message) to the second electronic device to restore data collaboration. At this time, the second electronic device can display a fifth prompt box on its display screen. Figure 10c As shown in (b), the fifth prompt box 1040 may include a prompt message, which may be: "Data collaboration using HUAWEI p40 has been restored."
[0313] Furthermore, users can continue to input voice commands on the data collaboration interface to continue the data collaboration process. This step can be found in S406-S409 and will not be elaborated upon here.
[0314] During the collaborative text processing, the first electronic device may be interrupted by other applications. For example, the first electronic device may need to answer a phone call, switch network access methods, or the user may need to switch to other applications to search for information. Furthermore, the first electronic device's network may be interrupted, requiring a reconnection process, thus disrupting the data collaboration scenario. In the embodiments of this application, such as... Figure 12a As shown, the method for multi-device data collaboration may also include the following steps:
[0315] S601, in response to the switching application operation of the first electronic device, the data collaboration service of the first electronic device determines that the first electronic device exits the document creation scenario, that is, the data collaboration between the second electronic device and the first electronic device is interrupted.
[0316] One possible implementation is that the application switching operation can involve the user navigating to another application, causing the first electronic device's display to show the interface of that other application. This other application's display interface can be a newly opened application or an application that the user has switched from the first electronic device's display to an already open application; no limitation is made here.
[0317] Another possible implementation is that the application switching operation can be to display a notification message on the first electronic device, or receive a pop-up window from another application (e.g., an instant messaging application, a video communication application, etc.), causing the second electronic device to display the interface of the other application.
[0318] S602, The first electronic device sends an interrupt notification message to the second electronic device.
[0319] The interruption notification message is used to notify the first electronic device that the data collaboration scenario has been interrupted.
[0320] Accordingly, the first electronic device can close the preview interface.
[0321] One possible implementation is that the first electronic device can save the second text data that has not been sent on the preview interface. The method by which the first electronic device saves the second text data that has not been sent on the preview interface can be found in S502, and will not be elaborated upon here.
[0322] Another possible implementation is that if the user has confirmed that the second text data is to be sent before the first electronic device is interrupted, the first electronic device can send the second text data to the second electronic device so that the second electronic device can display the second text data in the corresponding document editing application.
[0323] S603, The second electronic device receives the interruption notification message and displays a second prompt interface on the second electronic device.
[0324] The second prompt interface is used to inform the user that the data collaboration scenario of the first electronic device has been interrupted.
[0325] For example, such as Figure 12bAs shown in (a), the second prompt interface 1210 may include a prompt message, which may be: "The HUAWEI P40 data collaboration scenario has been interrupted." Furthermore, the second prompt interface 1210 may also include a control 1211 for stopping data collaboration. Thus, in response to an operation on the control 1211, the second electronic device can stop the data collaboration service and store the interface of the document editing application corresponding to the data collaboration. For example, the data collaboration service of the second electronic device can store the interface of the interrupted data collaboration application (the third document editing application) so that when the data collaboration scenario is restored, the second electronic device can directly display the interface of the interrupted data collaboration application on its own screen, or move the focus of the second electronic device to the interface of the interrupted data collaboration application, thereby improving the response speed of restoring the data collaboration scenario.
[0326] When the third condition is met, the first electronic device displays the data collaboration interface on the first electronic device and displays the second text data on the data collaboration interface; the third condition is used to instruct the data collaboration between the first electronic device and the second electronic device to be restored.
[0327] The third condition can be triggered in various ways, either by the first electronic device or by the second electronic device. The following examples, S604a-S604c, illustrate the possible scenarios for the third condition.
[0328] S604a When the first electronic device meets the first triggering condition, it is determined to enable the data collaboration service of the first electronic device.
[0329] In method D1, in response to the first electronic device's recovery operation on the application, the data collaboration service of the first electronic device determines the data collaboration recovery scenario of the first electronic device, and thus, the first electronic device sends a data collaboration recovery message to the second electronic device.
[0330] One possible implementation is that the recovery operation can be a gesture applied to the first electronic device. Once the gesture meets a first gesture condition, a third request message is sent to the second electronic device. Another possible implementation is that the first electronic device, in response to an opening operation applied to the data collaboration interface, sends a recovery data collaboration message to the second electronic device. Thus, upon receiving the recovery data collaboration message from the first electronic device, the second electronic device switches its focus to the third document editing box of the interrupted third document editing application. For details, please refer to method d1, which will not be elaborated upon here.
[0331] In method D2, the first triggering condition can also be that the first electronic device is determined not to be in a call state; or, the camera module of the first electronic device is not turned on. For details, please refer to method D2, which will not be elaborated upon here.
[0332] S605a, the second electronic device receives a data recovery collaboration message sent by the first electronic device, the data recovery collaboration message being used to request the restoration of data collaboration between the first electronic device and the second electronic device; a third prompt interface is displayed on the second electronic device.
[0333] The third notification screen is used to inform the user that the data collaboration interface of the first electronic device has been restored. This third notification screen can be displayed in the notification bar or in the third document editing box of a third document editing application; there is no specific limitation here.
[0334] For example, such as Figure 12b As shown in (b), the third prompt interface 1220 may include a prompt message, which may be: "Restore the HUAWEI P40 data collaboration scenario". Furthermore, the third prompt interface 1220 may also include a control 1221 for restoring data collaboration. Thus, in response to an operation on the control 1221 for restoring data collaboration, the second electronic device can activate the data collaboration service and display the third document editing box of the document editing application corresponding to the data collaboration before the interruption.
[0335] In some embodiments, in response to an operation on a control that restores data collaboration, the second electronic device may send a third notification message to the first electronic device. This third notification message confirms the restoration of data collaboration between the first and second electronic devices. In other embodiments, the second electronic device may also confirm the restoration of data collaboration between the first and second electronic devices upon receiving the restored data collaboration message, without needing to send a third notification message to the first electronic device. The specific implementation process can be determined as needed and is not limited here.
[0336] S604b In response to the first switching operation of the second electronic device, the data collaboration service of the second electronic device determines that the second electronic device resumes data collaboration, and then sends a third notification message to the first electronic device. The third notification message is used to confirm that the first electronic device has resumed data collaboration with the second electronic device.
[0337] For specific implementation details, please refer to S505b, which will not be repeated here.
[0338] S604c, In response to the first switching operation of the second electronic device, the data collaboration service of the second electronic device determines the scenario for the second electronic device to resume data collaboration, and then sends a third request message to the first electronic device. The third request message is used to request the first electronic device to resume data collaboration with the second electronic device.
[0339] For details on the specific data collaboration service for the second electronic device, which determines the scenario for restoring data collaboration for the second electronic device, please refer to S505a, which will not be elaborated here.
[0340] S605c, the first electronic device receives a data recovery collaboration message from the second electronic device. The data recovery collaboration message is used to notify the first electronic device to resume data collaboration with the second electronic device, and a fourth prompt interface is displayed on the first electronic device.
[0341] The fourth notification screen is used to inform the user that the focus of the second electronic device has been restored to the third document editing box of the document editing application. This fourth notification screen can be displayed in the notification bar or on the main screen; there is no specific limitation here.
[0342] For example, such as Figure 12c As shown in (a), the fourth prompt interface 1230 may include a fourth prompt message, which may be: "Restore HUAWEI P40 data collaboration scenario". Furthermore, the fourth prompt interface 1230 may also include a confirmation control 1231, so that, in response to an operation on the confirmation control 1221, the second electronic device can activate the data collaboration service and send a restore collaboration response to the first electronic device.
[0343] S606. In response to an operation performed on the fifth prompt interface of the first electronic device, the first electronic device displays a preview interface.
[0344] For example, such as Figure 12c As shown in (b), the fifth prompt interface 1240 may include a fifth prompt message, which may be: "Resume the HUAWEI P40 data collaboration scenario." Furthermore, the fifth prompt interface 1240 may also include a control 1241 for restoring input. Thus, in response to an operation on the control 1241 confirming restoration, the second electronic device can activate the data collaboration service and display the data collaboration interface before the data collaboration was interrupted. The data collaboration interface may include a preview interface before the data collaboration was interrupted.
[0345] The preview interface can display text data that was not sent last time. For a reference on how the preview interface is displayed... Figure 8b The display methods of (a) and (b) in the text will not be described again here.
[0346] S607, In response to the second user's operation, send third text data to the second electronic device.
[0347] The second user operation can be a confirmation operation applied to the data collaboration interface, and the third text data can be unsent text data saved on the preview interface of the first electronic device, or it can be newly confirmed text data to be sent by the first electronic device.
[0348] Furthermore, users can continue to input voice commands on the data collaboration interface to continue the data collaboration process. This step can be found in S406-S409 and will not be elaborated upon here.
[0349] The methods provided in the embodiments of this application above are described from the perspective of an electronic device as the executing entity. To implement the functions of the methods provided in the embodiments of this application above, the terminal device may include hardware structures and / or software modules, implementing the above functions in the form of hardware structures, software modules, or a combination of hardware structures and software modules. Whether a particular function is executed in the form of hardware structures, software modules, or a combination of hardware structures and software modules depends on the specific application and design constraints of the technical solution.
[0350] In the above embodiments, the terms "when..." or "after..." can be interpreted, depending on the context, as meaning "if...", "after...", "in response to determining...", or "in response to detecting...". Similarly, the phrases "when..." or "if (the stated condition or event) is detected" can be interpreted, depending on the context, as meaning "if...", "in response to determining...", "when (the stated condition or event) is detected", or "in response to detecting (the stated condition or event)". Furthermore, in the above embodiments, relational terms such as "first" and "second" are used to distinguish one entity from another, without limiting any actual relationship or order between these entities.
[0351] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).
[0352] It should be noted that a portion of this patent application contains copyrighted material. The copyright holder retains all rights except for making copies of the contents of patent documents or records from the patent office.
Claims
1. A method for multi-device data collaboration, applied to a second electronic device, characterized in that, include: In response to a first operation performed on a first document editing application of a second electronic device, a first document editing box of the first document editing application is displayed, and a first notification message is sent to the first electronic device. The first notification message is used to establish data collaboration between the first electronic device and the second electronic device. The first document editing application is an application in the document editing whitelist configured in the second electronic device. Receive first text data sent by the first electronic device and display the first text data on the first document editing box; When the first condition is met, a third document editing application is displayed on the second electronic device. The third document editing application is the document editing application that corresponds to the interruption of data cooperation between the first electronic device and the second electronic device. The system receives second text data sent by the first electronic device and displays the second text data on the third document editing box of the third document editing application. The second text data is the text data generated by the first electronic device when the data collaboration is interrupted. The first condition includes at least one of the following: in response to a first switching operation, the first switching operation switches the focus of the second electronic device to the third document editing application; Alternatively, the system may receive a data recovery collaboration message sent by the first electronic device, the data recovery collaboration message being used to request the restoration of data collaboration between the first electronic device and the second electronic device.
2. The method according to claim 1, characterized in that, The first operation includes at least one of the following: The actions include: opening the first document editing application; clicking the document editing box in the first document editing application; switching the first document editing application; or switching the document editing box in the first document editing application.
3. The method according to claim 1, characterized in that, Before sending the first notification message to the first electronic device, the method further includes: The first device search interface is displayed, which is used to display electronic devices that have established a communication connection with the second electronic device. In response to a second operation of selecting the first electronic device among the electronic devices, it is determined to send the first notification message to the first electronic device.
4. The method according to claim 1, characterized in that, The method further includes: Receive a communication connection request sent by the first electronic device, wherein the communication connection request is sent via near-field communication; Establish a communication connection with the first electronic device; The system displays a first connection message, which prompts the user to establish a communication connection between the second electronic device and the first electronic device.
5. The method according to any one of claims 1-4, characterized in that, After sending the first notification message to the first electronic device, the method further includes: Receive a first response message sent by the first electronic device, the first response message being used to confirm that the first electronic device and the second electronic device have established data collaboration; Display the first response message.
6. The method according to any one of claims 1-5, characterized in that, The second electronic device includes multiple document editing applications, wherein the multiple document editing applications include at least the first document editing application and the second document editing application, and the method further includes: A second notification message is sent to the first electronic device, the second notification message being used to instruct the second electronic device to run the plurality of document editing applications. The device receives a switching message sent by the first electronic device, the switching message being used to instruct the second electronic device to switch the focus from the first document editing application to the second document editing application; Switch the focus to the second document editing box of the second document editing application; The system receives third text data sent by the first electronic device and displays the third text data on the second document editing box.
7. The method according to claim 1, characterized in that, The method further includes: In response to a second switching operation performed on the third document editing application, the interface after switching is displayed, wherein the second switching operation is used to switch the focus of the second electronic device out of the third document editing application; A third notification message is sent to the first electronic device, the third notification message being used to notify the second electronic device that data collaboration with the first electronic device has been interrupted.
8. The method according to claim 1, characterized in that, The first electronic device and the second electronic device interrupt data cooperation, including: The interruption notification message of the first electronic device is received, and the interruption notification message is used to notify the second electronic device that the data cooperation between the second electronic device and the first electronic device has been interrupted.
9. The method according to any one of claims 1-8, characterized in that, Before receiving the second text data sent by the first electronic device, the method further includes: A fourth notification message is sent to the first electronic device, the fourth notification message being used to notify the first electronic device to resume data collaboration with the second electronic device.
10. The method according to any one of claims 1-8, characterized in that, Before receiving the second text data sent by the first electronic device, the method further includes: A recovery request message is sent to the first electronic device, the recovery request message being used to request the restoration of data collaboration between the first electronic device and the second electronic device; The system receives a data recovery collaboration message sent by the first electronic device, which is used to confirm the restoration of data collaboration between the first electronic device and the second electronic device.
11. A method for multi-device data collaboration, applied to a first electronic device, characterized in that, include: The system receives a first notification message from a second electronic device and displays a first prompt box. The first notification message is used to request the first electronic device to establish data collaboration with the second electronic device. The first notification message is sent by the second electronic device to the first electronic device in response to a first operation performed on a first document editing application of the second electronic device. The first document editing application is an application in the document editing whitelist configured in the second electronic device. The first prompt box includes a first control. In response to a first user action applied to the first control, a data collaboration interface is displayed; Collect first voice data, convert the first voice data into first text data, and display the first text data on the data collaboration interface; In response to a second user's action, the first text data is sent to the second electronic device; When the second condition is met, the second text data is cached. The second text data is the text data displayed on the data collaboration interface when the first electronic device and the second electronic device interrupt data collaboration. The second condition is used to indicate that the data collaboration between the first electronic device and the second electronic device is interrupted. When the third condition is met, the data collaboration interface is displayed, and the second text data is displayed on the data collaboration interface. The third condition is used to indicate that the data collaboration between the first electronic device and the second electronic device is restored. Send the second text data to the second electronic device.
12. The method according to claim 11, characterized in that, The data collaboration interface also includes editing controls, and the process of converting the first voice data into first text data includes: The first voice data is converted into initial text data, and the initial text data is displayed on the data collaboration interface; In response to a third user operation applied to the editing control, an editing instruction is executed on the initial text data, and the edited text data is displayed on the data collaboration interface; In response to a confirmation operation performed on the data collaboration interface, the edited text data replaces the first text data.
13. The method according to claim 12, characterized in that, The first text data includes initial text data and editing instructions for the initial text data.
14. The method according to any one of claims 11-13, characterized in that, The method further includes: Receive a first confirmation message sent by the second electronic device, the first confirmation message being used to indicate that the second electronic device has successfully received the first text data; Delete the first text data displayed on the data collaboration interface.
15. The method according to any one of claims 11-14, characterized in that, Before receiving the first notification message sent by the second electronic device, the method further includes: When the distance to the second electronic device meets the first distance threshold, a communication connection request is sent to the second electronic device via near-field communication; A communication connection is established with the first electronic device, and a first connection message is displayed. The first connection message is used to prompt the second electronic device to establish a communication connection with the first electronic device.
16. The method according to any one of claims 11-15, characterized in that, The response to the first user action applied to the first control further includes: A first response message is sent to the second electronic device, the first response message being used to confirm the initiation of data collaboration between the first electronic device and the second electronic device.
17. The method according to any one of claims 11-16, characterized in that, The second electronic device includes multiple document editing applications, wherein the multiple document editing applications include at least a first document editing application and a second document editing application, and the method further includes: The system receives an application notification message sent by the second electronic device and displays controls for the plurality of document editing applications on the data collaboration interface; the application notification message is used to indicate that the second electronic device includes the plurality of document editing applications. In response to a switching operation of controls applied to the plurality of document editing applications, a switching message is sent to the second electronic device, wherein the switching operation refers to the second electronic device switching the focus from the first document editing application to the second document editing application, and the switching message is used to instruct the second electronic device to switch the focus of the second electronic device to the second document editing box of the second document editing application; Collect second voice data, convert the second voice data into third text data, and display the third text data on the data collaboration interface; In response to the second user's action, the third text data is sent to the second electronic device.
18. The method according to claim 11, characterized in that, The second condition includes at least one of the following: The second notification message sent by the second electronic device is received, and the second notification message is used to notify the second electronic device that the data cooperation between the second electronic device and the first electronic device has been interrupted. Alternatively, in response to a switching application operation by the first electronic device, the switched application interface is displayed on the first electronic device, the switching application operation being used to launch the switched application on the first electronic device.
19. The method according to claim 18, characterized in that, The application switching operation in response to the first electronic device further includes: An interruption notification message is sent to the second electronic device, the interruption notification message being used to notify the second electronic device that data collaboration with the first electronic device has been interrupted.
20. The method according to claim 18, characterized in that, The third condition includes at least one of the following: Detect gestures to the first electronic device and determine that the gestures meet a first gesture condition. The first gesture condition refers to the first electronic device moving to a distance from the user that is greater than a first threshold and less than a second threshold. The gestures include: raising the device upward or moving it downward. The first electronic device is not in a call state; or, the camera module of the first electronic device is not turned on; a third notification message is received from the second electronic device, the third notification message being used to notify the first electronic device to resume data collaboration with the second electronic device; Alternatively, upon receiving a third request message sent by the second electronic device, the third request message is used to request the first electronic device to restore data collaboration with the second electronic device. The third request message is displayed in a second prompt box on the first electronic device, and in response to the operation of the second prompt box, the restoration of data collaboration between the first electronic device and the second electronic device is confirmed.
21. The method according to claim 20, characterized in that, After confirming the restoration of data collaboration between the first electronic device and the second electronic device in response to the operation on the second prompt box, the method further includes: A data collaboration recovery message is sent to the second electronic device, the data collaboration recovery message being used to confirm the restoration of data collaboration between the first electronic device and the second electronic device.
22. An electronic device, characterized in that, The electronic device includes a memory and one or more processors; wherein the memory is used to store computer program code, the computer program code including computer instructions; when the computer instructions are executed by the processor, the electronic device performs the method as described in any one of claims 1 to 10.
23. An electronic device, characterized in that, The electronic device includes a memory and one or more processors; wherein the memory is used to store computer program code, the computer program code including computer instructions; when the computer instructions are executed by the processor, the electronic device performs the method as described in any one of claims 11 to 21.
24. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes program instructions that, when executed on a terminal device, cause the terminal device to perform the method as described in any one of claims 1 to 10.
25. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes program instructions that, when executed on a terminal device, cause the terminal device to perform the method as described in any one of claims 11 to 21.