Service coexistence method and device, electronic equipment and storage medium

By determining whether the electronic device supports the service coexistence function and establishing services through the target available frequency bands, the problem that P2P service and SoftAP service cannot operate simultaneously is solved, and the user experience is improved.

CN119729895APending Publication Date: 2025-03-28GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411853975.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

In existing electronic devices, there is a conflict between P2P services and SoftAP services and cannot operate at the same time, affecting the user experience.

Method used

By determining whether the electronic device supports the service coexistence function, if supported, service is established through the target available frequency bands to achieve simultaneous operation of P2P services and SoftAP services.

Benefits of technology

It resolves the conflict between P2P service and SoftAP service, realizes that both operate simultaneously, no longer interrupt each other, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119729895A_ABST
    Figure CN119729895A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a service coexistence method and device, electronic equipment and a storage medium, and the method is applied to first electronic equipment, and comprises the steps: receiving a first triggering operation, the first triggering operation is used for triggering the establishment of a first service, and the first service comprises a point-to-point (P2P) service or a soft access point (SoftAP) service; judging whether the first electronic equipment supports a service coexistence function or not, wherein the service coexistence function comprises P2P service and SoftAP service coexistence; and under the condition that the first electronic equipment supports the service coexistence function, establishing the first service through the target available frequency band. The P2P service and the SoftAP service of the electronic equipment can be carried out at the same time without mutual interruption, so that the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of communication technology, and relate to but are not limited to a service coexistence method and device, an electronic device, and a storage medium. Background Art

[0002] With the development of technology, various electronic devices, such as mobile phones and tablet computers, are becoming more and more functional. For example, users can share the network with other nearby electronic devices through the personal hotspot function implemented by the Soft Access Point (SoftAP) service of personal electronic devices, so that other electronic devices can access the Internet through the hotspot. Users can also share pictures, files and other data with other nearby electronic devices through the peer-to-peer (P2P) service without using social applications.

[0003] In the related art, there is a conflict between the SoftAP service and the P2P service of electronic devices. That is to say, when a user uses the mutual transmission function of an electronic device, he needs to turn off the personal hotspot function before he can proceed to the next interactive operation. Similarly, the user needs to turn off the mutual transmission function before the hotspot function can be turned on normally to share the network. The user needs to choose and operate between the two services, which affects the user experience. Summary of the invention

[0004] In view of this, the service coexistence method and device, electronic device, and storage medium provided in the embodiments of the present application can determine whether the electronic device supports the service coexistence function when the user triggers the establishment of a P2P service or a SoftAP service, and if supported, establish the service through the target available frequency band, so that the P2P service and the SoftAP service in the electronic device can run simultaneously, thereby improving the user experience. The service coexistence method and device, electronic device, and storage medium provided in the embodiments of the present application are implemented as follows:

[0005] According to a first aspect of an embodiment of the present application, a service coexistence method is provided, which is applied to a first electronic device. The method includes:

[0006] Receiving a first trigger operation, where the first trigger operation is used to trigger establishment of a first service, where the first service includes a point-to-point P2P service or a soft access point SoftAP service;

[0007] Determine whether the first electronic device supports a service coexistence function, where the service coexistence function includes coexistence of the P2P service and the SoftAP service;

[0008] In a case where the first electronic device supports the service coexistence function, the first service is established through a target available frequency band.

[0009] According to a second aspect of an embodiment of the present application, a service coexistence device is provided, including:

[0010] A detection module, configured to receive a first trigger operation, where the first trigger operation is used to trigger the establishment of a first service, where the first service includes a point-to-point P2P service or a soft access point SoftAP service;

[0011] A coexistence determination module, configured to determine whether the service coexistence device supports a service coexistence function, wherein the service coexistence function includes coexistence of the P2P service and the SoftAP service;

[0012] The service establishment module is used to establish the first service through a target available frequency band when the service coexistence device supports the service coexistence function.

[0013] According to a third aspect of an embodiment of the present application, a computer electronic device is provided, including a memory and a processor, wherein the memory stores a computer program executable on the processor, and the processor implements the method of an embodiment of the present application when executing the program.

[0014] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method provided in the embodiment of the present application is implemented.

[0015] In the service coexistence method and apparatus, electronic device, and storage medium provided in the embodiments of the present application, a first electronic device receives a first trigger operation, and the first trigger operation is used to trigger the establishment of a first service including a P2P service or a SoftAP service. The first electronic device needs to determine whether the first service can be actually established. To this end, it is determined whether the first electronic device supports a service coexistence function, and the service coexistence function includes the coexistence of P2P services and SoftAP services. If the first electronic device supports the service coexistence function, the first service can be created through a target available frequency band, and the service established after implementation will not conflict with existing services. The P2P service and the SoftAP service can run on the first electronic device at the same time, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.

[0017] Figure 1a A schematic diagram of an application scenario of the service coexistence method provided in an embodiment of the present application;

[0018] Figure 1b A schematic diagram of another application scenario of the service coexistence method provided in an embodiment of the present application;

[0019] Figure 2 A schematic diagram of a software control of a first electronic device provided in an embodiment of the present application;

[0020] Figure 3 A schematic diagram of the hardware structure of a first electronic device provided in an embodiment of the present application;

[0021] Figure 4 A schematic diagram of a process flow of a service coexistence method provided in an embodiment of the present application;

[0022] Figure 5 A schematic diagram of an application scenario in which the first service is a P2P service;

[0023] Figure 6 A schematic diagram of a process in which the first service is a P2P service in the service coexistence method provided in an embodiment of the present application;

[0024] Figure 7 A schematic diagram of a process for negotiating coexistence capabilities in the service coexistence method provided in an embodiment of the present application;

[0025] Figure 8 Another flow chart of the service coexistence method provided in the embodiment of the present application, in which the first service is a P2P service;

[0026] Fig. 9 A schematic diagram of a process in which a second electronic device supports a service coexistence function and has the same available frequency band as the first electronic device in the service coexistence method provided in an embodiment of the present application;

[0027] Fig.10 A schematic diagram of a process in which a second electronic device supports a service coexistence function and has an available frequency band different from that of a first electronic device in a service coexistence method provided in an embodiment of the present application;

[0028] Fig.11 A schematic diagram of a process in which the first electronic device has no available frequency band in the service coexistence method provided in an embodiment of the present application;

[0029] Fig.12 A schematic diagram of a flow chart of a second electronic device not supporting a service coexistence function in a service coexistence method provided in an embodiment of the present application;

[0030] Fig.13 A schematic diagram of a process in which the first service is a SoftAP service in the service coexistence method provided in an embodiment of the present application;

[0031] Fig.14 A schematic diagram of a process for establishing a STA service in the service coexistence method provided in an embodiment of the present application;

[0032] Fig.15 A schematic diagram of the structure of a service coexistence device provided in an embodiment of the present application;

[0033] Fig.16 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0034] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the specific technical solution of the present application will be further described in detail below in conjunction with the drawings in the embodiments of the present application. The following embodiments are used to illustrate the present application, but are not used to limit the scope of the present application.

[0035] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0036] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0037] It should be pointed out that the terms "first\second\third" involved in the embodiments of the present application are used to distinguish similar or different objects, and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.

[0038] In the related art, taking the Android system as an example, there is a conflict between P2P services and SoftAP services, which makes it impossible for the two to run simultaneously on the same electronic device. When a user has already started one of the services on an electronic device, if they need to start another service to meet different functional requirements, the electronic device may automatically shut down the currently running service or require the user to shut it down manually. In this process, users may not only need to perform a series of complex manual operations, but also interrupt the services they are using, affecting the user experience.

[0039] Peer to Peer (P2P) service refers to a computer network communication service that allows electronic devices to communicate directly with each other without going through a server or other intermediary electronic devices. P2P technology is widely used in scenarios such as file sharing, online games, and real-time communication. In P2P service technology, each electronic device is both a client and a server. Electronic devices can communicate directly with each other without being restricted by intermediary electronic devices. Since it allows electronic devices to communicate with each other without going through a server, P2P technology is often called serverless technology. Taking the Android system as an example, in order to implement P2P technology, Android applications can use Wi-Fi Direct technology. Wi-Fi Direct technology allows electronic devices to communicate directly with each other without a network connection. In a local area network, Wi-Fi Direct technology can connect through Wi-Fi to enable direct connections between electronic devices. Among them, a common P2P service is the mutual transmission function of mobile phones or tablets, which realizes fast and convenient transmission of data such as pictures and files, and is suitable for use in environments where there is no network coverage, the network connection is unstable, or the user does not want to use social applications.

[0040] Soft Access Point (SoftAP) service is also a computer network communication service. By simulating a wireless access point, electronic devices can create a Wi-Fi network for other electronic devices to connect and share Internet connection even without a physical router. SoftAP has a wide range of application scenarios, including but not limited to: providing Internet access in areas without Wi-Fi network coverage; serving as a temporary network solution for multiple people to share network connection; serving as a supplement to home or small office networks, etc. Among them, taking the Android system as an example, a common SoftAP service is the personal hotspot function of mobile phones or tablets, which can provide network sharing for nearby electronic devices.

[0041] In addition to the above-mentioned P2P services and SoftAP services, there is also a more important communication service in electronic devices, namely the station (STA) service, also known as STA mode or client mode. When the STA service of an electronic device is turned on, the electronic device can connect to a wireless network, play the role of a client, and access a local area network (LAN) or the Internet through a wireless access point (AP).

