Service conflict prompting method and related apparatus

By judging and prompting the occupation of the p2p channel on electronic devices, finding and prompting for conflicting business reasons, the problem of failed file sharing across devices is solved, and user experience and operation efficiency is improved.

WO2025001287A1PCT designated stage expired Publication Date: 2025-01-02HONOR DEVICE CO LTD

Patent Information

Application Number
PCT/CN2024/080472
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-06-30
Filing Date
2024-03-07
Publication Date
2025-01-02

AI Technical Summary

Technical Problem

When users try to share files across devices, electronic devices are conducting other cross-device services, resulting in file sharing services failure. The existing technology cannot accurately prompt the reasons for the failure, affecting the user experience.

Method used

By determining whether there is an unoccupied p2p channel for the electronic device, if it does not exist, look for conflicting services and prompt the user to operate and solve the problem through pop-up windows.

Benefits of technology

Improve the user experience, users can clearly understand the causes of failure and take corresponding measures to solve the problem, which enhances the success rate of file sharing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024080472_02012025_PF_FP_ABST
    Figure CN2024080472_02012025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application are a service conflict prompting method and a related apparatus, which are applied to the technical field of terminals. The method is applied to a first electronic device and comprises: in response to a service starting operation input by a user, determining whether there is an unoccupied p2p channel at a local end, and when there is no unoccupied p2p channel at the local end, searching cross-device services of a first electronic device for a conflict service, wherein a connection state of the conflict service is not disconnected, and a connection type of the conflict service is p2p; and on the basis of the found conflict service, giving a prompt regarding a reason for the failure of the cross-device service by means of a pop-up window. When it is determined that p2p channels at the local end are all occupied, a search is carried out on cross-device services in the first electronic device for a conflict service occupying the p2p channels at the local end, and the prompt regarding a reason for the failure of the cross-device service is accurately given on the basis of the found conflict service, thereby achieving the effect of guiding user operations, and improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

A service conflict prompting method and related device

[0001] This invention claims priority from the Chinese patent application filed with the State Intellectual Property Office of the People's Republic of China on June 30, 2023, with application number 202310801333.3 and application name "A service conflict prompting method and related device". Technical Field

[0002] The present application relates to the field of terminal technology, and in particular to a service conflict prompting method and related devices. Background Art

[0003] With the rapid development of science and technology, users use electronic devices of different sizes and functions to meet the needs of different scenarios. At the same time, different data will be scattered on different electronic devices of users. In specific scenarios, resource sharing and collaborative operations between two or more electronic devices are realized based on cross-device services. For example, if a user needs to use an electronic device to process a file stored in another electronic device, the file needs to be sent from one electronic device to another electronic device. In this case, electronic devices can directly transfer files based on a peer-to-peer (p2p) connection, which can simplify the complexity of file transfer. For example, mobile phones share pictures through Honor Share (a peer-to-peer transmission application).

[0004] Currently, when a user needs to transfer a file from one electronic device to another electronic device through a p2p connection (that is, when the user currently requests a cross-device service), the electronic device may be performing other cross-device services, such as smart interconnection services. Other cross-device services may conflict with the file sharing service (the cross-device service currently requested), thereby causing the file sharing service to fail.

[0005] In current technology, when an electronic device is performing other cross-device services, conflicts may occur with the currently requested cross-device service, causing the currently requested cross-device service to fail, affecting the user experience.

[0006] Summary of the Invention

[0007] The present application provides a service conflict prompting method and related apparatus, which can accurately prompt users of the reasons for cross-device service failures, thereby guiding user operations and improving user experience.

[0008] To achieve the above objectives, this application adopts the following technical solutions:

[0009] In a first aspect, the present application provides a service conflict prompting method, which is applied to a first electronic device, and includes: responding to a service startup operation input by a user, determining whether there is an unoccupied p2p channel on the local end; when there is no unoccupied p2p channel on the local end, searching for conflicting services in the cross-device services of the first electronic device, wherein the connection status of the conflicting services is not unconnected, and the connection type of the conflicting services is p2p; based on the conflicting services found, prompting the reason for the failure of the cross-device service through a pop-up window. When all the p2p channels on the local end are occupied, finding the conflicting services occupying the p2p channels, and accurately prompting the reason for the failure of the cross-device service based on the conflicting services, thereby guiding the user's operation and improving the user experience.

[0010] In one possible implementation, the communication framework of the first electronic device determines whether there is an unoccupied p2p channel on the local end in response to a service start operation input by the user, and the communication framework is located in the application framework layer of the operating system of the first electronic device.

[0011] In one possible implementation, when there is no unoccupied p2p channel on this end, the cross-device application of the first electronic device searches for conflicting services in the cross-device services of the first electronic device. Based on the conflicting services found, the cross-device application of the first electronic device prompts the reason for the failure of the cross-device service through a pop-up window; the cross-device application is an application for implementing the cross-device service corresponding to the service startup operation; the cross-device application is located in the application layer of the operating system of the first electronic device.

[0012] In one possible implementation, conflicting services among the cross-device services of the first electronic device are searched for using connection attribute values ​​of cross-device services; the connection attribute values ​​represent the connection status and connection type of the services. Using previously stored connection attribute values ​​to search for conflicting services avoids duplicate data storage and saves storage space.

[0013] In a possible implementation, the connection attribute value of the cross-device service is obtained by a cross-device application of the first electronic device from a control center of the first electronic device; the cross-device application is located in an application layer of an operating system of the first electronic device.

[0014] In one possible implementation, the connection attribute value of the cross-device service is obtained in the following manner: the communication framework of the first electronic device sends a first status code to the cross-device application of the first electronic device; the first status code is used to indicate that there is no unoccupied p2p channel of the first electronic device; the cross-device application of the first electronic device sends a connection attribute acquisition request to the control center of the first electronic device based on the first status code; the control center of the first electronic device returns the connection attribute value of the cross-device service to the cross-device application of the first electronic device in response to the connection attribute acquisition request.

[0015] In one possible implementation, in response to a service initiation operation input by a user, a determination is made as to whether a local end has enabled a dual-path P2P connection, and whether a first P2P channel and a second P2P channel are occupied. The determination includes: when the local end has enabled a dual-path P2P connection and both the first P2P channel and the second P2P channel are occupied, no unoccupied P2P channel exists on the local end; when the local end has enabled a dual-path P2P connection and both the first P2P channel and the second P2P channel are not occupied, no unoccupied P2P channel exists on the local end; when the local end has not enabled a dual-path P2P connection and the first P2P channel is occupied, no unoccupied P2P channel exists on the local end; and when the local end has not enabled a dual-path P2P connection and the first P2P channel is not occupied, no unoccupied P2P channel exists on the local end. This method fully takes into account differences in hardware configurations of electronic devices, which correspond to different P2P connection modes, making it more widely applicable.

[0016] In one possible implementation, the method further includes: when no conflicting service is found, prompting a pop-up window indicating a cross-device service failure. Even if a problem occurs in the control center, cross-device service status is not updated in a timely manner, and the conflicting service cannot be correctly found, a prompt indicating a cross-device service failure can still be provided to improve the user experience.

[0017] In one possible implementation, when there is an unoccupied p2p channel on the local end, a p2p connection request is sent to the second electronic device; the second electronic device responds to the p2p connection request and determines whether the second electronic device is allowed to establish a p2p connection with the first electronic device; when the second electronic device does not allow the p2p connection to be established with the first electronic device, a pop-up window prompts the user that the cross-device service has failed.