[0042] Since STA services, P2P services, and SoftAP services will occupy wireless resources when enabled, and their simultaneous operation may cause frequency band and channel competition, which may affect performance and stability, in related technologies, in order to ensure the stable operation of STA services, P2P services and SoftAP services are designed as mutually exclusive modes, that is, only one of the services can be run at the same time. Although such a design can ensure a smooth experience of STA services, it also limits the ability of users to use P2P services and SoftAP services at the same time, affecting the user experience.

[0043] Taking the Android system as an example, traditional electronic devices based on the Android system do not support the coexistence (concurrent operation) of P2P services and SoftAP services.

[0044] In one case, a traditional electronic device does not allow a user to simultaneously turn on the controls for the P2P service and the SoftAP service (which can be understood as the function switch displayed on the display interface). For example, when a user has already turned on the control corresponding to the SoftAP service of the electronic device (which can correspond to the personal hotspot function), and the user clicks on the control corresponding to the P2P service on the electronic device (which can correspond to the personal hotspot function), the electronic device will forcibly turn off the turned-on SoftAP service, display the control corresponding to the SoftAP service as turned off, and then turn on the P2P service, or output a conflict prompt message, and only after the user manually turns off the control corresponding to the SoftAP service, will the control corresponding to the P2P service be allowed to be turned on.

[0045] In another case, existing electronic devices allow the controls of the P2P service and the SoftAP service to be displayed as turned on at the same time, but when data transmission service actually occurs, one of the P2P service and the SoftAP service needs to be forcibly turned off, which will affect the user experience. In actual applications, it can be determined according to user selection or preset priority, which is not limited here.

[0046] In view of this, in order to enable the coexistence of P2P services and SoftAP services in electronic devices to improve user experience, an embodiment of the present application provides a service coexistence method, which can determine whether the electronic device supports the service coexistence function when receiving a trigger operation of a user triggering the establishment of a P2P service or a SoftAP service, and establish the service through a target available frequency band if supported, so that the P2P service and the SoftAP service of the electronic device can be carried out simultaneously without interrupting each other, so as to improve the user experience.

[0047] The following describes actual scenarios in which the service coexistence method provided in the embodiments of the present application is applied.

[0048] See also Figure 1a , Figure 1a A schematic diagram of an application scenario of the service coexistence method provided in an embodiment of the present application, such as Figure 1a As shown, the display screen of the first electronic device 100 displays a personal hotspot control 101, a mutual transmission control 102, and multiple function controls.

[0049] The multiple function controls may include, but are not limited to, wireless local area network (WLAN) setting controls, mobile network setting controls, brightness setting controls, volume setting controls, Bluetooth controls, flashlight controls, near field communication (NFC) controls, flight mode controls, timer controls, and do not disturb controls. The user can use the functions corresponding to each function control by performing trigger operations such as clicking and long pressing on each function control, which is not limited here. For example, the user can click the flashlight control as needed to control the working state of the flash set by the first electronic device, so as to provide lighting when needed.

[0050] It should be noted that the electronic device can reflect the working status of the corresponding function to the user by changing the display style of the function control. The display style may include but is not limited to the color, background image, control shape and text content of the function control. For example, the electronic device can indicate the status of the corresponding function to the user through the color and text content of the function control. Figure 1a As shown, the first electronic device 100 can prompt the user the working status of the function corresponding to each function control through the color and text content corresponding to each function control. Figure 1a As shown, the first electronic device 100 indicates the on or off state of a function by using dark or light colors for each function control, where dark colors represent on functions and light colors represent off functions. In actual applications, multiple colors can be set as needed to further refine the working state of the function so that the user can more intuitively understand the use of each function.

[0051] For example, in Figure 1a In the example, the personal hotspot function corresponding to the personal hotspot control 101 is in an on state and is connected to one device, that is, the SoftAP service has been established and is in an on state, while the mutual transmission function corresponding to the mutual transmission control 102 is in an off state, that is, the P2P service is not established. The user can turn on the mutual transmission function by performing a trigger operation such as clicking on the mutual transmission control 102. Once enabled, the first electronic device 100 can establish a P2P connection with other electronic devices (such as the second electronic device) according to the service coexistence method provided by the present application, thereby realizing the sharing of data such as pictures and files, while not affecting the use of the personal hotspot function of the first electronic device 100.

[0052] See also Figure 1b, Figure 1b A schematic diagram of another application scenario of the service coexistence method provided in an embodiment of the present application, such as Figure 1b As shown, the display screen of the first electronic device 100 displays a personal hotspot control 101, a mutual transmission control 102, and multiple function controls.

[0053] For example, in Figure 1b In the embodiment, the mutual transmission function corresponding to the mutual transmission control 102 is in the on state, while the personal hotspot function corresponding to the personal hotspot control 101 is in the off state. The user can enable the first electronic device 100 to enable the personal hotspot function (i.e., establish a SoftAP service) according to the service coexistence method provided by the present application by clicking on the personal hotspot control 101, and share the network with other devices without affecting the use of the mutual transmission function of the first electronic device 100. After the personal hotspot function is enabled, the user can set other electronic devices that the first electronic device 100 needs to share the network as needed, which is not limited here.

[0054] It should be noted that if Figure 1a or Figure 1b The application scenario of the service coexistence method shown and the interface displayed on the display screen of the first electronic device are only examples. In actual applications, the interface layout, display style of controls and corresponding text content can be set as needed, and examples are not given one by one here.

[0055] It can be seen from the above scenario that in order to ensure that the first electronic device can run P2P services and SoftAP services at the same time, the first electronic device determines whether the user needs to establish a P2P service or a SoftAP service, and then processes it according to the service coexistence method provided in this application, so that the P2P service and SoftAP service of the electronic device can be carried out simultaneously without interrupting each other, thereby improving the user experience.

[0056] The following introduces the software controls of the first electronic device that applies the service coexistence method provided by the present application in conjunction with the drawings in the specification.

[0057] See also Figure 2 , Figure 2 A schematic diagram of a software control of a first electronic device provided in an embodiment of the present application, such as Figure 2 As shown, the software framework of the first electronic device may include an application layer 201, an application framework layer 202, a system layer 203 and a kernel layer 204, and the layers communicate with each other through software interfaces.

[0058] The application layer 201 may include a series of application packages. Figure 2As shown, the application package may include the method provided by the present application for implementing the personal hotspot (corresponding to the SoftAP service) and the mutual transmission corresponding to the P2P service for service coexistence. The application package may also include applications such as Bluetooth, communication, navigation, video, and music.

[0059] In the embodiment of the present application, since the first electronic device needs to receive a trigger operation to establish a service corresponding to the trigger operation, the application layer 201 of the first electronic device may also include applications such as a desktop launcher and a system application interface (systemUI) to implement operations related to user interaction and function display. Figure 2 The names of applications or services in the shown hierarchy are only examples. For example, the "mutual transfer" application can also be named "quick share". The names of applications or services in the software framework are not limited here.

[0060] The application framework layer 202 provides an application programming interface (API) and a programming framework for the application in the application layer 201, and may include a window manager, a content provider, a phone manager, a resource manager, a notification manager, a view system, and a WiFi framework. The window manager is used to manage window programs. Among them, the window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc. The content provider is used to store and obtain data and make the data accessible to the application. The data may include video, images, audio, dialed and received calls, browsing history and bookmarks, phone books, etc. The phone manager is used to provide the communication function of the first electronic device. For example, the management of call status (including connection, hang up, etc.). The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, etc. The notification manager enables the application to display notification information in the status bar, which can be used to convey notification type messages, and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify the completion of downloads, message reminders, etc. The notification manager can also be a notification that appears in the top status bar of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc. The view system includes visual controls, such as controls that display text, controls that display pictures, etc. The view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface including a text message notification icon can include a view that displays text and a view that displays pictures.

[0061] In the method provided in the present application, the P2P service and SoftAP service involved are both communication services, and the service status and service frequency band information in the first electronic device can be obtained through the WiFi framework included in the application framework layer 202, which is not limited here.

[0062] The system layer 203 may include a surface manager, a two-dimensional graphics engine, an image processing library, a three-dimensional graphics processing library, a media library, and an Android Runtime module. Among them, the Android Runtime module includes a core library and a virtual machine, which is responsible for the scheduling and management of the system. The application layer 201 and the application framework layer 202 run in the virtual machine. The virtual machine executes the programming files of the application layer 201 and the application framework layer 202 as binary files, and is used to perform management functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection. The surface manager is used to manage the display subsystem and provides fusion of 2D and 3D layers for multiple applications. The media library supports a variety of commonly used audio and video format playback and recording, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. The three-dimensional graphics processing library is used to implement three-dimensional graphics drawing, image rendering, synthesis, and layer processing, etc. The two-dimensional graphics engine is a drawing engine for 2D drawing.

[0063] The kernel layer 204 is a layer between hardware and software. The kernel layer 204 may include display drivers, sensor drivers, and audio drivers.

[0064] An example of the software architecture of the first electronic device is described above.

[0065] It should be noted that in the embodiment itself, the first electronic device can establish a communication connection with other electronic devices. For example, the first electronic device can transmit data with other electronic devices other than the first electronic device by establishing a P2P service, or share a network with other electronic devices by establishing a SoftAP service. The software architecture of other electronic devices that are connected to the first electronic device for communication can be the same as that of the first electronic device, which will not be described in detail here. Figure 2 The layers in the software structure shown and the components included in each layer do not constitute a specific limitation on the first electronic device. In other embodiments, the first electronic device may include more layers than shown. Each layer may include more or fewer components than shown. In addition, the above-mentioned functional modules may also be combined into one functional module, and one functional module may also be composed of multiple functional modules.