[0018] In one possible implementation, a second status code sent by a second electronic device is received, where the second status code indicates that the second electronic device is not allowed to establish a p2p connection with the first electronic device. Based on the second status code, a pop-up window prompts that the cross-device service has failed.

[0019] In one possible implementation, when the second electronic device allows a p2p connection to be established with the first electronic device, the first electronic device establishes a p2p connection with the second electronic device, and implements a cross-device service between the first electronic device and the second electronic device based on the p2p connection.

[0020] In a second aspect, the present application provides an electronic device comprising a processor and a memory; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the processor executes the method of the first aspect above.

[0021] In a third aspect, the present application provides a computer-readable storage medium, in which a computer program or instruction is stored. When the computer program or instruction is executed, the method of the first aspect described above is implemented.

[0022] In a fourth aspect, the present application provides a computer program product, comprising a computer program or instructions, which, when executed by a processor, implements the method of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] FIG1A is a diagram of a desktop interface of a first electronic device in the prior art;

[0024] FIG1B is a diagram of an album interface of a first electronic device in the prior art;

[0025] FIG1C is a diagram of a picture interface of a first electronic device in the prior art;

[0026] FIG1D is a diagram of a picture sharing interface of a first electronic device in the prior art;

[0027] FIG1E is another picture sharing interface diagram of a first electronic device in the prior art;

[0028] FIG1F is another picture sharing interface diagram of a first electronic device in the prior art;

[0029] FIG2 is a schematic diagram of an interactive process of a service conflict prompting method in the current technology;

[0030] FIG3A is a diagram illustrating an example of the composition of an electronic device provided in an embodiment of the present application;

[0031] FIG3B is a diagram illustrating an example of a software structure of an electronic device provided in an embodiment of the present application;

[0032] FIG4 is a schematic diagram of an interactive process of a service conflict prompting method provided in an embodiment of the present application;

[0033] FIG5 is a flow chart of a communication framework 102 of a first electronic device 10 determining whether it has an unoccupied p2p channel according to an embodiment of the present application;

[0034] FIG6 is a diagram of a picture sharing interface of a first electronic device 10 provided in an embodiment of the present application;

[0035] FIG7 is a flow chart showing a communication framework 202 of a second electronic device 20 determining whether a p2p connection can be established with a first electronic device 10 according to an embodiment of the present application;

[0036] FIG8 is a method for resuming a file sharing service based on a pop-up window prompt provided by an embodiment of the present application;

[0037] FIG9 is a flow chart of another service conflict prompting method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0038] The terms "first", "second" and "third" in the specification, claims and drawings of this application are used to distinguish different objects rather than to limit a specific order.

[0039] In the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0040] To make the description of the following embodiments clear and concise, a brief introduction to the related technologies is first given:

[0041] Cross-device services are services implemented between two or more electronic devices, such as multi-device collaboration services, file sharing services, mobile phone cloning services, etc.

[0042] Multi-device collaboration is a technology applied between multiple electronic devices. Using multi-device collaboration technology, two or more electronic devices can collaborate across systems and devices to achieve resource sharing and collaborative operations. Multi-device collaboration can be applied between electronic devices of the same type or different types. Among them, the types of electronic devices include but are not limited to mobile phones, tablets, laptops, large-screen devices (for example: smart TVs, smart screens), personal computers (personal computers, PCs), handheld computers, netbooks, personal digital assistants (personal digital assistants, PDAs), wearable electronic devices, vehicle-mounted devices, virtual reality devices and other devices. Generally, the services implemented by multi-device collaboration technology are called multi-device collaboration services. For example, electronic devices can implement the following multi-device collaboration services based on multi-device collaboration technology:

[0043] Screen casting: Casting the content (e.g., videos, photos, etc.) on the screen of a first electronic device to the screen of a second electronic device for display. When casting, the user can select part or all of the content on the screen of the first electronic device to be cast to the screen of the second electronic device for display. Some screen casting methods also allow users to switch the screen to other pages during casting without affecting the second electronic device from continuing to play the casted content, such as DLNA casting.

[0044] Screen mirroring: Mirrors all the content on the screen of a first electronic device to the screen of a second electronic device. The content displayed on the second electronic device is the same as the content displayed on the first electronic device, and changes as the content displayed on the first electronic device changes.

[0045] Screen extension: Use the screen of the second electronic device as the secondary screen of the first electronic device. The first electronic device can transfer part of the content it needs to display to the secondary screen for display. The screen of the first electronic device and the screen of the second electronic device can display content together, expanding the display capability of the first electronic device.

[0046] Screen sharing: Projecting the user interface of a first electronic device onto the screen of a second electronic device for display, allowing the user to operate the user interface of the first electronic device on the second electronic device, and transferring files from the second electronic device to the first electronic device by performing specific operations on the second electronic device (for example, dragging and dropping files from the user interface of the second electronic device to the user interface of the first electronic device), thereby enabling cross-device operations and cross-device file transfers between the first and second electronic devices. The user interface of the first electronic device can be displayed in any area of ​​the screen of the second electronic device, or it can be displayed in full screen.

[0047] Keyboard and mouse collaboration: A first electronic device can share the input devices of a second electronic device. For example, if the first electronic device is an Android device and the second electronic device is a Windows device, the Android device can share the Windows device's input devices, such as a mouse and keyboard. In addition, with keyboard and mouse sharing, the first and second electronic devices can also transfer files.

[0048] Continuation collaboration: When a user runs an application on a first electronic device, the interface of a second electronic device may prompt the user to open the application currently running on the first electronic device on the second electronic device, thereby transferring the user to the second electronic device for continued operation, such as watching a video, editing a document, etc. For example: a document application, such as a memo or word, is running on the first electronic device, and the user is editing a document on the first electronic device. When the second electronic device is close to the first electronic device, a prompt message is displayed on the second electronic device, and the user clicks the prompt message on the second electronic device. In response to the user's click, the second electronic device opens the document application and displays the location where the user is editing, thereby transferring the user to the second electronic device to continue editing, etc.

[0049] Call collaboration: When the first electronic device receives an incoming voice call or video call, the second electronic device can simultaneously display the incoming call interface, so that the user can choose to answer or hang up the call on the second electronic device.

[0050] Notification collaboration: When a first electronic device receives a notification message, the notification message can be synchronously displayed on a second electronic device, and the user can also perform operations such as reply, delete, and read the notification message on the second electronic device.

[0051] It is understood that the first electronic device in the above description can also be referred to as the master device, which refers to the side that initiates status message synchronization. The second electronic device can also be referred to as the slave device, which refers to the side that receives status message synchronization. For ease of understanding, the electronic device that initiates status message synchronization is referred to as the first electronic device, and the electronic device that receives status message synchronization is referred to as the second electronic device.

[0052] The above functions are implemented based on communication between electronic devices, including near-field communication, far-field communication, or multi-channel communication. Near-field communication refers to communication between multiple electronic devices through short-range methods such as Wireless Fidelity (WIFI), Wireless Local Area Networks (WLAN), and Near Field Communication (NFC). Far-field communication refers to communication between multiple electronic devices through forwarding through the device cloud. When two electronic devices simultaneously carry out near-field communication and far-field communication, it is called multi-channel communication.

[0053] The advantages of the service conflict prompting method provided by the present application are compared and explained below in combination with the existing service conflict prompting method. For the convenience of explanation, the cross-device service is explained below by taking the file sharing service as an example.