[0066] Through the above software architecture, when the user triggers the establishment of a P2P service or a SoftAP service, the first electronic device can realize that the P2P service and the SoftAP service in the electronic device can run simultaneously, thereby improving the user experience.

[0067] After introducing the software architecture of the first electronic device, in order to more comprehensively introduce the structure of the first electronic device, the hardware structure of the first electronic device is introduced below.

[0068] See also Figure 3 , Figure 3 A schematic diagram of the hardware structure of a first electronic device provided in an embodiment of the present application.

[0069] It should be noted that the first electronic device may be a mobile phone, a tablet computer, a virtual reality (VR) electronic device, an augmented reality (AR) electronic device, an electronic device in industrial control, an electronic device in self-driving, an electronic device in remote medical, an electronic device in smart grid, an electronic device in transportation safety, an electronic device in smart city, an electronic device in smart home, etc. Figure 3 As shown, the first electronic device may include components such as a processor 310, a memory 320, a transceiver 330, a display unit 340, and an input unit 350.

[0070] The processor 310 is the control center of the first electronic device, and uses various interfaces and lines to connect various parts of the entire first electronic device, and executes various functions of the first electronic device and processes data by running or executing software programs and / or modules stored in the memory 320, and calling data stored in the memory 320, so as to monitor the first electronic device as a whole. Optionally, the processor 310 may include one or more processing units; optionally, the processor 310 may integrate an application processor, and the application processor mainly processes operating devices, user interfaces, and application programs, etc. Of course, other processors may also be included, which are not limited here.

[0071] The memory 320 can be used to store software programs and modules. The processor 310 executes various functional applications and data processing of the first electronic device by running the software programs and modules stored in the memory 320. The memory 320 mainly includes a program storage area and a data storage area, wherein the program storage area can store operating devices, at least one application required for a function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the first electronic device (such as audio data, a phone book, etc.), etc. In addition, the memory 320 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0072] The transceiver 330 can provide wireless communication solutions applied to the first electronic device, including wireless local area networks (WLAN), such as wireless fidelity (WiFi) networks, Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. The transceiver 330 can be one or more devices integrating at least one communication processing module, for example, integrating an antenna and a baseband processor into the transceiver 330, or integrating an antenna and a modem processor into the transceiver 330, etc., which are not limited here.

[0073] The display unit 340 may be used to display information input by the user or information provided to the user and various menus of the first electronic device. The display unit 340 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc., which is not limited here.

[0074] The input unit 350 can be used to receive input digital or character information, and to generate signal input related to the user settings and function control of the first electronic device. Among them, the input unit 350 can collect the user's operations on or near it, and drive the corresponding connection device according to a pre-set program. In addition, the input unit 350 may include a touch panel, and the touch panel can be implemented in various types such as resistive, capacitive, infrared and surface acoustic wave. In addition to the touch panel, the input unit 350 may also include other input devices. Among them, other input devices may include but are not limited to one or more of function keys (such as volume control buttons, switch buttons, etc.), trackballs, joysticks, etc.

[0075] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the first electronic device. In other embodiments of the present application, the first electronic device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0076] In order to solve the deficiencies existing in the aforementioned related technologies, a service coexistence method is provided in an embodiment of the present application. The specific implementation process of the application startup method is described in detail below.

[0077] See also Figure 4 , Figure 4 A flow chart of a service coexistence method provided in an embodiment of the present application, the method is applied to a first electronic device, such as Figure 4 As shown, the following steps may be included:

[0078] S401: Receive a first trigger operation, where the first trigger operation is used to trigger establishment of a first service, where the first service includes a point-to-point P2P service or a soft access point SoftAP service.

[0079] It should be noted that P2P services and SoftAP services are services for computer network communication. Through P2P services, the first electronic device and other electronic devices can communicate with each other directly without going through a server or other intermediary electronic devices. This application uses the mutual transmission function as an example for explanation. In actual applications, P2P services can also correspond to real-time communication between the first electronic device and other electronic devices, online games (directly establishing a connection between devices without going through a server), and other functions, which will not be repeated here. Through the SoftAP service, a wireless access point is simulated. Even in the absence of a physical router, the first electronic device can create a Wi-Fi network for other electronic devices to connect and share an Internet connection. This application uses the personal hotspot function as an example for explanation.

[0080] In an embodiment of the present application, the first electronic device first receives a first trigger operation thereon, and the first trigger may be a trigger operation on a service control corresponding to a first service displayed on a display screen of the first electronic device.