[0054] When a file stored in a first electronic device needs to be transferred to a second electronic device, the electronic devices can directly transfer files based on a peer-to-peer (p2p) connection (i.e., file sharing services are implemented based on a peer-to-peer connection). At the same time, when the first electronic device and / or the second electronic device is performing other cross-device services, the p2p channel will be occupied, thereby conflicting with the file sharing service and causing the file transfer to fail. In current technology, file sharing failure is only indicated by a pop-up window on the first electronic device (i.e., the electronic device sending the file) displaying prompts such as "Transmission channel occupied" or "Sending failed" to prompt the user of the file transfer failure. The user cannot clearly understand the cause of the transmission failure from the prompt, and thus cannot clearly understand how to solve the problem of transmission failure, which affects the user's experience.

[0055] For ease of understanding, the following detailed description of the existing file sharing conflict prompt method is provided in conjunction with Figures 1-F. This description is based on an example in which a first electronic device 10 sends a picture to a second electronic device 20 via Honor Share. The first electronic device 10 is described using a mobile phone as an example, and this application does not specifically limit this.

[0056] As shown in the desktop interface diagram of the first electronic device 10 in Figure 1A, after the user unlocks the first electronic device, the first electronic device 10 can present a desktop 100 to the user. The desktop 100 includes icons of various applications, such as: phone icon, contact icon, Internet icon, SMS icon, setting icon and album icon 101, etc. The user can trigger operations on the application icons, such as: click, long press, slide, etc. When the user clicks the album icon 101 on the desktop interface 100 of the first electronic device 10, the album application will be started and the album interface of the first electronic device will be entered (as shown in Figure 1B). When the user clicks the album icon 101 on the desktop interface 100 of the first electronic device 10, the first electronic device 10 will present the album interface 110 to the user.

[0057] The album interface 110 of the first electronic device 10 includes pictures or videos that are regularly distributed on the album interface 110, for example, including pictures 111 and videos. When a user clicks on a picture 11, an interface is launched that displays detailed information about the picture 111 and includes related processing options, also known as a picture interface 120 (as shown in FIG1C ). When a user clicks on a picture 111 on the album interface 110 of the first electronic device 10, the first electronic device 10 presents the picture interface 120 to the user.

[0058] The picture interface 120 includes a variety of operation icons for the picture 111, such as a share icon 121, an edit icon, a delete icon, etc. After the first electronic device 10 receives the operation triggered by the user, it will perform the corresponding operation on the picture 111. When the user clicks the share icon 121 on the picture interface 120 of the first electronic device 10, the picture sharing function is activated, and the first electronic device 10 presents the user with a picture sharing interface 130 (as shown in FIG. 1D ).

[0059] The picture sharing interface 130 includes modules corresponding to multiple picture sharing types, including: a glory sharing part 131, a WeChat icon, an information icon, a QQ icon, etc. If you click on the WeChat icon, the information icon or the QQ icon, the corresponding application will be started and sent to the recipient through the application. For the situation mentioned in this application, the second electronic device 20 nearby is searched through communication between devices (taking Bluetooth communication as an example). When the first electronic device 10 searches for the second electronic device 20 through Bluetooth communication, the name 132 of the second electronic device 20 will be displayed in the glory sharing part 131. The user clicks on the name 132 of the second electronic device 20, and at this time the first electronic device 10 requests to establish a p2p connection with the second electronic device 20. If the p2p connection between the first electronic device 10 and the second electronic device 20 is successfully established, the image 111 is directly transmitted from the first electronic device 10 to the second electronic device 20 via Honor Share (p2p connection). If the p2p connection between the first electronic device 10 and the second electronic device 20 fails to be established, the image 111 cannot be transmitted via Honor Share. There are two reasons for the failure to establish a p2p connection between the first electronic device 10 and the second electronic device 20: one is that the p2p channel of the first electronic device 10 is occupied; the other is that the p2p channel of the second electronic device 20 is occupied. Because the p2p channel of an electronic device is occupied, there is no idle channel to establish a p2p connection with another electronic device, resulting in the failure of sharing files via the p2p connection.

[0060] When the reason for the failure to establish a p2p connection between the first electronic device 10 and the second electronic device 20 is that the p2p channel of the first electronic device 10 is occupied, the first electronic device 10 will display "WLAN transmission channel occupied, sending failed" to the user through a pop-up window to prompt the user that the picture sharing failed. As shown in another picture sharing interface 140 of the first electronic device 10 shown in Figure 1E, the prompt pop-up window 141 includes the text "WLAN transmission channel occupied, sending failed", thereby prompting the user.

[0061] When the reason for the failure to establish a p2p connection between the first electronic device 10 and the second electronic device 20 is that the p2p channel of the second electronic device 20 is occupied, the first electronic device 10 will display a pop-up window to the user that "the other party's WLAN transmission channel is occupied, and the sending failed" to prompt the user that the picture sharing failed. As shown in another picture sharing interface 150 of the first electronic device 10 in Figure 1F, the prompt pop-up window 151 includes the text "The other party's WLAN transmission channel is occupied, and the sending failed", thereby prompting the user.

[0062] Combined with the interactive process diagram of the existing service conflict prompt method shown in Figure 2, the cross-device service requested by the user is explained by taking the file sharing service as an example, and the application that implements the file sharing service is explained by taking the "Honor Share" application as an example.

[0063] It can be seen that the current service conflict prompt method is specifically as follows: when a user requests the first electronic device 10 to send a picture to the second electronic device 20 through "Honor Share", in response to the user's operation (for example, clicking the name of the second electronic device 20, clicking the send icon on the Honor Share application interface, etc.), the communication framework of the first electronic device 10 determines whether its own p2p channel is occupied. If so, it returns a 1014 status code to the Honor Share application of the first electronic device. Based on the 1014 status code, the first electronic device 10 displays a pop-up window stating "WLAN transmission channel occupied, sending failed" to prompt the user that the picture sharing failed. If not, it sends a p2p connection request to the second electronic device 20. After receiving the p2p connection request, the communication framework of the second electronic device 20 determines whether it is allowed to establish a p2p connection with the first electronic device 10. If not, it transparently transmits a 1013 status code to the Honor Share of the first electronic device 10 through the communication framework of the first electronic device 10. Based on the 1013 status code, the first electronic device 10 displays a pop-up window stating "The other party's WLAN transmission channel is occupied, sending failed" to prompt the user that the picture sharing failed. It can be seen from this that in the current technology, file sharing failure is only prompted to the user by a pop-up window displaying prompts such as "Transmission channel occupied" or "Sending failed" on the first electronic device (that is, the electronic device sending the file). The user cannot clearly understand the cause of the transmission failure from the prompt, and thus cannot clearly understand how to solve the problem of transmission failure, which affects the user's experience.

[0064] This application provides a service conflict prompt method. In response to a service startup operation input by a user, the method determines whether there is an unoccupied p2p channel on the local end (first electronic device). If no unoccupied p2p channel exists, the method searches for conflicting services among the cross-device services on the first electronic device. Based on the conflicting services, a pop-up window prompts the reason for the cross-device service failure. This method accurately prompts the reason for the cross-device service failure, thereby guiding the user's operation and improving the user experience.

[0065] In some embodiments, the electronic device may be a mobile phone, tablet computer, desktop computer, laptop computer, notebook computer, ultra-mobile personal computer (UMPC), handheld computer, netbook computer, personal digital assistant (PDA), wearable electronic device, smart watch, etc. This application does not impose any special restrictions on the specific form of the above electronic devices. In this embodiment, the structure of the electronic device may be as shown in Figure 3A, which is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0066] As shown in FIG3A , the electronic device may include a processor 110 , a display screen 120 , an internal memory 130 , a touch sensor 140 , an antenna 1 , an antenna 2 , a mobile communication module 150 , and a wireless communication module 160 .

[0067] It should be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device. In other embodiments, the electronic device may include more or fewer components than shown, or may combine or separate certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0068] The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units can be independent devices or integrated into one or more processors. For example, in the present application, when it is determined that there is no unoccupied p2p channel on the local end, conflicting services in the cross-device service can be searched, and the reason for the failure of the cross-device service can be prompted based on the conflicting services found.

[0069] The controller can be the nerve center and command center of the electronic device. The controller can generate operation control signals based on instruction operation codes and timing signals to complete the control of instruction fetching and execution.

[0070] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.

[0071] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.

[0072] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, processor 110 may include multiple I2C bus lines. Processor 110 may be coupled to touch sensor 140, a charger, a flash, a camera, etc., via different I2C bus interfaces. For example, processor 110 may be coupled to touch sensor 140 via an I2C interface, enabling communication between processor 110 and touch sensor 140 via the I2C bus interface, thereby implementing touch functionality in the electronic device.

[0073] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality.

[0074] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display 120 and a camera. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor 110 and the display 120 communicate via the DSI interface to implement the display function of the electronic device.

[0075] The GPIO interface can be configured through software. The GPIO interface can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to a camera, display 120, wireless communication module 160, touch sensor 140, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0076] It is understood that the interface connection relationship between the modules illustrated in this embodiment is only a schematic illustration and does not constitute a structural limitation of the electronic device. In other embodiments of the present application, the electronic device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0077] The wireless communication function of the electronic device can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.

[0078] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in an electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.

[0079] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied in electronic devices. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0080] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs the sound signal through the audio device or displays an image or video through the display screen 120. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0081] The wireless communication module 160 can provide wireless communication solutions for electronic devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0082] In some embodiments, the antenna 1 of the electronic device is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (QZSS) and / or satellite based augmentation system (SBAS).

[0083] The electronic device implements its display function through a GPU, display screen 120, and an application processor. The GPU is a microprocessor for image processing that connects the display screen 120 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0084] The display screen 120 is used to display images, videos, and the like. The display screen 120 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 MiniLED, a MicroLED, a Micro-OLED, or a quantum dot light-emitting diode (QLED). In some embodiments, the electronic device can include one or N display screens 120, where N is a positive integer greater than one.

[0085] A series of graphical user interfaces (GUIs) can be displayed on the display screen 120 of the electronic device, and these GUIs are the main screen of the electronic device. Generally speaking, the size of the display screen 120 of the electronic device is fixed, and only limited controls can be displayed on the display screen 120 of the electronic device. A control is a GUI element, which is a software component included in an application. It controls all data processed by the application and interactive operations on these data. Users can interact with the controls through direct manipulation to read or edit relevant information of the application. Generally speaking, controls can include visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc. For example: in an embodiment of the present application, a prompt is displayed in a pop-up window to prompt the user of the reason for the failure of cross-device business.

[0086] The internal memory 130 can be used to store computer-executable program code, which includes instructions. The processor 110 executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory 130. For example, in this embodiment, the processor 110 can search for conflicting services in the cross-device services of the first electronic device by executing the instructions stored in the internal memory 130 when there is no unoccupied p2p channel on the local end. The internal memory 130 may include a program storage area and a data storage area. The program storage area may store an operating system, at least one application required for a function (such as a file sharing function, etc.). The data storage area may store data created during the use of the electronic device (such as audio data, image data, etc.). In addition, the internal memory 130 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. The processor 110 executes various functions of the electronic device by running the instructions stored in the internal memory 130 and / or instructions stored in a memory provided in the processor.

[0087] Touch sensor 140, also known as a "touch device," can be disposed on display screen 120. The touch sensor 140 and display screen 120 form a touch screen, also known as a "touch screen." Touch sensor 140 is used to detect touch operations applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to an application processor to determine the type of touch event. Visual output related to the touch operations can be provided via display screen 120. In other embodiments, touch sensor 140 can also be disposed on the surface of the electronic device, at a location different from that of display screen 120.

[0088] Furthermore, operating systems run on the above components, such as the iOS operating system developed by Apple, the Android open-source operating system developed by Google, and the Windows operating system developed by Microsoft. Application programs can be installed and run on these operating systems.

[0089] The operating system of the electronic device can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to illustrate the software structure of the electronic device.

[0090] FIG3B is a software structure block diagram of the electronic device according to an embodiment of the present application.

[0091] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.

[0092] The application layer may include a series of application packages. As shown in FIG3B , the application package may include cross-device services, gallery, WLAN, Bluetooth, video, short message and other applications.

[0093] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions. As shown in Figure 3B, the application framework layer may include a window manager, content provider, view system, telephony manager, resource manager, notification manager, and a communication framework (Nearby).

[0094] The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, take screenshots, etc.

[0095] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0096] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.

[0097] The phone manager is used to provide communication functions for electronic devices, such as call status management (including answering, hanging up, etc.).

[0098] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0099] The Notification Manager allows applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically without user interaction. For example, the Notification Manager is used to notify users of completed downloads and message reminders. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog windows on the screen. Examples include text messages in the status bar, beeps, vibrations on electronic devices, and flashing indicator lights.

[0100] Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.

[0101] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.

[0102] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.

[0103] The system library can include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0104] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.

[0105] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0106] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0107] A 2D graphics engine is a drawing engine for 2D drawings.

[0108] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver.

[0109] It should be noted that although the embodiments of the present application are described using the Android system as an example, its basic principles are also applicable to electronic devices based on operating systems such as iOS and Windows.

[0110] Example 1:

[0111] The following, in conjunction with Figures 4 to 7, details a service conflict prompt method provided by an embodiment of the present application. The cross-device service requested by the user is illustrated by taking the file sharing service as an example. The first electronic device 10 requests to share a file with the second electronic device 20, that is, the first electronic device 10 requests to transfer the file to the second electronic device 20 through a p2p channel. The first electronic device 10 can also be referred to as a sending end, and the second electronic device 20 as a receiving end.

[0112] S401: The user performs a file sharing operation.

[0113] The file sharing operation is a service start operation for instructing the first electronic device 10 to perform a file sharing service with the second electronic device 20 .

[0114] Specifically, a user triggers a file sharing operation when using the file sharing application 101 of the first electronic device 10. For example, the file sharing operation may be clicking a preset icon on the screen of the first electronic device 10, or other preset file sharing operations. The file sharing application 101 is a preset application for performing file sharing services, and may exist as an independent application or as a preset functional module of a certain application. This application does not specifically limit this.

[0115] To facilitate understanding of the file sharing operation, an example is provided with reference to FIG. 1B to FIG. 1D .

[0116] The user selects the picture (file) to be shared in the album interface 110 as shown in Figure 1B, and clicks the picture icon 111 to enter the picture interface 120. The user clicks the share icon 121 on the picture interface 120 to enter the picture sharing interface 130, and clicks the name 132 of the second electronic device 20 searched by Honor Share to trigger the file sharing operation.

[0117] S402: The communication framework 102 of the first electronic device 10 determines whether it has an unoccupied p2p channel in response to the file sharing operation.