[0081] For example, when the first service is a P2P service, the service control corresponding to the first service may be a mutual transmission control (also referred to as a P2P service control), and receiving the first trigger operation includes receiving the first trigger operation on the mutual transmission control (P2P service control). The receiving of the first trigger operation may be performed when the SoftAP service is enabled (e.g., Figure 1a It can also be performed when the SoftAP service is closed, which is not limited here.

[0082] When the first service is a SoftAP service, the service control corresponding to the first service may be a personal hotspot control (also referred to as a SoftAP service control), and receiving the first trigger operation includes receiving the first trigger operation on the personal hotspot control (SoftAP service control). The receiving of the first trigger operation may be performed when the SoftAP service is enabled (e.g., Figure 1a It can also be performed when the SoftAP service is closed, which is not limited here.

[0083] It is understandable that since P2P services mainly involve data transmission between different electronic devices, in some possible embodiments, receiving the first trigger operation may include receiving the first trigger operation of the target mutual transmission control corresponding to the target object. The target object may be a target picture, a target video or a target file. Figure 5 , Figure 5 FIG. 1 is a schematic diagram of an application scenario in which the first service is a P2P service. Figure 5 In the embodiment shown, the target object is a target picture. Figure 5 The interface shown in part (1) is a schematic diagram of an interface of a photo album application of a first electronic device, wherein the target picture control 501 is a picture control corresponding to the "picture 2" selected by the user. After the user triggers the target picture control 501, the first electronic device switches to displaying the following Figure 5 (2) After the user triggers the sharing control 502, the interface shown in FIG. Figure 5 (3) After the user triggers the mutual transmission control 503, the interface shown in FIG. Figure 5 In the interface shown in part (4), the user can trigger the target mutual transmission control 504 to determine the electronic device (device 2) with which the target object (picture 2) is to be shared. In this way, after the user has gone through a series of object selections and function selections, the first electronic device implements receiving the first trigger operation of the target mutual transmission control corresponding to the target object.

[0084] like Figure 5 The application scenario diagram shown is only an example. In actual applications, it can also be achieved by triggering controls associated with the first service in different interfaces displayed by different applications of the first electronic device, so that the first electronic device receives a first operation for triggering the establishment of the first service, such as a sharing function based on P2P service or SoftAP service in different applications. Examples are not given one by one here.

[0085] S402: Determine whether the first electronic device supports a service coexistence function, where the service coexistence function includes coexistence of P2P services and SoftAP services.

[0086] It should be noted that in the service coexistence method provided in the present application, the role of the received first operation is to trigger the establishment of the first service, that is, the user attempts to establish the first service on the first electronic device. However, at this time, the first service has not been actually established successfully, and it is still necessary to further determine whether the first electronic device supports the service coexistence capability. Only after confirming that the first electronic device supports the service coexistence function, will the subsequent steps of establishing and operating the first service be continued.

[0087] In the embodiment of the present application, the service coexistence capability includes the coexistence of the P2P service and the SoftAP service, that is, in some cases, the P2P service and the SoftAP service in the first electronic device can run at the same time.

[0088] In some possible embodiments, considering that STA services are important services in electronic device communications, the service coexistence capability includes coexistence of P2P services, SoftAP services and STA services, that is, in some cases, the P2P services and SoftAP services in the first electronic device can run simultaneously.

[0089] In order to determine whether the first electronic device supports the service coexistence function, the service coexistence method provided in the present application can be used in a variety of ways. For example, the system information or configuration file provided by the first electronic device can be queried to obtain the corresponding identification information to determine whether the first electronic device supports the service coexistence function. It is also possible to analyze the system log of the device and query the entries related to service coexistence in the historical system update record of the first electronic device to determine whether the device supports the service coexistence function, which is not limited here.

[0090] Exemplarily, in some possible embodiments, determining whether the first electronic device supports the service coexistence function includes:

[0091] Acquire first identification information corresponding to the first electronic device, where the first identification information is used to indicate whether the first electronic device supports a service coexistence function;

[0092] When the value of the first identification information is a preset value, it is determined that the first electronic device supports the service coexistence function.

[0093] It should be noted that the first identification information can be one or more Arabic numerals (such as 0, 1, 2, etc.), letters (such as a, b, c, etc.), or a code composed of numbers and letters, etc., which is used to indicate whether the first electronic device supports the business coexistence capability. In this application, the format or content of the first identification information is not limited. In the case where the value of the first identification information is a preset value, for example, the first identification information and the preset value are both "1" or "support", indicating that the first electronic device supports the business coexistence function, the subsequent process can be executed to establish the first business. In this way, the first electronic device only needs fewer computing resources to determine whether it supports the business coexistence capability.

[0094] In some possible embodiments, the first identification information can be obtained from a preset storage area of ​​the first electronic device. The preset storage area can be a protected area in the same storage location as the system data, pre-installed application data, and user data. For example, when a first electronic device that originally does not support the service coexistence function is changed to support the service coexistence function through a firmware upgrade, the first identification information can be obtained from the firmware version information stored in the protected area. It can be seen that in addition to the first electronic device being set to support the service coexistence function when leaving the factory, the first electronic device can also be enabled to support the service coexistence function through a later update, and the value of the first identification information stored in the device can be modified to a preset value.

[0095] In some possible embodiments, the first identification information can be obtained through the coexistence capability interface provided by the WiFi framework. The WiFi framework refers to a module in the system of the first electronic device that is responsible for managing WiFi connections and communications, and provides a series of APIs and interfaces so that the application can interact with the WiFi hardware of the first electronic device. It should be noted that, when the first electronic device supports the service coexistence function, the WiFi framework of the first electronic device includes a coexistence capability interface.

[0096] In some possible embodiments, when the value of the first identification information is not a preset value, or the first identification information corresponding to the first electronic device does not exist, it is determined that the first electronic device does not support the service coexistence function. The traditional service establishment process can be used, that is, only one of the P2P service or the SoftAP service is allowed to run, which is not repeated here. By setting the coexistence capability interface, it is allowed to obtain the first identification information by calling this interface.

[0097] S403: When the first electronic device supports a service coexistence function, establish a first service through a target available frequency band.

[0098] In the embodiment of the present application, the establishment and operation of the P2P service and the SoftAP service need to occupy certain frequency band resources. When it is determined that the first electronic device supports the coexistence of services, the first electronic device can establish the first service through the target available frequency band.

[0099] Exemplarily, in the case where the first service is a P2P service, the first electronic device establishes the first service through the target available frequency band, which can be understood as a data transmission channel between the first electronic device and other electronic devices, and the frequency band of the data transmission channel is the target available frequency band, so that the first electronic device can transmit data to other electronic devices through the data transmission channel.

[0100] Exemplarily, when the first service is a SofAP service, the first electronic device establishes the first service through the target available frequency band, which can be understood as the first electronic device turning on the SofAP service corresponding to the target available frequency band, so that other electronic devices can share the network based on the network resources of the first electronic device in the target available frequency band. For example, the SoftAP service is a hotspot service, and the first electronic device establishes the first service through the target available frequency band, which can be understood as the first electronic device turning on the hotspot, and the frequency band of the network resources corresponding to the hotspot is the target available frequency band.

[0101] It should be noted that in the relevant field, frequency band refers to a specific frequency range used for wireless communications, and these frequencies are used to transmit data, such as mobile phone calls, wireless network connections, etc. Different frequency bands have different characteristics, such as transmission distance, penetration (how many obstacles can be penetrated) and bandwidth (the rate at which data is transmitted). Each frequency band is divided into multiple channels, which are subdivisions of the frequency. For example, the 2.4GHz band usually has multiple channels, and the center frequency of each channel is 5MHz apart, and the channel width is 20MHz. In the 5GHz band, there are more channels and the width of each channel is also larger. Different countries and regions have different regulations on the use of wireless communication frequency bands. For example, some frequency bands may only be allowed to be used by specific users or services, which are not listed here one by one.

[0102] In some possible embodiments, the target available frequency band may be a pre-set frequency band. By reserving a frequency band, when the first electronic device needs to establish a first service, a target available frequency band is provided that can establish a service and will not conflict with an already running service.

[0103] In some possible embodiments, when the first electronic device supports a service coexistence function, establishing the first service through a target available frequency band may include: establishing the first service through a target available frequency band and a target available channel, where the target available channel is a channel included in the target available frequency band.

[0104] It should be noted that, when the first service is a P2P service or when the first service is a SoftAP service, the preset target available frequency bands may be the same or different, which is not limited here.

[0105] In the service coexistence method provided in the embodiment of the present application, the first electronic device receives a first trigger operation to trigger the establishment of a first service including a P2P service or a SoftAP service. The first electronic device needs to determine whether the first service can be actually established. It can determine whether the first electronic device supports a service coexistence function, and the service coexistence function includes the coexistence of P2P services and SoftAP services. If the first electronic device supports the service coexistence function, the first service can be created through a target available frequency band. After the establishment, the first service will not conflict with the existing service, that is, the P2P service and the SoftAP service can run on the first electronic device at the same time, so that the user can use functions such as mutual transmission and personal hotspot at the same time without selecting some of the different functions to close, thereby improving the user experience of using the first electronic device and providing flexibility and convenience in using the P2P service and the SoftAP service.

[0106] Taking the first service as a P2P service as an example, the following describes how to establish a P2P service through a target available frequency band in the service coexistence method provided by the present application when it is determined that the first electronic device supports the service coexistence function.

[0107] See also Figure 6 , Figure 6 A schematic diagram of a process flow in which the first service is a P2P service in a service coexistence method provided in an embodiment of the present application, wherein the method is applied to a first electronic device, such as Figure 6 As shown, the following steps may be included:

[0108] S601: Receive a first trigger operation, where the first trigger operation is used to trigger establishment of a first service, where the first service is a point-to-point P2P service.

[0109] In some embodiments, the first service is a P2P service, and the first trigger operation can be as follows: Figure 1a As shown, the user triggers the mutual transmission control to transmit data to a pre-set electronic device. The first trigger operation is also as shown in Figure 5 As shown, after a series of operations, the user initially triggers the target mutual transmission control to send the selected data to the designated device. For ease of understanding, the electronic device that triggers the establishment of a P2P service with the first electronic device is referred to as the second electronic device.

[0110] S602: Determine whether the first electronic device supports a service coexistence function, where the service coexistence function includes coexistence of P2P services and SoftAP services.

[0111] S603: Acquire an available frequency band of the first electronic device and an available frequency band of the second electronic device.

[0112] In some possible embodiments, the first service is a P2P service between a first electronic device and a second electronic device, and the available frequency band corresponding to the first electronic device may be an available frequency band preset in the first electronic device. The available frequency band of the first electronic device may also be obtained from a protected area in the same storage location as the system data, pre-installed application data, and user data in a manner similar to that of obtaining the first identification information in S402. Alternatively, the spectrum sensing technology may be used to detect whether each frequency band is occupied, thereby finding available wireless spectrum resources. The first electronic device may be a transmitter or receiver of a P2P service.

[0113] In addition, when the first electronic device supports service coexistence capability, the first electronic device may also obtain the available frequency band of the first electronic device through the coexistence capability interface provided by the WiFi framework in the first electronic device system, which is not limited here.

[0114] The way in which the second electronic device obtains its own available frequency band can be the same as the way in which the first electronic device obtains the available frequency band, which will not be repeated here. It is understandable that, if the second electronic device also supports the service coexistence function, the second electronic device can also obtain the available frequency band of the second electronic device through the coexistence capability interface provided by the WiFi framework in the second electronic device system.

[0115] In some possible embodiments, the first electronic device may obtain the available frequency band of the second electronic device through a BLE connection method that occupies less frequency band resources.

[0116] Before the first electronic device actually uses the P2P service to transmit data with the second electronic device, it is necessary to negotiate the role, frequency band, channel, etc., and then determine whether the P2P service and SoftAP in the first electronic device can actually coexist (even if the first electronic device supports the service coexistence function, in some cases, such as when all frequency band resources are occupied, the P2P service and SoftAP still cannot run at the same time). It can be seen that when the first service is a P2P service, the establishment of the P2P service can be divided into two stages: negotiation of coexistence capability and determination of whether coexistence is possible. The acquisition of the available frequency band of the second electronic device is achieved in the negotiation stage of coexistence capability.

[0117] S604: When the available frequency bands of the first electronic device and the available frequency bands of the second electronic device include the same frequency band, determine the same frequency band as the target available frequency band.

[0118] It can be understood that when the available frequency band of the first electronic device and the available frequency band of the second electronic device include the same frequency band, both devices can communicate on this frequency band, thereby achieving interconnection between devices, so that the same available frequency band can be determined as the target available frequency band.

[0119] In some possible embodiments, in order to ensure smooth and efficient communication, spectrum management and coordination can be performed on this target available frequency band. For example, dynamic spectrum allocation technology can be used to enable the first electronic device and the second electronic device to dynamically adjust their operating frequencies according to the current spectrum usage status when subsequently implementing P2P services through the target available frequency band, so as to avoid potential interference and improve the communication quality of the P2P service.

[0120] S605: When the first electronic device supports the service coexistence function, establish a first service through the target available frequency band.

[0121] In the case where the first electronic device supports the service coexistence function, the available frequency band of the first electronic device in S604 may be obtained through a coexistence capability interface set by a WiFi framework of the first electronic device.

[0122] When the first electronic device supports the service coexistence function and the available frequency bands of the first electronic device and the second electronic device are the same, the first electronic device can establish a P2P service with the second electronic device based on the target available frequency band determined by the same frequency band and use the P2P service to transmit data.

[0123] It should be noted that in a P2P service, of the two electronic devices that establish the P2P service, the electronic device that acts as the data transmitter needs to perform multiple operations such as data selection, protocol processing, link management, and data transmission, while the receiving end is more inclined to passively receive data. In this application, when the first service is a P2P service, the first electronic device can act as the data transmitter or the data receiver in the P2P service. When the first electronic device acts as the transmitter and the receiver, there are certain differences in the data flow of the data.

[0124] In some possible embodiments, establishing the first service through the target available frequency band includes:

[0125] Sending a P2P negotiation request to the second electronic device, where the P2P negotiation request includes a target available frequency band;

[0126] Response information of the second electronic device to the P2P negotiation request is received, and when the response information indicates that the negotiation is successful, the first service is established through the target available frequency band.

[0127] It should be noted that in a P2P service, a P2P negotiation request refers to two devices exchanging information to determine their roles (such as a sender or a receiver) and the resources used (such as a frequency band used) in the P2P service. The connection process is similar to a three-way handshake and will not be described in detail here. In the present application, when a first electronic device obtains the available frequency bands of the first electronic device and the second electronic device and determines a target available frequency band, the first electronic device is the sender in the P2P service. Therefore, the first electronic device sends a P2P protocol request containing a target available frequency band to the second electronic device as the receiver. When a response message indicating a successful negotiation is received from the second electronic device, the first service (P2P service) between the first electronic device and the second electronic device can be established through the target available frequency band.

[0128] In the service coexistence method provided by the present application, when the first service is a P2P service between a first electronic device and a second electronic device, the first electronic device to which the method provided by the present application is applied obtains an available frequency band of the first electronic device and an available frequency band of the second electronic device, and when the available frequency bands of the two electronic devices are the same and the first electronic device supports the service coexistence function, the first electronic device can establish a P2P service with the second electronic device, and the P2P service can coexist with the SoftAP run by the first electronic device to improve user experience.

[0129] The following describes an embodiment of the present application. In the case where the first service is a P2P service, if the first electronic device is a transmitter of the P2P service and the second electronic device is a receiver of the P2P service, how the first electronic device and the second electronic device should negotiate coexistence capabilities, that is, how the first electronic device obtains an available frequency band for the second electronic device.

[0130] See also Figure 7 , Figure 7 A schematic diagram of a process flow for negotiating coexistence capabilities in the service coexistence method provided in an embodiment of the present application, such as Figure 7 As shown, the following steps may be included:

[0131] S701, determining transmission data of a P2P service.

[0132] In some possible embodiments, the P2P service (located at the application layer of the software architecture) of the first electronic device first determines the transmission data to be sent through the P2P service.

[0133] S702, control the BLE module to start BLE scanning.

[0134] In some possible embodiments, the P2P service controller BLE module of the first electronic device starts BLE scanning to search for the second electronic device that also starts the P2P service.

[0135] S703, start the mutual transmission control.

[0136] In some possible embodiments, the second electronic device needs to turn on a mutual transmission control (also called a P2P service control) so that the second electronic device can be scanned by the BLE module of the first electronic device.

[0137] S704: Obtain an available frequency band of the second electronic device.

[0138] In some possible embodiments, the P2P service of the second electronic device obtains the available frequency band of the second electronic device through the coexistence capability interface of the WiFi framework of the second electronic device.

[0139] S705: Send the available frequency band of the second electronic device.

[0140] In some possible embodiments, the WiFi framework of the second electronic device sends the available frequency band of the second electronic device to its protocol module. It should be noted that the protocol modules of the first electronic device and the second electronic device are both mutual transmission protocol modules (also called P2P protocol modules).

[0141] S706: Send the available frequency band of the second electronic device.

[0142] In some possible embodiments, the protocol module of the second electronic device sends the available frequency band of the second electronic device to the BLE module of the second electronic device.

[0143] S707, sending a BEL protocol data packet, where the BEL protocol data packet includes an available frequency band of the second electronic device.

[0144] In some possible embodiments, the BLE module of the second electronic device sends a BEL protocol data packet to the BLE module of the first electronic device, where the BEL protocol data packet includes an available frequency band of the second electronic device.

[0145] It should be noted that the BLE module of the second electronic device can add a field to the original BLE data packet so that the modified BLE data packet includes the available frequency band of the second electronic device.

[0146] S708, sending a BLE protocol data packet.

[0147] In some possible embodiments, the BLE module of the first electronic device sends a BLE protocol data packet to the P2P service of the first electronic device.

[0148] S709: parse the BLE protocol data packet to obtain an available frequency band of the second electronic device.

[0149] The BLE service of the first electronic device obtains the available frequency band of the second electronic device in the BLE protocol data packet by parsing the BLE protocol data packet.

[0150] It should be noted that when data is transmitted between the BLE module of the first electronic device and the P2P service in S702 and S708, data can be transmitted one by one in the form of P2P service, WiFi framework, protocol module and BLE module, or data transmission between the P2P service and the BLE service can be directly realized through the interface set by the electronic device, which is not limited here.

[0151] By implementing the above technical solution, the first electronic device and the second electronic device complete the negotiation of coexistence capability, and the first electronic device obtains the available frequency band of the second electronic device so that the first electronic device can make a subsequent judgment on whether coexistence is possible.

[0152] See also Figure 8 , Figure 8 Another flow chart of the service coexistence method provided in the embodiment of the present application in which the first service is a P2P service, such as Figure 8 As shown, the following steps may be included:

[0153] S801, receiving a first trigger operation, where the first trigger operation is used to trigger establishment of a first service, where the first service includes a point-to-point P2P service.

[0154] S802: Determine whether the first electronic device supports a service coexistence function, where the service coexistence function includes coexistence of P2P services and SoftAP services.

[0155] S803: Obtain an available frequency band of the first electronic device and an available frequency band of the second electronic device.

[0156] Among them, the implementation of S801 to S803 is similar to that of S601 to S603, and will not be repeated here.

[0157] S804: Acquire second identification information corresponding to the second electronic device, where the second identification information is used to indicate whether the second electronic device supports a service coexistence function.

[0158] In some possible embodiments, when the available frequency band of the first electronic device and the available frequency band of the second electronic device include the same frequency band, before determining the same frequency band as the target available frequency band, the method further includes:

[0159] Second identification information corresponding to the second electronic device is acquired, where the second identification information is used to indicate whether the second electronic device supports a service coexistence function.

[0160] It should be noted that, in addition to determining whether the first electronic device supports the service coexistence function, the service coexistence method provided in the present application also detects whether the second service supports the service coexistence function. By detecting whether the first electronic device and the second electronic device support the service coexistence function, when determining the target available frequency band, the frequency band coordination capability can be improved, and the target available frequency band that conforms to the actual situation can be determined, so as to maximize the guarantee that there is no conflict between the P2P service and the SoftAP service on the first electronic device and the second electronic device.

[0161] With reference to S402 , the manner in which the second electronic device detects whether the device itself supports the service coexistence function is similar to the manner in which the first electronic device detects whether the device itself supports the service coexistence function in S402 , which will not be described in detail herein.

[0162] Exemplarily, the second identification information may be obtained through a protocol module in a system of the second electronic device, or a coexistence capability interface provided by a WiFi framework, which is not limited here.

[0163] In some possible implementations, when the second identification information is obtained through a protocol module in the system of the second electronic device, step S706, in which the protocol module of the second electronic device sends the available frequency band of the second electronic device to the BLE module, further includes: sending the second identification information to the BLE module. In this way, in S707, the BLE data packet sent by the second electronic device also includes the second identification information, and in S709, the P2P service of the first electronic device can obtain the available frequency band and the second identification information of the second electronic device when parsing the BLE protocol data packet.

[0164] S805: When the second identification information indicates that the second electronic device supports the service coexistence function and the available frequency bands of the first electronic device and the available frequency bands of the second electronic device include the same frequency band, determine the same frequency band as the target available frequency band.

[0165] In some possible embodiments, when the available frequency band of the first electronic device and the available frequency band of the second electronic device include the same frequency band, determining the same frequency band as the target available frequency band includes:

[0166] When the second identification information indicates that the second electronic device supports the service coexistence function and the available frequency bands of the first electronic device and the available frequency bands of the second electronic device include the same frequency band, the same frequency band is determined as the target available frequency band.

[0167] It should be noted that there may be more than one available frequency band for the first electronic device and more than one available frequency band for the second electronic device. If the available frequency bands of the two devices overlap, the same frequency band is determined as the target available frequency band.

[0168] S806: When the first electronic device supports the service coexistence function, establish a first service through the target available frequency band.

[0169] If both the first electronic device and the second electronic device support the service coexistence function, and the available frequency band of the first electronic device is the same as the available frequency band of the second electronic device, at this time, the first electronic device can send a P2P negotiation request including a target available frequency band to the second electronic device, and when the response information received from the second electronic device to the P2P negotiation request indicates that the negotiation is successful, the first service is established through the target available frequency band, and there will be no conflict with the SoftAP service that may be running on the first electronic device, thereby improving the user experience.

[0170] By implementing the above technical solution, when the available frequency band of the first electronic device is the same as that of the second electronic device that also applies the service coexistence method provided by the present application, the first electronic device can establish a P2P service with the second electronic device, providing users with a more convenient and efficient mutual transmission function, thereby improving the user experience.

[0171] It can be understood that, when the first electronic device supports the service coexistence function, by combining whether the second electronic device supports the service coexistence function and whether the available frequency band of the first electronic device is the same as the available frequency band of the second electronic device, it can be obtained that there may be multiple situations when the first electronic device establishes a P2P service. Various situations will be explained below with reference to the accompanying drawings.

[0172] See also Fig. 9 , Fig. 9 A schematic diagram of a process in which the second electronic device supports the service coexistence function and has the same available frequency band as the first electronic device in the service coexistence method provided in an embodiment of the present application, such as Fig. 9 As shown, in some possible embodiments, when the first electronic device supports the service coexistence function, establishing the first service through the target available frequency band may include the following steps:

[0173] S901, obtaining available frequency band and second identification information.

[0174] It should be noted that the available frequency band includes the available frequency band of the first electronic device and the available frequency band of the second electronic device. The first electronic device may further include a protocol module and a BLE module, and the second electronic device may further include a BLE module, a protocol module and a WiFi framework. The P2P service of the first electronic device and the P2P service of the second electronic device may communicate through modules such as the protocol module and the BLE module of the first electronic device and the second electronic device, which are not limited here.

[0175] S902, returning available frequency band and second identification information.

[0176] Referring to S708, in some possible embodiments, the BLE protocol data packet containing the available frequency band of the second electronic device is transmitted to the BLE module of the first electronic device through the BLE module of the second electronic device, and is transmitted to the P2P service of the first electronic device through the protocol module and the WiFi framework of the first electronic device. In addition, in some possible embodiments, the BLE protocol data packet may also include the second identification information of the second electronic device. Therefore, the P2P service of the first electronic device can obtain the available frequency band and the second identification information through the WiFi framework.

[0177] S903: When the second electronic device supports the service coexistence function and the available frequency bands include the same frequency band, P2P negotiation and connection establishment are performed.

[0178] When the second electronic device supports the service coexistence function and the available frequency band of the first electronic device includes the same frequency band as the available frequency band of the second electronic device, the same frequency band can be determined as the target available frequency band, and the first electronic device can negotiate and establish a connection with the second electronic device based on the target available frequency band.

[0179] S904: Establish a P2P service to send data.

[0180] By implementing the above technical solution, the first electronic device can establish a P2P service through the target available frequency band and perform corresponding data transmission when the second electronic device supports the service coexistence function and the available frequency band is the same as that of the first electronic device.

[0181] See also Fig.10 , Fig.10 A schematic diagram of a process in which a second electronic device supports a service coexistence function and has an available frequency band different from that of a first electronic device in a service coexistence method provided in an embodiment of the present application, such as Fig.10 As shown, in some possible embodiments, when the first electronic device supports a service coexistence function, establishing the first service through the target available frequency band may further include the following steps:

[0182] S1001, obtaining available frequency band and second identification information.

[0183] S1002, returning available frequency band and second identification information.

[0184] The implementation methods of S1001 to S1002 are similar to those of S901 to S902, and are not elaborated here.

[0185] S1003: Output conflict prompt information when the second electronic device supports the service coexistence function and the available frequency bands do not include the same frequency band.

[0186] In some possible embodiments, when the available frequency bands of the first electronic device and the second electronic device do not include the same frequency band, conflict prompt information is output, and the conflict prompt information is used to instruct to close the SoftAP service or stop the P2P service.

[0187] It should be noted that although the first electronic device supports the service coexistence function, when the first electronic device triggers the establishment of a P2P service, if the available frequency bands of the first electronic device and the second electronic device do not overlap at all, the first electronic device cannot establish the P2P service. The user may be prompted to choose to close the SoftAP service or stop the currently triggered P2P service by outputting a conflict prompt message.

[0188] S1004, close the SoftAP service and establish a P2P service to send data.

[0189] In some possible embodiments, if the user decides to turn off the SoftAP service, there will be no service conflict when establishing the P2P service. In this case, the first electronic device can establish the P2P service in a traditional way. In some possible embodiments, if the user decides to turn off the SoftAP service, there will be no service conflict when establishing the P2P service. In this case, the first electronic device can establish the P2P service in a traditional way.

[0190] By implementing the above technical solution, in some cases, if the first electronic device cannot simultaneously establish and operate P2P services and SoftAP services based on the service coexistence capability support of existing equipment and the available frequency band, it can output conflict prompt information to enable users to understand the current situation and better meet the specific needs of different users.

[0191] Fig.11 A schematic diagram of a process in which the first electronic device has no available frequency band in the service coexistence method provided in an embodiment of the present application, such as Fig.11 As shown, in some possible embodiments, when the first electronic device supports a service coexistence function, establishing the first service through the target available frequency band may further include the following steps:

[0192] S1101, obtain available frequency band and second identification information.

[0193] S1102, returning available frequency band and second identification information.

[0194] The implementation methods of S1101 to S1102 are similar to those of S901 to S902, and are not elaborated here.

[0195] S1103: When the first electronic device does not include an available frequency band, output conflict prompt information.

[0196] In some possible embodiments, when the first electronic device does not include an available frequency band, conflict prompt information is output, where the conflict prompt information is used to instruct to close the SoftAP service or stop the P2P service.

[0197] It should be noted that, in certain specific cases, the first electronic device may not have an available frequency band for establishing a P2P service. For example, the SoftAP service of the first electronic device is in a debugging state, occupying more spectrum resources, or there are not enough available frequency bands due to hardware limitations of the device, which is not limited here.

[0198] S1104, close the SoftAP service and establish a P2P service to send data.

[0199] By implementing the above technical solution, in some cases, if the first electronic device does not include an available frequency band, it can output conflict prompt information to enable the user to understand the current situation and determine whether it is necessary to establish a P2P service by closing the SoftAP service to meet the specific needs of different users.

[0200] See also Fig.12 , Fig.12 A flow chart of a second electronic device not supporting a service coexistence function in a service coexistence method provided in an embodiment of the present application, such as Fig.12 As shown, in some possible embodiments, when the first electronic device supports a service coexistence function, establishing the first service through the target available frequency band may further include the following steps:

[0201] S1201, obtain available frequency band and second identification information.

[0202] S1202: Return available frequency band and second identification information.

[0203] S1203: When the second electronic device does not support the service coexistence function, perform P2P negotiation and establish connection according to the available frequency band of the second electronic device.

[0204] In some possible embodiments, the method provided by the present application further includes:

[0205] Acquire second identification information corresponding to the second electronic device, where the second identification information is used to indicate whether the second electronic device supports the service coexistence function;

[0206] When the second identification information indicates that the second electronic device does not support the service coexistence function, P2P negotiation is performed with the second electronic device according to an available frequency band of the second electronic device.

[0207] It should be noted that the first electronic device is the sending end in the P2P service. If the second identification information of the second electronic device indicates that the second electronic device does not support the service coexistence function, in order to ensure that the second electronic device as the receiving end can effectively obtain data, the first electronic device will attempt to perform P2P negotiation and establish a connection using the available frequency band of the second electronic device.

[0208] If the available frequency band of the first electronic device includes at least part of the same frequency band as the available frequency band of the second electronic device, the first electronic device can still establish a P2P service with the second electronic device. If the available frequency band of the first electronic device does not include the same frequency band as the available frequency band of the second electronic device, a conflict prompt information is output, and the conflict prompt information is used to instruct to close the SoftAP service or stop the P2P service.

[0209] S1204: Establish a P2P service to send data.

[0210] In some possible embodiments, the first electronic device can perform P2P negotiation and connection establishment according to the available frequency band of the second electronic device, and if successful, establish a P2P service and send data to the second electronic device. Alternatively, after outputting the conflict prompt information, if the user turns off the SoftAP service, the first electronic device can use the frequency band resources released by the SoftAP service as the available frequency band of the first electronic device to establish a P2P service with the second electronic device, which is not limited here.

[0211] By implementing the above technical solution, if the second electronic device does not support the service coexistence function, the first electronic device can also use the available frequency band of the second electronic device to conduct P2P negotiation with it. In this way, it can be ensured that the first electronic device can establish P2P services with those electronic devices that have not yet adopted the service coexistence method provided by the present application, thereby improving the versatility of the method.

[0212] The following takes the first service as a SoftAP service as an example to introduce how to establish a SoftAP service through a target available frequency band in the service coexistence method provided by the present application when it is determined that the first electronic device supports the service coexistence function.

[0213] See also Fig.13 , Fig.13 A schematic diagram of a process in which the first service is a SoftAP service in a service coexistence method provided in an embodiment of the present application, wherein the method is applied to a first electronic device, such as Fig.13 As shown, the following steps may be included:

[0214] S1301: Receive a first trigger operation. The first trigger operation is used to trigger establishment of a first service, where the first service is a soft access point SoftAP service.

[0215] S1302: Determine whether the first electronic device supports a service coexistence function, where the service coexistence function includes coexistence of P2P services and SoftAP services.

[0216] S1303: When the first electronic device supports the service coexistence function, obtain the service status of the second service, where the second service includes a P2P service, and the service status includes an on state and a off state.

[0217] In some possible embodiments, establishing a first service through a target available frequency band includes: obtaining a service status of a second service, the second service including a P2P service, and the service status including an on state and an off state; when the service status of the second service indicates that the second service is not on, establishing the first service through the target available frequency band; or, when the service status of the second service indicates that the second service is on and the first electronic device includes an available frequency band, establishing the first service through the target available frequency band, and the available frequency band includes the target available frequency band.

[0218] It is understandable that, unlike P2P services (taking the mutual transmission function as an example), P2P services are usually established when two electronic devices exchange data with each other. The establishment of SoftAP services (taking personal hotspots as an example) does not rely on instant data transmission with other electronic devices. It can be initialized independently on a single electronic device and create a wireless LAN environment so that other electronic devices can access and access network resources. Therefore, in the case where the first service is a SoftAP service, there is no need to obtain the available frequency bands of other electronic devices, but to obtain the start-up status of the second service. The second service is included in the relevant technology, and is a P2P service that conflicts with the SoftAP service.

[0219] In some possible embodiments, the second service also includes STA service. In some scenarios where the stability requirements for STA service are relatively strict, the second service also includes STA service, that is, when establishing the SoftAP service, the impact of the establishment of the first service on the STA service must also be considered. For example, when determining the available frequency band of the first electronic device, if the STA service is in the on state, when allocating the available frequency band, a frequency band different from the STA service is preferentially selected.

[0220] S1304, when the service status of the second service indicates that the second service is not turned on, establish the first service through the target available frequency band; or, when the service status of the second service indicates that the second service is turned on and the first electronic device includes an available frequency band, establish the first service through the target available frequency band, and the available frequency band includes the target available frequency band.

[0221] In some possible embodiments, if the service status of the second service indicates that the second service is not enabled, it means that no P2P service that will conflict with the SoftAP service is running in the first electronic device. In this case, the first service, i.e., the SoftAP service, can be established through the target available frequency band to share the network with surrounding electronic devices.

[0222] In some possible implementations, if the P2P service that conflicts with the SoftAP service is enabled, but there are still available frequency bands, it means that some spectrum resources are still available for the first service, and the first electronic device can establish the first service through the target available frequency band. At this time, the target available frequency band is one of the available frequency bands, which can be selected by preset priority or communication quality, and is not limited here.

[0223] In the service coexistence method provided by the present application, when the first service is a SoftAP service, the first electronic device to which the method provided by the present application is applied obtains the service status of the second service, and determines whether the SoftAP service can be established according to the service status of the second service and the available frequency band conditions, so as to realize that the SoftAP service can run on the first electronic device at the same time as the P2P service in some scenarios, so as to improve the user experience.

[0224] After introducing the service establishment process of the first electronic device when the first service is a P2P service or a SoftAP service, in order to more comprehensively introduce how to improve the stability when the P2P service and the SoftAP service coexist on the first electronic device and improve the usage scenarios of service coexistence, the following introduces a method for determining the available frequency band of the electronic device in a service coexistence method.

[0225] In some possible embodiments, the available frequency band of the first electronic device or the available frequency band of the second electronic device is determined based on the relationship between the first service and a preset frequency band combination, the preset frequency band combination relationship includes the frequency band combination supported by the preset service combination, and the preset service combination includes at least two of the P2P service, SoftAP service and site STA service.

[0226] It should be noted that the preset frequency band combination relationship is realized by modifying and compiling the existing WiFi framework. Before receiving the first trigger operation, the service coexistence method provided by the present application also includes: compiling the preset frequency band combination relationship into the WiFi framework of the first electronic device, and modifying the port combination settings corresponding to the P2P service, SoftAP service and STA service, so that the P2P service, SoftAP service and STA service can be in the open state at the same time.

[0227] In some possible embodiments, the preset service combination covers three types of P2P service, SoftAP service and STA service, and different service combinations in the preset frequency band combination relationship are determined based on the hardware performance of different electronic devices and corresponding actual test results.

[0228] Exemplarily, in some possible embodiments, the preset frequency band combination relationship may be as shown in Table 1.

[0229] Table 1

[0230]

[0231] Through the preset frequency band combination relationship shown in Table 1, when the first electronic device receives the first trigger operation, it can determine the available frequency band for the first electronic device to establish the first service according to the type of the first service (P2P service or SoftAP service), combined with the working frequency band of the service combination that has been enabled in the first electronic device and the preset frequency band combination relationship. At the same time, if the electronic device operates with a frequency band combination other than the frequency band combination supported by the preset frequency band combination relationship, it may cause connection failure, transmission rate reduction and other events that affect the user experience.

[0232] Exemplarily, when the first service is a P2P service, the working frequency band of the enabled SoftAP service in the first electronic device is 5G, and the working frequency band of the enabled STA service is 2.4G, the available frequency band for the first electronic device to establish the P2P service is 2.4G or 5G.

[0233] In some possible embodiments, the preset service combination relationship may also include combinations of P2P service and SoftAP service, or P2P service and STA service, or SoftAP service and STA service, and frequency band combinations supported by different combinations. The first electronic device determines the available frequency band of the first electronic device through the first service and the preset frequency band combination relationship.

[0234] By implementing the above technical solution, the first electronic device can determine the available frequency band of the first electronic device according to the type of the first service, the preset frequency band combination relationship and the working frequency band of the service that has been turned on in the first electronic device, thereby providing a reference for the first electronic device to realize the coexistence of P2P service and SoftAP service, thereby improving the stability of the operation of each service when the services coexist.

[0235] See also Fig.14 , Fig.14 A flow chart of establishing a STA service in the service coexistence method provided in an embodiment of the present application, such as Fig.14 As shown, the following steps may be included:

[0236] S1401: When both the P2P service and the SoftAP service are in an enabled state, a second trigger operation is detected, where the second trigger operation is used to trigger establishment of a station STA service.

[0237] S1402: Determine whether the frequency band used by the P2P service and the SoftAP service is the same frequency band.

[0238] It should be noted that the STA service cannot determine the frequency band used by the network device before successfully connecting to a router or other network device. When the frequency band used by the P2P service and the SoftAP service is the same, for example, when both the P2P service and the SoftAP service are used in the 2.4G frequency band or the 5G frequency band, if the first electronic device wants to establish a STA service with a certain network device, there is a situation where the frequency band used by the established STA service is the same as the frequency band used by the current P2P service and the SoftAP service, which may cause the STA service to fail to connect to the network device, or the service quality of the STA service is poor, affecting the user's normal use of the first electronic device. Therefore, when the second trigger operation that triggers the establishment of the STA service is detected, it is possible to actively detect whether the frequency band used by the P2P service and the SoftAP service is the same frequency band, and make corresponding adjustments to ensure the smooth establishment of the STA service and the first electronic device, and improve the stability of the connection between the first electronic device and the network device.

[0239] S1403, establish STA service.

[0240] When the frequency bands used by the P2P service and the SoftAP service are not the same (taking the frequency bands including 2.4G and 5G as an example), no matter which frequency band the STA service is finally connected to, it will not be affected. Therefore, there is no need to adjust the working channel of the P2P service or the SoftAP service.

[0241] S1404: Switch the frequency band used by the SoftAP service and establish the STA service.

[0242] When the P2P service and the SoftAP service use the same frequency band, the Channel Switch Announcement (CSA) technology can be used to adjust the working frequency band of the SoftAP service. Through the CSA technology, the SoftAP service can be switched to a different frequency band to avoid using the same frequency band as the P2P service. In this way, when the STA service needs to be established, since the SoftAP service has been migrated to the new frequency band, there will be no situation where the P2P service and the SoftAP service occupy the same frequency band, causing the STA service connection to be affected, thereby ensuring the smooth establishment of the STA service and the stability of the network connection. This method effectively solves the connection problems caused by frequency band occupation and improves the performance and user experience of the wireless network. In addition, when the working frequency band of the SoftAP service is adjusted through the channel switching announcement technology, other client devices (Clients) connected to the SoftAP service will also switch the frequency band with the SoftAP service and will not trigger disconnection.

[0243] It should be understood that, although the steps in the above-mentioned flowcharts are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the above-mentioned flowcharts may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0244] Based on the foregoing embodiments, an embodiment of the present application provides a service coexistence device, which includes the modules included and the units included in the modules, and can be implemented by a processor; of course, it can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) or a field programmable gate array (FPGA), etc.