[0118] The communication framework 102 is located in the application framework layer of the operating system of the first electronic device 10 .

[0119] If the communication framework 102 of the first electronic device 10 determines that it does not have an unoccupied p2p channel, it proceeds to S403 .

[0120] Specifically, if the first electronic device 10 does not have an unoccupied p2p channel (that is, all the p2p channels of the first electronic device 10 are occupied), it means that the first electronic device 10 is performing / preparing to perform other cross-device services (for example: keyboard and mouse collaboration, call collaboration, cloning, etc.) while performing the file sharing service. The cross-device services that are being performed / prepared to be performed occupy the p2p channel of the first electronic device 10, which will conflict with the file sharing service. That is, the first electronic device 10 cannot provide an idle p2p channel to establish a p2p connection with the second electronic device 20 to implement the file sharing service, which will cause the file sharing service to fail.

[0121] If the communication framework 102 of the first electronic device 10 determines that it has an unoccupied p2p channel, it proceeds to S410 .

[0122] Specifically, if the first electronic device 10 has an unoccupied p2p channel (ie, not all p2p channels of the first electronic device 10 are occupied), it means that the first electronic device 10 has an idle p2p channel for establishing a p2p connection with the second electronic device 20 to implement file sharing services.

[0123] For ease of understanding, the specific process of the communication framework 102 of the first electronic device 10 determining whether it has an unoccupied p2p channel is described in detail below with reference to FIG5 .

[0124] S501: Determine whether the first electronic device 10 enables a two-way p2p connection.

[0125] Due to different hardware configurations of electronic devices, different electronic devices support different types of p2p connections. Some hardware configurations support electronic devices to enable two-way p2p connections (two-way point-to-point connections), while some hardware configurations cannot support electronic devices to enable two-way p2p connections.

[0126] Specifically, based on the hardware configuration of the first electronic device 10 , it is determined whether the first electronic device 10 enables a two-way p2p connection.

[0127] If enabled, proceed to S502. When the dual-path p2p connection is enabled, the first electronic device 10 has dual-path p2p channels, including a first p2p channel and a second p2p channel. For ease of description, the first p2p channel is referred to as the p2p0 channel, and the second p2p channel is referred to as the p2p1 channel.

[0128] If not enabled, proceed to S503. When the dual-path p2p connection is not enabled, the first electronic device 10 has only a single p2p channel, that is, only the first p2p channel (p2p0 channel) exists.

[0129] S502: Determine whether both the p2p0 channel and the p2p1 channel are occupied.

[0130] If both the p2p0 channel and the p2p1 channel are occupied, it means that the first electronic device 10 has no unoccupied p2p channel; if both the p2p0 channel and the p2p1 channel are not occupied, it means that the first electronic device 10 has an unoccupied p2p channel.

[0131] It should be noted that the situations where both the p2p0 channel and the p2p1 channel are not occupied include: only the p2p0 channel (first p2p channel) is not occupied, only the p2p1 channel (second p2p channel) is not occupied, and neither the p2p0 channel nor the p2p1 channel is occupied. This application does not make specific limitations.

[0132] S503: Determine whether the p2p0 channel is occupied.

[0133] If the p2p0 channel is not occupied, it means that the first electronic device 10 has an unoccupied p2p channel; if the p2p0 channel is occupied, it means that the first electronic device 10 does not have an unoccupied p2p channel.

[0134] Since the first electronic device 10 does not enable dual-path p2p connection, that is, the first electronic device 10 only has a single p2p channel, that is, the first p2p channel (p2p0 channel), whether the p2p0 channel is occupied directly corresponds to whether the first electronic device 10 has an unoccupied p2p channel.

[0135] S403 : The communication framework 102 of the first electronic device 10 returns a first status code to the file sharing application 101 .

[0136] The first status code is used to indicate that the first electronic device 10 does not have an unoccupied p2p channel, and thus cannot establish a p2p connection with the second electronic device to implement a file sharing service.

[0137] In one possible implementation, the first status code is preconfigured as status code 1014. Generally, status code 1014 is used to indicate that file sharing fails due to a problem with the local electronic device (ie, first electronic device 10).

[0138] S404 : The file sharing application 101 of the first electronic device 10 sends a connection attribute value acquisition request to the control center 103 of the first electronic device 10 .

[0139] Among them, the control center 103 is located in the application layer of the operating system of the first electronic device 10 and exists in the form of an Android installation package (Android Package, APK). The control center 103 stores a data configuration file (profile) corresponding to each cross-device service. The profile records the starting state of the cross-device service and continuously updates the current state of the cross-device service (for example, connection status, connection type, etc.). The data configuration file (profile) corresponding to each service stores the profile attribute value of the corresponding service. The profile attribute value of the service includes: the configuration information corresponding to the service (for example, the service name, the service unique identifier, the index position of the service, etc.), the connection attribute value of the cross-device service, and the connection attribute value can represent: the connection state of the cross-device service and the connection type across devices.

[0140] Among them, the cross-device service refers to the cross-device service supported by the first electronic device 10, such as: keyboard and mouse collaboration, connection collaboration, call collaboration, notification collaboration, etc.

[0141] Among them, the connection status of the cross-device service can indicate the operating status of the cross-device service, including: not connected, running, and connecting. When the connection status of the cross-device service is not connected, it means that the cross-device service is not connected to any state, that is, the cross-device service is not allocated and does not occupy the communication channel; when the connection status of the cross-device service is running, it means that the cross-device service is in a connected state, and the electronic device is running the cross-device service with other electronic devices through the communication channel, that is, the cross-device service occupies the communication channel; when the connection status of the cross-device service is connecting, it means that the cross-device service is in the process of connecting, and the electronic device is ready to run with other electronic devices through the communication channel but has not yet run the cross-device service, that is, the cross-device service has occupied the communication channel but has not yet completed the connection.

[0142] The connection type for a cross-device service corresponds to the physical connection type for the cross-device service and indicates the physical communication channel the service is currently connected to. Connection types for cross-device services include Wi-Fi, peer-to-peer (P2P), WLAN, and Broadband. Generally, cross-device services are implemented by determining the appropriate service connection type based on the specific situation.

[0143] The connection attribute value acquisition request is used to request the control center 103 to acquire the stored connection attribute values ​​corresponding to each service, so as to analyze the reasons why the p2p channel is occupied according to the connection attribute values ​​corresponding to each service.

[0144] S405 : The control center 103 of the first electronic device 10 returns the connection attribute value of the cross-device service of the first electronic device 10 to the file sharing application 101 of the first electronic device 10 based on the connection attribute value acquisition request.

[0145] In one possible implementation, the control center 103 of the first electronic device 10 may return connection attribute values ​​corresponding to the cross-device service to the file sharing application 101 of the first electronic device 10 in a tabular form. The connection attribute values ​​include: the connection status of the cross-device service and the connection type of the cross-device service. The attribute value of the connection status of the cross-device service is generally expressed as a numerical value, "0" indicates that the connection status of the cross-device service is not connected; "1" indicates that the connection status of the cross-device service is running; "2" indicates that the connection status of the cross-device service is connecting.

[0146] For ease of understanding, the following table details the connection attribute values ​​for each cross-device service returned in tabular form, in conjunction with Table 1. Cross-device services are described using keyboard and mouse collaboration, screen sharing, and notification collaboration as examples, and are not specifically limited in this application. Table 1 uses service names as identifiers for each service, but other identifiers may also be used to represent services, and are not specifically limited in this application.

[0147] Table 1

[0148] Table 1 shows the connection attribute values ​​of the cross-device service returned by the control center 103 of the first electronic device 10 to the file sharing application 101. In Table 1, the connection status of the keyboard and mouse collaboration service is running, and the connection type is p2p connection; the connection status of the screen sharing service is disconnected; and the connection status of the notification collaboration service is disconnected.

[0149] S406 : The file sharing application 101 of the first electronic device 10 traverses the connection attribute values ​​of each service and searches for conflicting services among the cross-device services.

[0150] The connection state of the conflicting service is not disconnected, and the connection type of the conflicting service is a p2p service.

[0151] If the connection status of the conflicting service is not "disconnected," it indicates that the current connection status of the conflicting service is "running" or "connecting," meaning that the conflicting service is also running or preparing to run while the file sharing service is in progress. Furthermore, if the service connection type of the conflicting service is p2p, it indicates that the conflicting service is occupying a p2p channel while running or preparing to run, resulting in the first electronic device 10 having no unoccupied p2p channel to implement the file sharing service. This means that the conflicting service and the file sharing service conflict, resulting in a file sharing failure.

[0152] Specifically, when the file sharing application 101 of the first electronic device 10 finds (determines) a conflicting service, S407 is performed; when the file sharing application 101 of the first electronic device 10 traverses the connection attribute values ​​of each service and does not find (determine) a conflicting service, S408 is performed.

[0153] S407 : The file sharing application 101 of the first electronic device 10 prompts the reason for the file sharing failure through a pop-up window based on the found conflicting services.

[0154] In one possible implementation, the first electronic device 10 displays a prompt message such as "This device is currently using a conflicting service, please disconnect and try again" through a tosta pop-up window to prompt the user of the reason for the failure of the file sharing service. For example: Taking the connection attribute values ​​of each service shown in Table 1 as an example, the first electronic device 10 traverses the connection attribute values ​​of each service and determines that the conflicting service is keyboard and mouse collaboration. Then, the first electronic device 10 displays a prompt message such as "This device is currently using a keyboard and mouse collaboration service, please disconnect and try again" through a tosta pop-up window to prompt the user (as shown in the picture sharing interface of the first electronic device 10 in Figure 6). The reason for the failure of the file sharing service is that the first electronic device 10 is performing keyboard and mouse collaboration.

[0155] A tosta pop-up is a non-modal pop-up window that doesn't affect user actions and allows users to choose not to respond. Non-modal pop-ups typically have a time limit and automatically disappear after a certain period of time. They are generally used to prompt users for feedback.

[0156] Based on the determined conflicting services, the first electronic device 10 can accurately prompt the user of the reason for the failure of the file sharing service, so that the user can clearly understand how to solve the problem of the failure of the file sharing service, thereby improving the user's usage experience.

[0157] It should be noted that the first electronic device 10 can prompt the user by displaying the reason for the failure of the file sharing service through a tosta pop-up window. In addition, other pop-ups or other prompting methods can be used to prompt the user the reason for the failure of the file sharing service. This application does not make specific limitations.

[0158] S408: When no conflicting service is found, the first electronic device 10 prompts through a pop-up window that the file sharing service has failed.

[0159] In a possible implementation, the first electronic device 10 displays "Local WLAN transmission channel is occupied, sending failed" through a toast pop-up window, thereby prompting the user that the file sharing service failed because the local p2p channel is occupied.

[0160] S409 : The communication framework 102 of the first electronic device 10 sends a p2p connection request to the communication framework 202 of the second electronic device 20 .

[0161] The p2p connection request is used to request to establish a p2p connection with the second electronic device 20 , and the connection request carries an available channel list of the first electronic device 10 .

[0162] If there is an unoccupied p2p channel on the first electronic device 10, it means that the first electronic device 10 has an idle p2p channel to establish a p2p connection with the second electronic device 20, so a connection request is sent to the communication framework 202 of the second electronic device 20 to request to establish a p2p connection with the second electronic device 20.

[0163] S410 : The communication framework 202 of the second electronic device 20 determines whether to allow establishment of a p2p connection with the first electronic device 10 in response to the p2p connection request.

[0164] If the communication framework 202 of the second electronic device 20 determines that the p2p connection cannot be established with the first electronic device 10 , the process proceeds to S411 .

[0165] Specifically, if the communication framework 202 of the second electronic device 20 determines that it cannot establish a p2p connection with the first electronic device 10, it means that the second electronic device 20 is performing / preparing to perform other cross-device services (for example: keyboard and mouse collaboration, call collaboration, etc.), occupying the p2p channel that allows the second electronic device 20 to establish a p2p connection with the first electronic device 10, making it impossible for the second electronic device 20 to establish a p2p connection with the first electronic device 10, thereby causing the file sharing service to fail.

[0166] If the communication framework 202 of the second electronic device 20 determines that a p2p connection can be established with the first electronic device 10 , the process proceeds to S413 .

[0167] Specifically, if the communication framework 202 of the second electronic device 20 determines that it can establish a p2p connection with the first electronic device 10, it means that the p2p channel that allows the second electronic device 20 to establish a p2p connection with the first electronic device 10 is in an idle state (that is, not occupied by other cross-device services), so that the second electronic device 20 is allowed to establish a p2p connection with the first electronic device 10 to realize the file sharing service.

[0168] For ease of understanding, the following describes in detail the specific process of the communication framework 202 of the second electronic device 20 determining whether to allow the establishment of a p2p connection with the first electronic device 10 in conjunction with Figure 7. The communication framework 202 applied to the second electronic device 20.

[0169] S701: Determine whether the second electronic device 20 enables a two-way p2p connection.

[0170] Specifically, based on the hardware configuration of the second electronic device 20 , it is determined whether the first electronic device 20 enables the two-way p2p connection.

[0171] If yes, then proceed to S702. The second electronic device 20 enables dual-path p2p connection, and the second electronic device 20 has dual-path p2p channels, including: a first p2p channel and a second p2p channel. For ease of description, the first p2p channel is referred to as p2p0 channel, and the second p2p channel is referred to as p2p1 channel.

[0172] If not, proceed to S703. If the second electronic device 20 does not enable the dual-path p2p connection, the second electronic device 20 only has a single-path p2p channel, that is, only the first p2p channel (p2p0 channel) exists.

[0173] S702: Determine whether both the p2p0 channel and the p2p1 channel are occupied.

[0174] If so, the second electronic device 20 cannot establish a p2p connection with the first electronic device 10. When both the p2p0 channel and the p2p1 channel of the second electronic device 20 are occupied, it means that the second electronic device 20 does not have an idle p2p channel to establish a p2p connection with the first electronic device 10, so it cannot establish a p2p connection with the first electronic device 10.

[0175] If not, proceed to S704.

[0176] S703: Determine whether the p2p0 channel is occupied.

[0177] If yes, the second electronic device 20 cannot establish a p2p connection with the first electronic device 10. When the p2p0 channel of the second electronic device 20 is occupied, it means that the second electronic device 20 does not have an idle p2p channel to establish a p2p connection with the first electronic device 10, so it cannot establish a p2p connection with the first electronic device 10.

[0178] If not, proceed to S704.

[0179] S704 : Perform P2P rule negotiation with the first electronic device based on the available channel list of the first electronic device 10 .

[0180] If the negotiation is successful, it means that the second electronic device 20 allows the establishment of a p2p connection with the first electronic device 10 .