[0245] Fig.15 A schematic diagram of the structure of a service coexistence device provided in an embodiment of the present application, such as Fig.15 As shown, the service coexistence device includes a detection module 1501, a coexistence judgment module 1502 and a service establishment module 1503, wherein:

[0246] The detection module 1501 is used to receive a first trigger operation, where the first trigger operation is used to trigger the establishment of a first service, where the first service includes a point-to-point P2P service or a soft access point SoftAP service.

[0247] The coexistence determination module 1502 is used to determine whether the service coexistence device supports the service coexistence function, where the service coexistence function includes the coexistence of P2P services and SoftAP services.

[0248] The service establishing module 1503 is configured to establish a first service through a target available frequency band when the service coexistence device supports the service coexistence function.

[0249] In some possible embodiments, the coexistence judgment module 1502 is further used to obtain first identification information corresponding to the service coexistence device, and the first identification information is used to indicate whether the service coexistence device supports the service coexistence function; when the value of the first identification information is a preset value, it is judged that the service coexistence device supports the service coexistence function.

[0250] In some possible embodiments, the first service is a P2P service between a first electronic device and a second electronic device, and the service establishment module 1503 is further used to obtain an available frequency band of the service coexistence device and an available frequency band of the second electronic device; when the available frequency band of the service coexistence device and the available frequency band of the second electronic device include the same frequency band, the same frequency band is determined as the target available frequency band.