[0181] If the negotiation fails, it means that the second electronic device 20 cannot establish a p2p connection with the first electronic device 10 .

[0182] Specifically, when electronic devices use a p2p connection to transmit files, the sending end (the first electronic device 10) and the receiving end (the second electronic device 20) need to be in the same frequency band and the same channel.

[0183] The p2p negotiation rules can be understood as the intersection of the available channels of the sender (first electronic device 10) and the receiver (second electronic device 20). If there is an intersection, the negotiation is successful, indicating that the sender (first electronic device 10) and the receiver (second electronic device 20) have available channels in the same frequency band, allowing the p2p connection to be established. If there is no intersection, the negotiation fails, indicating that the sender (first electronic device 10) and the receiver (second electronic device 20) do not have available channels in the same frequency band, and the p2p connection cannot be established.

[0184] S411 : The communication framework 202 of the second electronic device 20 transparently transmits the second status code to the file sharing application 101 of the first electronic device 10 through the communication framework 102 of the first electronic device 10 .

[0185] The second status code indicates that the second electronic device 20 is not allowed to establish a p2p connection with the first electronic device 10, and thus cannot implement a file sharing service with the first electronic device. In other words, due to the p2p occupancy of the second electronic device 20, a p2p connection cannot be established with the first electronic device 10.

[0186] In one possible implementation, the second status code is preconfigured as status code 1013 to indicate that file sharing fails due to a problem with the peer electronic device (the second electronic device 20 ) during the file sharing process.

[0187] S412 : The file sharing application 101 of the first electronic device 10 prompts the user that the file sharing service has failed through a pop-up window based on the second status code.

[0188] In a possible implementation, the first electronic device 10 displays a prompt message such as "the other party's WLAN transmission channel is occupied, and the transmission fails" through a tosta pop-up window to prompt the user that the file sharing service has failed.

[0189] S413 : The communication framework 202 of the second electronic device 20 successfully establishes a p2p connection with the communication framework 102 of the first electronic device 10 .

[0190] The first electronic device 10 and the second electronic device 20 successfully establish a p2p connection, thereby enabling a file sharing service through the p2p connection.

[0191] The present application provides a service conflict prompt method, in which the file sharing application (application layer application) searches for the connection status and connection type of the cross-device service based on the first status code returned by the control center, determines the conflicting service that affects the file sharing service, that is, the conflicting service occupies the p2p channel of the first electronic device (sender), thereby causing the file sharing to fail; based on the conflicting service, a pop-up window prompts the reason for the failure of the file sharing service, that is, the first electronic device (sender) prompts the user through a pop-up window that the reason for the failure of the file sharing service is that the local end is performing a conflicting service, occupying the p2p channel, thereby causing the file sharing service to fail. It can accurately prompt the user the reason for the failure of file sharing, guide the user's operation to solve the problem of the file failure, and improve the user's experience.

[0192] 8, a detailed description is provided of how the first electronic device 101, after the file sharing application 101 on the first electronic device 10 has displayed a pop-up window notifying the user of the reason for the file sharing service failure based on the found conflicting service, transfers files with the second electronic device 20 via a peer-to-peer connection. The conflicting service is illustrated using the keyboard-mouse collaboration service as an example, with a pop-up window displaying "Keyboard-mouse collaboration service is currently in use on this device. Please disconnect and try again."

[0193] When the file sharing application 101 of the first electronic device 10 displays a pop-up window stating that "this device is using the keyboard and mouse collaboration service, please disconnect and try again", the user immediately disconnects the keyboard and mouse collaboration service according to the prompt displayed in the pop-up window, and then uses the file sharing application 101 of the first electronic device 10 again to trigger the file sharing operation. After receiving the file sharing operation, the communication framework 102 of the first electronic device 10 directly sends a p2p connection request to the communication framework 102 of the second electronic device 20. The second electronic device 20 responds to the p2p connection request and determines whether to allow a p2p connection to be established with the first electronic device 10. If so, the p2p connection between the first electronic device 10 and the second electronic device 20 is successful, and files are transferred using the p2p connection; if not, the second status code is transparently transmitted to the file sharing application 101 of the first electronic device 10 through the communication framework 102 of the first electronic device 10. Based on the status code 1013, the file sharing application 101 of the first electronic device 10 prompts the user through a pop-up window that the file sharing service has failed.

[0194] The embodiment of the present application provides a sharing conflict prompt method that can accurately prompt the user why the current transmission failed, guide the user's operation based on the accurate prompt, thereby solving the file sharing failure problem and improving the user experience. For example, if it displays "This device is using the keyboard and mouse collaborative service, please disconnect and try again", it will prompt the user that the file sharing failed because the keyboard and mouse collaborative service is in use, so the keyboard and mouse collaborative service should be disconnected and the file sharing operation should be re-performed, that is, the file sharing service should be re-performed, thereby improving the user's experience.

[0195] Example 2:

[0196] 9, another service conflict prompting method provided by an embodiment of the present application is described in detail. The method is applied to a first electronic device, which is the initiator of the cross-device service.

[0197] S901: The first electronic device determines whether there is an unoccupied p2p channel on the local end in response to a service start operation input by a user.

[0198] The service start operation is used to start the corresponding cross-device service. For example, when starting a multi-screen collaboration service between a mobile phone and a laptop, if the mobile phone and the laptop are within the preset range and the "Connect Now" icon is clicked on the laptop, the user has started the service start operation to start the multi-screen collaboration service.

[0199] Specifically, the communication framework of the first electronic device responds to the service start operation input by the user to determine whether there is an unoccupied p2p channel on the local end; the communication framework of the first electronic device is located in the application framework layer of the operating system of the first electronic device.

[0200] When there is no unoccupied p2p channel, proceed to S902.

[0201] When there is an unoccupied p2p channel, proceed to S904.

[0202] S902: When there is no unoccupied p2p channel on the local end, the first electronic device searches for conflicting services among the cross-device services of the first electronic device.

[0203] The connection state of the conflicting service is not disconnected, and the connection type of the conflicting service is p2p.

[0204] Specifically, when there is no unoccupied p2p channel on the local end, the cross-device application of the first electronic device searches for conflicting services among the cross-device services of the first electronic device. The cross-device application of the first electronic device is located in the application program layer of the operating system of the first electronic device.

[0205] Furthermore, the connection attribute value of the cross-device service is used to search for conflicting services in the cross-device service of the first electronic device. The connection attribute value is used to indicate the connection state and connection type of the service.

[0206] In one possible implementation, the connection attribute value of the cross-device service is obtained in the following manner:

[0207] The communication framework of the first electronic device sends a first status code to the cross-device application of the first electronic device; the cross-device application of the first electronic device sends a connection attribute acquisition request to the control center of the first electronic device based on the first status code; the control center of the first electronic device returns the connection attribute value of the cross-device service to the cross-device application of the first electronic device in response to the connection attribute acquisition request. The first status code is used to indicate that the first electronic device does not have an unoccupied P2P channel.

[0208] S903: The first electronic device prompts the reason for the cross-device service failure through a pop-up window based on the found conflicting services.

[0209] Specifically, the cross-device application of the first electronic device prompts the reason for the failure of the cross-device service through a pop-up window based on the found conflicting service.

[0210] Furthermore, when no conflicting service is found, a pop-up window will be displayed to indicate that the cross-device service has failed.