[0251] In some possible embodiments, the service establishment module 1503 is further used to send a P2P negotiation request to the second electronic device, where the P2P negotiation request includes a target available frequency band; receive response information from the second electronic device to the P2P negotiation request, and establish the first service through the target available frequency band when the response information indicates that the negotiation is successful.

[0252] In some possible embodiments, the service establishment module 1503 is also used to output conflict prompt information when the service coexistence device does not include an available frequency band, or the available frequency band of the service coexistence device does not include the same frequency band as the available frequency band of the second electronic device, and the conflict prompt information is used to indicate the closing of the SoftAP service or the stopping of the P2P service.

[0253] In some possible embodiments, the service establishment module 1503 is further used to obtain second identification information corresponding to the second electronic device, the second identification information being used to indicate whether the second electronic device supports the service coexistence function; when the second identification information indicates that the second electronic device supports the service coexistence function and the available frequency band of the service coexistence device includes the same frequency band as the available frequency band of the second electronic device, the same frequency band is determined as the target available frequency band.

[0254] In some possible embodiments, the service establishment module 1503 is further used to obtain second identification information corresponding to the second electronic device, where the second identification information is used to indicate whether the second electronic device supports the service coexistence function; when the second identification information indicates that the second electronic device does not support the service coexistence function, P2P negotiation is performed with the second electronic device according to an available frequency band of the second electronic device.

[0255] In some possible embodiments, the first service is a SoftAP service, and the service establishment module 1503 is further used to obtain the service status of the second service when the service coexistence device supports the service coexistence function, the second service includes a P2P service, and the service status includes an on state and a off state; when the service status of the second service indicates that the second service is not turned on, establish the first service through the target available frequency band; or, when the service status of the second service indicates that the second service is in an on state and the service coexistence device includes an available frequency band, establish the first service through the target available frequency band, and the available frequency band includes the target available frequency band.

[0256] In some possible embodiments, the service establishment module 1503 is also used to detect a second trigger operation when both the P2P service and the SoftAP service are in an on state, and the second trigger operation is used to trigger the establishment of the site STA service; determine whether the frequency band used by the P2P service and the SoftAP service is the same frequency band; when the frequency band used by the P2P service and the SoftAP service is the same frequency band, switch the frequency band used by the SoftAP service and establish the STA service.

[0257] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.

[0258] It should be noted that in the embodiments of this application Fig.15 The division of modules in the service coexistence device shown is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional unit in each embodiment of the present application may be integrated into a processing unit, or may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional unit. It may also be implemented in the form of a combination of software and hardware.

[0259] It should be noted that in the embodiment of the present application, if the above method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application can be essentially or partly embodied in the form of a software product that contributes to the relevant technology. The computer software product is stored in a storage medium, including several instructions to enable an electronic device to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific combination of hardware and software.