[0211] The reason why the conflicting service is not found is that a failure occurs in the control center of the first electronic device, and the connection status and connection type of the cross-device service cannot be updated in time.

[0212] S904: When there is an unoccupied p2p channel on the local end, the first electronic device sends a p2p connection request to the second electronic device.

[0213] When the second electronic device receives the p2p connection request, the second electronic device responds to the p2p connection request and determines whether the second electronic device is allowed to establish a p2p connection with the first electronic device.

[0214] S905: When the second electronic device does not allow the establishment of a p2p connection with the first electronic device, the first electronic device prompts the user through a pop-up window that the cross-device service has failed.

[0215] Furthermore, when the second electronic device allows a p2p connection to be established with the first electronic device, the first electronic device establishes a p2p connection with the second electronic device, and based on the p2p connection, a cross-device service between the first electronic device and the second electronic device is implemented.

[0216] The embodiment of the present application provides a service conflict prompt method, which includes: in response to a service startup operation input by a user, determining whether there is an unoccupied p2p channel on the local side; when there is no unoccupied p2p channel on the local side, searching for a conflicting service in the cross-device service of the first electronic device; the connection status of the conflicting service is not unconnected, and the connection type of the conflicting service is p2p; based on the conflicting service found, prompting the reason for the failure of the cross-device service through a pop-up window. When the cross-device service fails due to the occupation of all the p2p channels on the local side, searching for the conflicting service in the cross-device service of the local side, and then, based on the conflicting service, accurately prompting the reason for the failure of the cross-device service through a pop-up window, thereby guiding the user's operation and improving the user experience.

[0217] Furthermore, the connection attribute values ​​of cross-device services stored in the control center of the application layer of the operating system of the first electronic device are used to find conflicting services. Accurate prompts on the reasons for cross-device service failures can be achieved without additional program modification or configuration, simplifying the complexity of updates.

[0218] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program or instruction is stored. When the computer program or instruction is executed, the electronic device implements the above-mentioned functions or steps.

[0219] An embodiment of the present application further provides a computer program product, including a computer program or instructions, which, when executed by a processor, enables an electronic device to implement the above-mentioned functions or steps.

[0220] The above is only a specific embodiment of the present application, but the scope of protection of this application is not limited to this. Any changes or substitutions within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A service conflict prompting method, characterized in that: Applied to a first electronic device, the method includes: In response to a service start operation input by a user, determining whether there is an unoccupied p2p channel on the local end; the service start operation is used to start a corresponding cross-device service; When there is no unoccupied p2p channel at the local end, searching for conflicting services among the cross-device services of the first electronic device; the connection state of the conflicting services is not unconnected, and the connection type of the conflicting services is p2p; Based on the conflicting services found, a pop-up window is displayed to indicate the reason for the cross-device service failure.

2. The method according to claim 1, characterized in that The step of judging whether there is an unoccupied p2p channel at the local end in response to the service start operation input by the user includes: The communication framework of the first electronic device responds to the service start operation input by the user to determine whether there is an unoccupied p2p channel on the local end; the communication framework is located in the application framework layer of the operating system of the first electronic device.

3. The method according to claim 1, characterized in that: When there is no unoccupied p2p channel at the local end, searching for conflicting services among the cross-device services of the first electronic device; Based on the conflicting services found, a pop-up window is used to prompt the user with the reasons for the cross-device service failure, including: When there is no unoccupied p2p channel on the local end, the cross-device application of the first electronic device searches for conflicting services among the cross-device services of the first electronic device; the cross-device application of the first electronic device prompts the reason for the failure of the cross-device service through a pop-up window based on the conflicting services found; the cross-device application is an application for implementing the cross-device service corresponding to the service startup operation; the cross-device application is located in the application layer of the operating system of the first electronic device.

4. The method according to any one of claims 1 to 3, characterized in that: The searching for conflicting services among the cross-device services of the first electronic device includes: The conflicting services in the cross-device services of the first electronic device are searched by using the connection attribute value of the cross-device service; the connection attribute value is used to indicate the connection state and connection type of the service.

5. The method according to claim 4, characterized in that The connection attribute value of the cross-device service is acquired by a cross-device application of the first electronic device from a control center of the first electronic device; the cross-device application is located in an application program layer of an operating system of the first electronic device.

6. The method according to claim 5, characterized in that The connection attribute value of the cross-device service is obtained in the following manner: The communication framework of the first electronic device sends a first status code to the cross-device application of the first electronic device; the first status code is used to indicate that there is no unoccupied p2p channel of the first electronic device; The cross-device application of the first electronic device sends a connection attribute acquisition request to a control center of the first electronic device based on the first status code; The control center of the first electronic device returns the connection attribute value of the cross-device service to the cross-device application of the first electronic device in response to the connection attribute acquisition request.

7. The method according to claim 1, characterized in that The step of judging whether there is an unoccupied p2p channel at the local end in response to the service start operation input by the user includes: In response to a service start-up operation input by a user, determining whether the local end enables a dual-path p2p connection, and determining whether the first p2p channel and the second p2p channel are occupied; Wherein: when the local end enables dual-path p2p connection, and both the first p2p channel and the second p2p channel are occupied, there is no unoccupied p2p channel on the local end; When the local end enables dual-path p2p connection, and the first p2p channel and the second p2p channel are not both occupied, then the local end has an unoccupied p2p channel; When the local end does not enable the dual-path p2p connection and the first p2p channel is occupied, there is no unoccupied p2p channel on the local end; When the local end does not enable the dual-path p2p connection and the first p2p channel is not occupied, the local end has an unoccupied p2p channel.

8. The method according to claim 1, characterized in that After searching for conflicting services in the cross-device services of the first electronic device, the method further includes: When no conflicting services are found, a pop-up window will pop up to indicate that the cross-device service has failed.

9. The method according to claim 1, characterized in that: The method further comprises: When there is an unoccupied p2p channel at the local end, sending a p2p connection request to a second electronic device, so that the second electronic device responds to the p2p connection request and determines whether the second electronic device is allowed to establish a p2p connection with the first electronic device; When the second electronic device does not allow the establishment of a p2p connection with the first electronic device, a pop-up window prompts the user that the cross-device service has failed.

10. The method according to claim 9, characterized in that When the second electronic device does not allow the establishment of a p2p connection with the first electronic device, prompting a cross-device service failure through a pop-up window includes: receiving a second status code sent by the second electronic device; the second status code is used to indicate that the second electronic device is not allowed to establish a p2p connection with the first electronic device; Based on the second status code, a pop-up window is displayed to prompt that the cross-device service has failed.

11. The method according to claim 9, characterized in that The method further comprises: When the second electronic device allows to establish a p2p connection with the first electronic device, establishing a p2p connection with the second electronic device; Based on the p2p connection, a cross-device service between the first electronic device and the second electronic device is implemented.

12. An electronic device, characterized in that: including a processor and a memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 11.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program or instruction, and when the computer program or instruction is executed, the method according to any one of claims 1 to 11 is implemented.

Citation Information

Patent Citations

  • Network function management method, device, storage medium and intelligent terminal

    CN108712280A

  • Changing Topology of Wireless Peer-to-Peer Group

    US20170105102A1

  • Information control method and apparatus and base station

    US20230140463A1

  • Function conflict processing method and apparatus, electronic device, and readable storage medium

    US20230156112A1

  • Communication method and electronic device

    WO2023025191A1

Cited By

  • Omnibearing safety protection and fault early warning system for cooling tower

    CN120634253A