[0260] The embodiment of the present application provides a computer electronic device, which may be a server, and its internal structure diagram may be as follows: Fig.16 As shown. The computer electronic device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer electronic device is used to provide computing and control capabilities. The memory of the computer electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer electronic device is used to store data. The network interface of the computer electronic device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the above method is implemented.

[0261] An embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the method provided in the above embodiment are implemented.

[0262] An embodiment of the present application provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the steps of the method provided in the above method embodiment.

[0263] Those skilled in the art will understand that Fig.16 The structure shown in the figure is only a block diagram of a partial structure related to the present application scheme, and does not constitute a limitation on the computer electronic device to which the present application scheme is applied. The specific computer electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0264] In one embodiment, the service coexistence device provided in the present application can be implemented in the form of a computer program. The computer program can be Fig.16The computer electronic device shown in the figure is run. The memory of the computer electronic device can store various program modules constituting the above-mentioned device. The computer program composed of various program modules enables the processor to execute the steps in the method of each embodiment of the present application described in this specification.

[0265] It should be noted here that the description of the above storage medium and electronic device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium, storage medium, and electronic device embodiments of the present application, please refer to the description of the method embodiments of the present application for understanding.

[0266] It should be understood that "one embodiment" or "an embodiment" or "some embodiments" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in one embodiment" or "in some embodiments" appearing throughout the specification may not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. The above-mentioned sequence numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments. The above description of each embodiment tends to emphasize the differences between the various embodiments, and the same or similar aspects can be referenced to each other. For the sake of brevity, this article will not repeat them.

[0267] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, object A and / or object B can represent three situations: object A exists alone, object A and object B exist at the same time, and object B exists alone.

[0268] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or electronic device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or electronic device including the element.

[0269] In the several embodiments provided in the present application, it should be understood that the disclosed electronic device and method can be implemented in other ways. The embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as: multiple modules or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the electronic device or module can be electrical, mechanical or other forms.

[0270] The modules described above as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules; they may be located in one place or distributed on multiple network units; some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.

[0271] In addition, all functional modules in the embodiments of the present application may be integrated into one processing unit, or each module may be a separate unit, or two or more modules may be integrated into one unit; the above-mentioned integrated modules may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0272] A person of ordinary skill in the art can understand that: all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage electronic devices, read-only memory (ROM), magnetic disks or optical disks, etc., various media that can store program codes.

[0273] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can essentially or in other words, the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for an electronic device to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage electronic devices, ROM, magnetic disks or optical disks.

[0274] The methods disclosed in several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

[0275] The features disclosed in several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

[0276] The features disclosed in several method or electronic device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or electronic device embodiments.

[0277] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A service coexistence method, characterized in that: Applied to a first electronic device, the method includes: Receiving a first trigger operation, where the first trigger operation is used to trigger establishment of a first service, where the first service includes a point-to-point P2P service or a soft access point SoftAP service; Determine whether the first electronic device supports a service coexistence function, where the service coexistence function includes coexistence of the P2P service and the SoftAP service; In a case where the first electronic device supports the service coexistence function, the first service is established through a target available frequency band.

2. The method according to claim 1, characterized in that The determining whether the first electronic device supports the service coexistence function includes: Acquire first identification information corresponding to the first electronic device, where the first identification information is used to indicate whether the first electronic device supports the service coexistence function; When the value of the first identification information is a preset value, it is determined that the first electronic device supports the service coexistence function.

3. The method according to claim 1 or 2, characterized in that: The first service is the P2P service between the first electronic device and the second electronic device. Before establishing the first service through the target available frequency band, the method further includes: Acquire an available frequency band of the first electronic device and an available frequency band of the second electronic device; In a case where the available frequency band of the first electronic device and the available frequency band of the second electronic device include the same frequency band, the same frequency band is determined as the target available frequency band.

4. The method according to claim 3, characterized in that The establishing the first service through the target available frequency band includes: Sending a P2P negotiation request to the second electronic device, wherein the P2P negotiation request includes the target available frequency band; Receive response information of the second electronic device to the P2P negotiation request, and if the response information indicates that the negotiation is successful, establish the first service through the target available frequency band.

5. The method according to claim 3, characterized in that: The method further comprises: When the first electronic device does not include an available frequency band, or the available frequency band of the first electronic device and the available frequency band of the second electronic device do not include the same frequency band, conflict prompt information is output, and the conflict prompt information is used to instruct to close the SoftAP service or stop the P2P service.

6. The method according to claim 3, characterized in that In a case where the available frequency band of the first electronic device and the available frequency band of the second electronic device include the same frequency band, before determining that the same frequency band is the target available frequency band, the method further includes: Acquire second identification information corresponding to the second electronic device, where the second identification information is used to indicate whether the second electronic device supports the service coexistence function; In the case that the available frequency band of the first electronic device and the available frequency band of the second electronic device include the same frequency band, determining the same frequency band as the target available frequency band includes: When the second identification information indicates that the second electronic device supports the service coexistence function and the available frequency bands of the first electronic device and the second electronic device include the same frequency band, the same frequency band is determined as the target available frequency band.

7. The method according to claim 3, characterized in that The method further comprises: Acquire second identification information corresponding to the second electronic device, where the second identification information is used to indicate whether the second electronic device supports the service coexistence function; When the second identification information indicates that the second electronic device does not support the service coexistence function, P2P negotiation is performed with the second electronic device according to an available frequency band of the second electronic device.

8. The method according to claim 1 or 2, characterized in that: The first service is the SoftAP service, and the establishing the first service through the target available frequency band when the first electronic device supports the service coexistence function includes: In a case where the first electronic device supports the service coexistence function, acquiring a service status of a second service, where the second service includes the P2P service, and the service status includes an on state and a off state; When the service status of the second service indicates that the second service is not turned on, the first service is established through the target available frequency band; or, when the service status of the second service indicates that the second service is in the turned-on state and the first electronic device includes an available frequency band, the first service is established through the target available frequency band, and the available frequency band includes the target available frequency band.

9. The method according to claim 3 or 8, characterized in that: The available frequency band of the first electronic device or the available frequency band of the second electronic device is determined based on the relationship between the first service and a preset frequency band combination, the preset frequency band combination relationship includes the frequency band combination supported by the preset service combination, and the preset service combination includes at least two of the P2P service, the SoftAP service and the site STA service.

10. The method according to claim 1, characterized in that The method further comprises: When both the P2P service and the SoftAP service are in the on state, detecting a second trigger operation, where the second trigger operation is used to trigger establishment of a station STA service; Determine whether the frequency band used by the P2P service and the SoftAP service is the same frequency band; In a case where the frequency band used by the P2P service and the SoftAP service is the same frequency band, the frequency band used by the SoftAP service is switched, and the STA service is established.

11. A service coexistence device, characterized in that: include: A detection module, configured to receive a first trigger operation, where the first trigger operation is used to trigger the establishment of a first service, where the first service includes a point-to-point P2P service or a soft access point SoftAP service; A coexistence determination module, configured to determine whether the service coexistence device supports a service coexistence function, wherein the service coexistence function includes coexistence of the P2P service and the SoftAP service; The service establishment module is used to establish the first service through a target available frequency band when the service coexistence device supports the service coexistence function.

12. A computer electronic device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, characterized in that: When the processor executes the program, the steps of the method according to any one of claims 1 to 10 are implemented.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.

Citation Information

Cited By

  • Service coexistence method and apparatus, electronic device, and storage medium

    WO2026124110A1