Multi-device connection method and electronic device
By interrupting and re-organizing the network, the problem that the PC cannot successfully connect to the already formed P2P connection is solved, and the success rate and user experience of multi-device connection are improved.
Patent Information
- Application Number
- CN202410041948.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-10
- Publication Date
- 2025-01-03
AI Technical Summary
In a multi-device connection scenario, when the PC is the GO role of the in-group manager, it cannot successfully connect with the devices in the already-grouped P2P connection, resulting in the connection failure and affecting the user experience.
By interrupting the existing keyboard and mouse sharing service, re-organizing the network, and restoring the connection after re-organizing the network, using the configuration table to determine the connection policy to allow interruption and redirecting the connection services, the networking success rate of the PC as a GO role is improved.
It effectively improves the networking success rate of PC as a GO role, reduces the impact of connection interruptions in the user experience, and ensures the stability and reliability of multi-device connections.
Smart Images

Figure CN119255404A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cross-device connection, and in particular, to a method and electronic device for connecting multiple devices. Background Art
[0002] As the functions of smart terminals become increasingly powerful and their types increase, people's demand for multi-device collaboration also increases. At present, the wireless fidelity (Wi-Fi) direct connection protocol can be used to achieve collaborative connection between multiple devices (such as tablets, mobile phones, personal computers (PCs), smart screens, etc.), or cross-device service sharing to meet users' multi-device collaboration needs. The Wi-Fi direct connection protocol can be considered as a peer-to-peer (P2P) direct connection technology. Peer to peer (P2P) is a distributed network application architecture. In the network obtained by networking based on P2P direct connection technology, one of the devices can play the role of an access point (AP), which can be called a group owner (GO), and there is only one GO in a group; at least one device in the network connected to the GO device can be considered a station (Station), which can be called a group client (GC), and there can be multiple GCs in a group.
[0003] For example, a mobile phone can be networked based on the WIFI direct protocol to achieve connection, data exchange or service sharing with multiple devices (such as tablets, smart phones, etc.) in the trust ring. The mobile phone can act as a GO role when networking, and multiple devices connected to the mobile phone can act as GC roles respectively.
[0004] However, after the mobile phone is connected to multiple devices as a GO role, if the PC also initiates a connection as a GO role, such as connecting to the mobile phone or any of the multiple devices, the connection will fail, affecting the user's experience of multi-device connection. Therefore, it is urgent to propose a technical solution to solve this problem. Summary of the invention
[0005] In view of this, the present application provides a method for connecting multiple devices, an electronic device, a computer-readable storage medium, and a computer program product, which can improve the success rate of PC networking and enhance the user experience.
[0006] In a first aspect, a method for connecting multiple devices is provided, which is applied to a first device, and the method includes: when a second device and a third device are performing a keyboard and mouse sharing service, initiating a network sharing service to the second device or the third device; wherein a first P2P connection has been established between the second device and the third device, the second device is a GO role in the first P2P connection, and the third device is a GC role in the first P2P connection; when the keyboard and mouse sharing service is allowed to be interrupted and the keyboard and mouse sharing service is allowed to be connected in a transit manner, networking is performed according to a first connection strategy, and the first connection strategy refers to: interrupting the connection between the second device and the third device, re-networking with the first device as the role of the group manager GO, and restoring the connection between the second device and the third device after re-networking.
[0007] The above method can be executed by the first device or the chip in the first device. The first device can be a PC. The first device can only assume the GO role in P2P networking. Based on the above scheme, when the second device and the third device have established a first P2P connection and are performing a keyboard and mouse sharing service, if the PC initiates a network sharing service to the second device or the third device, the link between the second device and the third device can be interrupted at this time, and the PC can be re-networked as the GO role. For example, after the PC is re-networked, it establishes a second P2P connection with the second device; further, the third device can also initiate a connection to the PC and join the second P2P connection as a GC role; the keyboard and mouse sharing service between the second device and the third device is restored. Compared with the situation in the related art where the PC initiates a connection to an already formed P2P connection due to a conflict (the reason for the conflict is that the GO role in the already formed P2P connection has been occupied, and the PC can only be used as a GO role when joining the network), the multi-device connection method of the embodiment of the present application can effectively improve the success rate of the PC as a GO role when networking, and improve the user experience.
[0008] The keyboard and mouse sharing service is allowed to be interrupted, which means that the corresponding link of the running keyboard and mouse sharing service is allowed to be disconnected; for example, when the second device and the third device are using the keyboard and mouse sharing service, the link between the second device and the third device is allowed to be disconnected.
[0009] The keyboard and mouse sharing service allows connection through transit, which means that: when the first device is re-networked, the first device is the GO role after re-networking, and the second device and the third device are both GC roles. At this time, the keyboard and mouse sharing service between the second device and the third device can be connected through the first device that assumes the GO role.
[0010] Exemplarily, the first device is a PC, the second device is a mobile phone, and the third device is a tablet. It should be understood that the description here is based on the example that the mobile phone and the tablet have established the first P2P group, and the embodiment of the present application is not limited to this. In fact, the first P2P group can also be a connection that other types of devices have established.
[0011] It should be noted that the above description is based on the example that the service between the second device and the third device is a keyboard and mouse sharing service, and the embodiments of the present application are not limited to this. In the above implementation, the above keyboard and mouse sharing service can also be replaced by other services that are allowed to be interrupted and connected through a transit method. Furthermore, the network sharing service initiated by the PC can also be other types of services, and the embodiments of the present application are not limited to this.
[0012] When determining the connection strategy, the configuration table configured in the cloud can be combined. The configuration table records the information corresponding to each service in multiple services. The information of each service includes at least the following dimensions: whether it is allowed to be interrupted, whether it is allowed to connect through transit. Furthermore, it can also include the priority information corresponding to the service.
[0013] Optionally, the configuration table is configured in a cloud server; the data stored in the configuration table is dynamically adjusted based on data fed back by users.
[0014] It should be understood that the data stored in the configuration table may be dynamically changed. The embodiment of the present application does not limit the principle of dynamic change. For example, based on the data fed back by the user, the priority of the call sharing service may be adjusted to the highest. For another example, the information corresponding to the service may be dynamically adjusted by analyzing the user's behavior habits or the habits of using electronic devices. For another example, a big data model may be used for data learning or training to predict or update the information corresponding to the service.
[0015] The embodiment of the present application does not limit the specific form of the above configuration table. The configuration table can be stored in the form of a mapping table or an array. When the PC initiates a service to a device in a P2P group (for example, the second device or the third device), the information of the service being used by the device can be obtained by querying the configuration table, so as to decide the connection strategy based on the service information.
[0016] Exemplarily, before networking is performed according to the first connection strategy, the method further includes: determining the first connection strategy by querying a configuration table, wherein the configuration table includes at least information corresponding to the keyboard and mouse sharing service, and the information corresponding to the keyboard and mouse sharing service includes: information that the keyboard and mouse sharing service is allowed to be interrupted, and information that the keyboard and mouse sharing service is allowed to be connected through transit.
[0017] That is to say, by querying the above configuration table, it is known that the keyboard and mouse sharing service is allowed to be interrupted and run through a transit connection; then it is determined that the first connection strategy can be used for networking. The first connection strategy refers to: interrupting the connection between the second device and the third device; re-networking with the PC as the GO role, and restoring the keyboard and mouse sharing service between the second device and the third device after re-networking. After the second device and the third device are restored to connection, a transit connection is made through the PC. In this way, not only is the network re-networked with the PC as the GO role, but the keyboard and mouse sharing service between the second device and the third device is also restored, minimizing the impact on users caused by the interruption of the previous connection during re-networking.
[0018] It is understandable that due to the diversity of service types, some services have high performance requirements, such as latency, and such services usually do not support being interrupted or connected through a transit method. For such services, the embodiments of the present application also provide solutions.
[0019] In a possible implementation, the method further includes:
[0020] When the second device and the third device are performing a network sharing service, initiating a call sharing service to the second device or the third device;
[0021] When the network sharing service is not allowed to be interrupted and / or the network sharing service is not allowed to be connected through transit, and the priority of the call sharing service is higher than or equal to the priority of the network sharing service, networking is performed according to the second connection strategy, and the second connection strategy is: seizing the connection between the second device and the third device, and networking with the first device as the role of the group manager GO.
[0022] The difference between the second connection strategy and the first connection strategy is that in the second connection strategy, after the PC is re-networked as the GO role, the service (network sharing service) between the second device and the third device will not be restored. This is because the network sharing service does not allow connection through a transit mode.
[0023] Similarly, when introducing the second connection strategy, only the service between the second device and the third device is a network sharing service as an example for description, and the embodiments of the present application are not limited to this. In the above implementation, the above network sharing service can also be replaced by other services that meet the following conditions: not allowed to be interrupted and / or not allowed to be connected through transit, and the corresponding priority is lower than or equal to the priority of the service initiated by the PC. For example, the service between the second device and the third device is a screen projection service. Furthermore, the call sharing service initiated by the PC can also be other types of services, and the embodiments of the present application are not limited to this.
[0024] That is to say, for services that are not allowed to be interrupted and / or are not allowed to be connected through a relay mode, and whose priority is lower than or equal to the priority of the service initiated by the PC, after the connection between the second device and the third device is interrupted and the network is re-established with the PC as the GO role, the connection between the second device and the third device will not be restored. In this way, it can ensure that the service with a higher priority initiated by the PC can run smoothly, improving the user experience.
[0025] Of course, when determining the above-mentioned second connection strategy, the connection strategy can also be determined by querying the aforementioned configuration table. Optionally, before networking according to the second connection strategy, the method also includes: determining the second connection strategy by querying the configuration table, wherein the configuration table at least includes information corresponding to the network sharing service, and the information corresponding to the network sharing service includes: information that the network sharing service is not allowed to be interrupted, information that the network sharing service is not allowed to be connected through a transit method, priority information of the network sharing service, and priority information of the call sharing service. For the description of the configuration table, please refer to the previous text and will not be repeated here.
[0026] The above describes the specific implementation methods of the first connection strategy and the second connection strategy. In these two connection strategies, there is no need for the user to participate in the decision-making, and the PC can determine the connection establishment method by querying the configuration table. However, in the case where no decision can be made by querying the configuration table, the user can decide which method to use to establish the connection. Based on this, the embodiment of the present application provides a third connection strategy.
[0027] In a possible implementation, the method further includes:
[0028] When the second device and the third device are performing a network sharing service, initiating a keyboard and mouse sharing service to the second device or the third device; wherein the network sharing service is not allowed to be interrupted and / or the network sharing service is not allowed to be connected in a transit manner, and the priority of the keyboard and mouse sharing service is lower than the priority of the network sharing service;
[0029] According to the third connection strategy, a first interface is displayed, wherein the first interface includes a first window, the first window includes a first control, and the third connection strategy refers to a strategy of re-networking or maintaining the current networking based on a user's decision;
[0030] In response to a user clicking on the first control, the first P2P connection between the second device and the third device is interrupted, and the first device is used as the group manager GO to re-establish the network.
[0031] Optionally, the first window further includes a second control; and the method further includes:
[0032] In response to a user clicking on the second control, maintaining the connection between the second device and the third device.
[0033] Exemplarily, the mobile phone and tablet are using the network sharing service, and the PC initiates the keyboard and mouse sharing service to the mobile phone; by querying the configuration table, it can be seen that the priority of the keyboard and mouse sharing service is lower than the priority of the network sharing service being used by the mobile phone and tablet, and the network sharing service is not allowed to be interrupted and / or connected through transit. In this scenario, a pop-up window may be displayed on the PC so that the user can decide whether to re-network or maintain the current network. If the user chooses to re-network, the PC can interrupt the connection between the mobile phone and the tablet, and re-network with the GO role. If the user chooses not to re-network, the PC will no longer initiate a connection to the mobile phone, and the network sharing service between the mobile phone and the tablet will still be maintained. In this way, users can participate in decision-making, thereby running services that users consider to be more important and improving user experience.
[0034] It should be understood that the services involved in the above description of the third connection strategy are only exemplary descriptions, and the embodiments of the present application are not limited thereto. In fact, the services involved in the above description of the third connection strategy can also be replaced by other services, and other services can be understood as services that cannot adopt the first connection strategy and the second connection strategy after querying the configuration table.
[0035] Similarly, when determining the third connection strategy, the connection strategy may also be determined by querying the aforementioned configuration table.
[0036] Exemplarily, before displaying the first interface, the method further includes:
[0037] The third connection strategy is determined by querying a configuration table, wherein the configuration table includes at least information corresponding to the network sharing service, and the information corresponding to the network sharing service includes: information that the network sharing service is not allowed to be interrupted, information that the network sharing service is not allowed to be connected through transit, priority information of the network sharing service, and priority information of the keyboard and mouse sharing service; wherein the priority of the network sharing service is higher than the priority of the keyboard and mouse sharing service.
[0038] The embodiment of the present application does not limit the specific connection process or specific steps involved when the PC acts as a GO to re-network. The specific networking technology can refer to the description of the relevant process.
[0039] Exemplarily, re-networking with the first device as the group manager GO includes:
[0040] receiving a first connection request from the second device;
[0041] Establishing a second P2P connection with the second device, the second device being a GC role in the second P2P connection, and the first device being a GC role in the second P2P connection;
[0042] Alternatively, a second connection request is received from the third device; the third device plays the GC role in the second P2P connection, and the first device plays the GC role in the second P2P connection.
[0043] Optionally, after re-networking with the first device as the role of the group manager GO, the method further includes:
[0044] In a case where the service between the second device and the third device allows connection in a transit manner, the service between the second device and the third device is restored.
[0045] It can be understood that the information corresponding to each of the aforementioned services can be stored in the configuration table. However, the information of the services stored in the configuration table may include more. Exemplarily, the configuration table also includes information on one or more of the following services: file transfer service, screen projection service, global favorites service, application continuation service; the information of each service includes at least one or more of the following information: whether the service is allowed to be interrupted, whether the service is allowed to be connected by transit, and the priority information of the service.
[0046] In this way, in the scenario of multiple concurrent services, the configuration table can provide a query basis for most services. By querying the above configuration table, the corresponding connection establishment strategy can be determined, and then the network can be established based on the connection establishment strategy, which greatly enriches the user experience.
[0047] In a second aspect, an electronic device is provided, comprising a unit for executing any one of the methods in the first aspect. The electronic device may be a PC or a chip in a PC. The electronic device comprises an input unit, a display unit and a processing unit.
[0048] When the electronic device is a PC, the processing unit may be a processor, the input unit may be a communication interface, and the display unit may be a graphics processing module and a screen; the terminal may also include a memory for storing computer program code, and when the processor executes the computer program code stored in the memory, the PC executes any one of the methods in the first aspect.
[0049] When the electronic device is a chip in a PC, the processing unit may be a logic processing unit inside the chip, the input unit may be an input interface, a pin or a circuit, etc., and the display unit may be a graphics processing unit inside the chip; the chip may also include a memory, which may be a memory inside the chip (for example, a register, a cache, etc.) or a memory located outside the chip (for example, a read-only memory, a random access memory, etc.); the memory is used to store computer program code, and when the processor executes the computer program code stored in the memory, the chip executes any one of the methods of the first aspect.
[0050] According to a third aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program code. When the computer program code is executed by an electronic device, the electronic device executes any one of the methods according to the first aspect.
[0051] According to a fourth aspect, a computer program product is provided, the computer program product comprising: a computer program code, when the computer program code is executed by an electronic device, the electronic device executes any one of the methods according to the first aspect.
[0052] In a fifth aspect, a network topology is provided, which includes a PC, a mobile phone and a tablet. The PC is a GO role in the network topology. The mobile phone and the tablet are GC roles in the network topology.
[0053] The PC may be used to execute the method in the first aspect. The mobile phone may be the second device in the method in the first aspect. The tablet may be the mobile phone may be the third device in the method in the first aspect.
[0054] In the sixth aspect, an embodiment of the present application provides a chip system, which is applied to an electronic device (e.g., a PC), and the chip system includes one or more processors, which are used to call computer instructions so that the electronic device executes the method described in the first aspect and any possible implementation method of the first aspect.
[0055] It can be understood that the electronic device provided in the second aspect, the computer-readable storage medium provided in the third aspect, the computer program product provided in the fourth aspect, the network topology provided in the fifth aspect, and the chip system provided in the sixth aspect are all used to execute the method provided in the present application. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 This is an example diagram of a problem scenario for current P2P connections;
[0057] Figure 2A This is an example diagram of an application scenario of an embodiment of the present application;
[0058] Figure 2B This is a diagram showing an example of a scenario in which the first connection strategy is applied in an embodiment of the present application;
[0059] Figure 2C This is a diagram showing an example of a scenario in which the second connection strategy is applied in an embodiment of the present application;
[0060] Figure 2D This is an example diagram of a scenario when a user confirms networking when the third connection strategy is applied in an embodiment of the present application;
[0061] Figure 2E This is an example diagram of a scenario when a user cancels networking when the third connection strategy is applied in an embodiment of the present application;
[0062] Figure 3A It is a schematic diagram of the architecture of an embodiment of the present application;
[0063] Figure 3B is another schematic diagram of the architecture of an embodiment of the present application;
[0064] Figure 4A This is an example diagram of a process when a first service preempts a second service in an embodiment of the present application;
[0065] Figure 4B This is an example diagram of a pop-up window showing a network confirmation on a PC in an embodiment of the present application;
[0066] Figure 5 is an example diagram of a process in which both the first service and the second service require the participation of the interconnection middleware;
[0067] Figure 6 This is an example diagram of a process in which the first service requires the participation of the interconnected middleware;
[0068] Figure 7 This is an example diagram of a process in which the second service requires the participation of the interconnection middleware;
[0069] Figure 8 is a timing diagram of an example of a PC preemption service shown in an embodiment of the present application;
[0070] Fig. 9 This is an example timing diagram of the embodiment of the present application when the services of the mobile phone and the tablet are interrupted and then re-networked;
[0071] Fig.10 is a schematic flow chart of a method for connecting multiple devices according to an embodiment of the present application;
[0072] Fig.11 The present invention is a schematic diagram of the structure of an electronic device suitable for the present application. DETAILED DESCRIPTION
[0073] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0074] In the embodiments of the present application, unless otherwise specified, “plurality” may mean two or more than two.
[0075] The embodiments of the present application are applicable to electronic devices, which may be mobile phones, smart screens, tablet computers, personal computers (PCs), wearable electronic devices, vehicle-mounted electronic devices, augmented reality (AR) devices, virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), projectors, and the like.
[0076] The embodiments of the present application are applicable to application scenarios of collaborative connection of multiple devices. The collaborative connection of multiple devices can adopt the Wi-Fi Direct protocol. In some embodiments, when the Wi-Fi Direct protocol is adopted for networking, only one device can serve as the GO role, and the other devices serve as the GC role. In other words, the network obtained by P2P networking through the Wi-Fi Direct protocol can be called a P2P group. A P2P group includes a P2P GO role and at least one P2P GC role. In the case where a P2P group includes multiple GC roles, the interaction between GC roles and GC roles in the group can be relayed through the GO role.
[0077] In some embodiments, due to the hardware adaptability of the device, a device usually assumes one role in the process of multi-device networking, and cannot assume two roles at the same time. That is, the device cannot be a GO role and a GC role at the same time, and can only be a GO role or a GC role. For example, for a mobile phone that supports a group of P2P connections, the mobile phone is either a GO role or a GC role in the P2P group.
[0078] In some embodiments, due to the limitations of the operating system running in the device, there are devices that can only assume the GO role in the P2P group and cannot serve as the GC role. For example, for a PC, the PC itself does not support joining a P2P group or P2P network as a GC role. The reason why the PC cannot join the network as a GC role is that, due to the limitations of the PC's own Windows operating system or business needs, the Windows GC-GC protocol negotiation in the Windows operating system is closed source, and the PC cannot serve as a GC role in the network topology, but can only serve as a GO role. Among them, "closed source" is a computer term, which is the opposite of "open source", that is, the software is not open source and the source code cannot be modified.
[0079] The embodiments of the present application do not specifically limit the types of collaborative services involved in the collaborative connection of multiple devices. In some embodiments, collaborative services include but are not limited to the following services: multi-screen collaborative service, keyboard and mouse sharing service, camera sharing service, network sharing service, screen projection service, call sharing service, memo synchronization, honor sharing service, cross-device copy and paste service, etc.
[0080] Here, the above-mentioned multiple collaborative services are only exemplary descriptions, and the embodiments of the present application are not limited thereto. With the development of technology, the device can support more types of services or businesses.
[0081] It should be understood that the above description is only based on the example of naming "collaborative service" as "service", and the embodiments of the present application are not limited to this. For example, "collaborative service" can also be named "collaborative business" or other names.
[0082] The following combination Figure 1 The application scenario shown in the figure describes the problems existing in current P2P connections. Figure 1 As shown, a first P2P connection has been established between mobile phone 1 and tablet computer, and the two can realize shared services through the first P2P connection. Among them, mobile phone 1 acts as a GO role in the first P2P connection, and the tablet computer acts as a GC role in the first P2P connection.
[0083] Optionally, mobile phone 2 can also join the first P2P connection as a GC role. The interaction between mobile phone 2 and the tablet can be transferred through mobile phone 1. It can be understood that Figure 1 The number of devices and / or device types included in the first P2P connection are merely examples, and the embodiments of the present application are not limited thereto.
[0084] In the related multi-device connection technology, for the P2P network formed by mobile phone 1 as a GO, when the PC initiates a connection to mobile phone 1 or a tablet in the first P2P connection, a connection failure may occur due to a conflict.
[0085] In a network where mobile phone 1 has been set up as a GO role, the PC cannot join the network as a GO role because mobile phone 1 has already occupied the role of the GO role. The PC itself does not support joining the network as a GC role. The reason why the PC cannot join the network as a GC role can be found in the previous article and will not be repeated here.
[0086] The embodiment of the present application does not specifically limit the type of PC. For example, PC includes but is not limited to: laptop computers, desktop computers, handheld computers, all-in-one computers, ultrabooks, embedded computers, etc.
[0087] It should be understood that the embodiments of the present application Figure 1 The type of collaborative service between mobile phone 1 and tablet, or the type of collaborative service between mobile phone 2 and tablet, or the type of collaborative service between mobile phone 1 and mobile phone 2 is not specifically limited. For example, network sharing can be achieved between mobile phone 1 and tablet; keyboard and mouse sharing can be achieved between mobile phone 2 and tablet.
[0088] It should also be understood that the embodiments of the present application are for Figure 1 The number of devices included in the network topology where mobile phone 1 plays the role of GO is not limited. Figure 1 The description is only based on the example of a tablet and mobile phone 2. For example, other devices may also be added to the network as GC roles.
[0089] It should also be understood that Figure 1 The example in which the connection is initiated by a PC as a GO role is used for description, but the embodiments of the present application are not limited thereto. Figure 1 The PC in the network can also be other devices that can only act as a GO but not as a GC, initiating a connection to the devices in the established network topology.
[0090] In some embodiments, for an already formed network topology (the network topology may be a P2P group, and the P2P group already has a GO role), if there are other devices that can only act as a GO role (such as a PC) that initiate a connection to a device in the network topology, then the aforementioned already formed network can be interrupted by directly preempting the service, and the network can be re-formed. After the re-networking, the device that initiated the connection assumes the GO role of the re-networked network. In this way, the success rate of such devices that can only act as a GO role in multi-device connections can be improved. For ease of understanding, the following is combined with Figure 2A The application scenario shown in FIG.
[0091] like Figure 2A As shown, for a network formed by mobile phone 1 as a GO role, when the PC initiates a connection to the mobile phone 1 or tablet in the network, the connection between the mobile phone 1 and the tablet can be interrupted.
[0092] Optionally, if the network formed by mobile phone 1 as a GO also includes other devices as GCs, the services of other devices as GCs can be interrupted. Figure 2A The business between the mobile phone 2 and the tablet is shown in FIG.
[0093] After the service between mobile phone 1 and tablet is interrupted, mobile phone 1 and tablet can be re-networked. After re-networking, PC acts as the GO role after re-networking to achieve connection with mobile phone 1, tablet and mobile phone 2. Among them, mobile phone 1, tablet and mobile phone 2 act as GC roles after re-networking. Data interaction between GC roles is transferred through GO role.
[0094] Furthermore, for an already formed network topology (for example, the network topology may be the first P2P group, and the first P2P group already has a GO role), if there are other devices that can only serve as GO roles (such as PCs) that initiate connections to devices in the network topology, a prompt will be displayed indicating that the networking has failed. At this point, the PC can determine the connection establishment strategy by querying the configuration table, and determine how to execute subsequent networking processes based on the connection establishment strategy. The configuration table records information corresponding to each service, including but not limited to one or more of the following three dimensions of information: priority information, information on whether interruption is allowed, information on whether GC-GC mode is allowed for transit connection, etc.
[0095] Optionally, the configuration table includes information related to one or more of the following services. For example, the services included in the configuration table include but are not limited to: keyboard and mouse sharing service, call sharing service, file transfer service, screen projection service, global favorites service, application continuation service, etc. Optionally, different services can be distinguished by different IDs in the configuration table.
[0096] The information of each service includes at least one or more of the following information: information on whether the service is allowed to be interrupted, information on whether the service is allowed to be connected by transit, and priority information of the service.
[0097] For example, the configuration table is shown in Table 1 below:
[0098]
[0099] It should be understood that the various services listed in the above Table 1 and the information corresponding to the services are merely example descriptions, and the embodiments of the present application are not limited thereto.
[0100] Optionally, the configuration table is configured in a cloud server; the data stored in the configuration table is dynamically adjusted based on user feedback. During use, the data stored in the configuration table can be dynamically updated or adjusted based on user feedback or user behavior habits, preference habits and other factors.
[0101] Or, optionally, the configuration table can also be obtained through big data model training, or based on prior knowledge.
[0102] In combination with the aforementioned configuration table, the following describes three connection establishment decisions (or connection strategies) determined by querying the configuration table provided in an embodiment of the present application.
[0103] Mode 1: By querying the configuration table, if it is found that the ongoing services in the first P2P group meet the conditions for re-networking, the PC can initiate re-networking. In other words, the PC conducts networking through the first connection strategy. The first connection strategy means: interrupting the connection between the second device and the third device, re-networking with the PC as the group manager GO, and restoring the connection between the second device and the third device after re-networking.
[0104] For example, Figure 2B As shown, the mobile phone and the tablet are providing keyboard and mouse services. A first P2P connection has been established between the mobile phone and the tablet, or the network between the mobile phone and the tablet is the first P2P group. The PC initiates a network sharing service to the mobile phone (such as the mobile phone in 2B) or the tablet in the first P2P group. The PC can know by querying the configuration table that the keyboard and mouse service is allowed to be interrupted, and that the connection is allowed to be transferred in a GC-GC manner. At this time, the PC can interrupt the first P2P connection between the mobile phone and the tablet and re-network to obtain the second P2P group. Moreover, since the ongoing keyboard and mouse service between the mobile phone and the tablet allows for a transfer connection, the keyboard and mouse sharing service between the mobile phone and the tablet can also be performed through the second P2P group. In other words, a connection can be established between the PC and the mobile phone; a connection can be established between the PC and the tablet; and the keyboard and mouse sharing service between the mobile phone and the tablet can be transferred through the PC as the GO role, thereby achieving the purpose of sharing services among the mobile phone, the tablet and the PC.
[0105] exist Figure 2B In the process, the PC re-networking includes two stages: (1) seizing (or temporarily interrupting) the keyboard and mouse sharing service between the mobile phone and the tablet; (2) after the PC and mobile phone (or PC and tablet) are networked, restoring the keyboard and mouse sharing service between the mobile phone and the tablet.
[0106] Mode 2: By querying the configuration table, if it is found that the ongoing service in the first P2P group meets the preemptive networking conditions, the PC can initiate the preemptive networking. In other words, the PC conducts networking through the second connection strategy. The second connection strategy means: interrupting or preempting the connection between the second device and the third device, re-networking with the PC as the group manager GO, and not restoring the connection between the second device and the third device after re-networking.
[0107] The difference between method 2 and method 1 is that in method 2, the preempted service is not allowed to be transferred and connected. For such preempted services, the PC will not restore the service of the preempted service after re-establishing the network. Figure 2C The examples in are described.
[0108] For example, Figure 2C As shown, the mobile phone and tablet are using network sharing service. The PC initiates a call sharing service to the mobile phone or tablet. By querying the configuration table, it can be known that: (1) the network sharing service is not allowed to be interrupted, and / or the network sharing service is not allowed to make a transit connection; (2) the priority of the call sharing service is higher than or equal to the priority of the network sharing service. Then at this time, the PC can execute preemptive networking, that is, disconnect the network sharing service between the mobile phone and the tablet, and initiate a call sharing service to the mobile phone or tablet. And, assuming that the network sharing service between the mobile phone and the tablet does not allow a transit connection, the network sharing service between the mobile phone and the tablet will be disconnected. In other words, in the second P2P group obtained by re-networking, the network sharing service between the mobile phone and the tablet will not be restored.
[0109] It should be noted that in actual applications, there are some services that have high latency requirements or high performance requirements, such as screen projection services or network sharing services. Such services are not allowed to be interrupted and / or transit connections are not allowed.
[0110] Understandably, Figure 2C The network sharing service between the mobile phone and the tablet is only described as an example, and the embodiments of the present application are not limited to this. In fact, the service between the mobile phone and the tablet may also be other types of services, such as screen projection service.
[0111] It is understandable. Figure 2C The example of the PC initiating the call sharing service is used for description, and the embodiments of the present application are not limited thereto. In fact, the PC may also initiate other types of services, and the priority of the service initiated by the PC is higher than the priority of the service being performed between the mobile phone and the tablet.
[0112] It should also be understood that here, the priority of the service between the mobile phone and the tablet is the same as the priority of the service initiated by the PC, and the method 2 is used for description as an example, and the embodiment of the present application is not limited to this. For the case where the priority of the service between the mobile phone and the tablet is the same as the priority of the service initiated by the PC, the method 3 can also be used for networking decision-making, and the embodiment of the present application does not specifically limit this.
[0113] Method 3: If the PC cannot obtain the connection strategy or make a decision by querying the configuration table, the decision-making power can be handed over to the user so that the user can decide whether to re-network. In other words, the PC uses the third connection strategy to network. The third connection strategy refers to: re-networking or maintaining the current network strategy based on the user's decision. Figure 2D and Figure 2E Describe the scene in .
[0114] In some embodiments, assuming that the mobile phone and tablet are performing service A, service A is not allowed to be interrupted and / or a transit connection is not allowed, the PC initiates service B to the mobile phone or tablet, and the priority of service B is lower than the priority of service A. At this time, method 3 can be used to decide whether to re-establish the network.
[0115] It should be noted that the difference between method 3 and the above two methods is that method 3 requires the user to participate in the decision-making. In some embodiments, method 3 covers a variety of situations; for example, if the limiting conditions corresponding to the services in the above method 1 (specifically including the services being carried out between the mobile phone and the tablet) are not met, method 3 can be executed; for another example, if the limiting conditions corresponding to the services in the above method 2 (specifically including the services being carried out between the mobile phone and the tablet, and the priority of the services initiated by the PC) are not met, method 3 can be executed.
[0116] For example, Figure 2D As shown, the mobile phone and the tablet are using a network sharing service, and a first P2P connection has been established between the mobile phone and the tablet, or the network between the mobile phone and the tablet is the first P2P group. The PC initiates a keyboard and mouse sharing service to the mobile phone (such as a mobile phone in 2B) or tablet in the first P2P group. By querying the configuration table, the PC knows that the network sharing service is not allowed to be interrupted, and no transit connection is allowed; however, the priority of the keyboard and mouse sharing service is lower than that of the network sharing service. At this time, the PC can display window 1201 so that the user can decide whether to re-network. Window 1201 is used to prompt the user whether to continue using the "keyboard and mouse sharing" service. If continued use, the service in use will be interrupted and reloaded. The service in use can be a network sharing service between a mobile phone and a tablet.
[0117] Optionally, window 1201 includes a continue control and a cancel control. In response to the user clicking the continue control in window 1201, the PC performs a re-networking operation, interrupts the network sharing service between the mobile phone and the tablet, and establishes a connection between the PC and the mobile phone. If the network sharing service does not allow a transit connection, the network sharing service between the mobile phone and the tablet will not be restored after the PC and the mobile phone establish a second P2P connection.
[0118] like Figure 2E As shown, in response to the user clicking the cancel control in window 1201 , the network sharing service between the mobile phone and the tablet continues to be maintained, that is, the first P2P connection between the mobile phone and the tablet is not interrupted.
[0119] It should be understood that Figure 2D and Figure 2E Only some situations of Mode 3 are shown, and the embodiments of the present application are not limited thereto. In fact, in practical applications, there are other situations where Mode 3 needs to be adopted.
[0120] Figure 3A The schematic diagram of the architecture of the embodiment of the present application is shown. Figure 3A As shown, the method for connecting multiple devices in an embodiment of the present application at least involves the cloud, application layer, trusted execution environment, etc.
[0121] The cloud can be understood as the cloud server corresponding to the device. For example, the cloud server includes a device cloud module. The device cloud module includes a device online / offline perception module, an inter-device message forwarding module, and a device data synchronization module.
[0122] In some embodiments, the device online / offline sensing module is used to detect whether the device in the trust ring is online or offline. Online can be understood as the device is currently in the trust ring; offline can be understood as the device is not currently in the trust ring. The inter-device message forwarding module is used to forward data and / or signaling between devices. The device data synchronization module is used to synchronize data between devices.
[0123] The application layer includes the system interaction and application layer and the intelligent multi-modal human-computer interaction framework. The system interaction and application layer includes the trust ring interaction center. The intelligent multi-modal human-computer interaction framework includes a shared service management framework. In some embodiments, the shared service management framework is a system application. The shared service management framework can provide information query functions to service modules in the shared services in the trust ring. Optionally, when a service of a device initiates networking, an information query can be performed on the shared service management framework to query the service to be interrupted. Furthermore, the device can prompt the user with the information of the service to be interrupted, for example, by reminding the user of the service to be interrupted in the form of a pop-up window.
[0124] The application layer also includes a trust ring module. The trust ring includes a converged interconnection center module and a shared service module. The converged interconnection center module is used to manage the underlying devices related to networking. For example, Figure 3A The converged interconnection center module includes device management module, data transmission service, access networking service and unified interconnection framework.
[0125] The shared service module includes one or more services (or businesses) supported by the trust circle. For example, Figure 3A The sharing service module includes keyboard and mouse sharing service, network sharing service, screen sharing service and other sharing services. It can be understood that Figure 3A Only some services are shown, and the embodiments of the present application are not limited to this.
[0126] In some embodiments, when the PC initiates a service in a shared service to the mobile phone, it can query the shared service management framework for the service currently being performed by the mobile phone and obtain the query result. The query result includes information about the service being performed by the mobile phone. The query result can also include information about the peer device (such as a tablet) that the mobile phone is performing the service. If the mobile phone has established a first P2P connection with the tablet. Then the PC initiates a networking request to the fusion interconnection center through the shared service module to request networking with the mobile phone. The fusion interconnection center responds to the shared service module for networking.
[0127] The trusted execution environment includes a security middle platform. Optionally, the security middle platform is used to provide functions related to user account information security. In some embodiments, the security middle platform includes a same-account authentication module and a different-account authentication module. The same-account authentication module is used to provide verification or authentication functions for the same account. The different-account authentication module is used to provide verification or authentication functions for different accounts.
[0128] Mobile phones, tablets and other devices logged in to the same account can discover each other and automatically connect to form a trust circle.
[0129] It should be noted that the embodiments of the present application are for application Figure 3A In some embodiments, devices running an Android system (e.g., a mobile phone, a tablet, a smart screen, etc.) or devices running a Windows operating system (e.g., a laptop, an all-in-one computer, etc.) can all apply the above Figure 3A The architecture shown.
[0130] Further, Figure 3AThe chip components involved in the device are also shown. Optionally, the chip components include CPU, GPU, BT and WIFI, etc. It can be understood that the contents included in the chip components shown here are only examples of components that may be involved in the embodiments of the present application, and the embodiments of the present application are not limited thereto.
[0131] Further, Figure 3B An example of interaction between the trust ring module and the shared service management framework and the access networking service module in the converged interconnection center is shown in FIG.
[0132] Among them, the shared service management framework includes a scheduling service module. The scheduling service module is used to provide functions related to service scheduling. The scheduling service module includes a logic layer, a data layer, and a communication layer. The logic layer includes a service query entry, a service connection scheduling, and a service connection decision. The data layer includes a device capability set, a service capability set, a dynamic detection module, and a configuration data module. The communication layer includes a cross-device instruction distribution module and a cross-device query module. The configuration data module stores the configuration table introduced above. The configuration table is used by the service connection decision module to determine the connection strategy.
[0133] The access networking service module includes a device entry module and a device connection module. The device entry module is used to provide the function of the device entering the trust ring. The device connection module is used to provide the function of establishing a connection between devices. For modules not involved in the following four steps, please refer to the description in the relevant technology, and this article will not repeat them.
[0134] like Figure 3B As shown, taking PC as an example, the PC determines the connection establishment decision including at least the following steps:
[0135] Step 1: The sharing service module in the PC initiates a network connection to the access networking service. For example, the network connection is used to initiate a connection with a mobile phone for a keyboard and mouse sharing service.
[0136] Step 2: The access networking service returns a failure message to the shared service module. For example, the failure message indicates that the connection initiated by the PC to the mobile phone fails.
[0137] Step 3: The trust ring module in the PC queries the service connection decision module in the shared service management framework for a connection decision.
[0138] For specific strategies for connection establishment decisions, please refer to the different strategies provided in the aforementioned methods 1 to 3, which will not be described in detail here.
[0139] Step 4: The shared service module executes the networking and connection based on the queried connection decision.
[0140] The following combination Figure 4A and Figure 5The process shown in the figure describes the method of the embodiment of the present application. Figure 4A The shared service management framework module in can be Figure 3A The shared service management framework module in. Figure 4A The first service in can be Figure 3A Any business in the shared service. Figure 4A The second service in can be Figure 3A Any service or business in the shared service. The first service can be the same type of service as the second service, or it can be a different type of service, which is not specifically limited in the embodiments of the present application. Among them, the first service is used to refer to the service initiated by the first device to the second device or the third device. The second service is used to refer to the ongoing service between the second device and the third device. A first P2P connection has been established between the second device and the third device. Figure 4A As shown, the following steps are included:
[0141] Step 1: A first service in a PC (which may be referred to as a first device) initiates a connection request to a trusted ring.
[0142] In other words, the PC initiates the first service to the mobile phone. In other words, the PC initiates the first service to the tablet.
[0143] The embodiment of the present application does not limit the specific method of triggering the PC to initiate a connection request. For example, in response to the user clicking on the scanned mobile phone or tablet in the PC to initiate the first service, a connection request is initiated to the trusted ring.
[0144] The connection request is used to initiate a connection to the device to be connected. Optionally, the connection request includes information about the device to be connected. The embodiment of the present application does not specifically limit the content included in the information about the device to be connected. For example, the information about the device to be connected includes an IP address of the device to be connected, a MAC address of the device, a device name, and the like.
[0145] Optionally, the connection request may also include information about a service established with the device to be connected, such as information about the first service.
[0146] The embodiment of the present application does not specifically limit the role that the second device plays in the first P2P connection. For example, the second device plays the GO role in the first P2P connection, and the third device plays the GC role in the first P2P connection. For another example, the second device plays the GC role in the first P2P connection, and the third device plays the GO role in the first P2P connection.
[0147] Exemplarily, the first device is Figure 2A The second device is the PC shown in Figure 2A The third device is the mobile phone 1 shown in FIG. Figure 2A The plate shown in .
[0148] The present application embodiment does not limit the specific type of the first service. In some embodiments, the first service can be Figure 3A For example, the first service is any one of the following services: keyboard and mouse sharing service, network sharing service, screen projection service, global favorites service, application continuation service (or other instantaneous service or real-time service), super call service, etc.
[0149] Exemplarily, step 1 includes: the PC initiates a connection request to the trust ring module through opensession. The connection request includes the IP address of the device to be connected.
[0150] Step 2: The trust ring returns an enabling failure result to the first service.
[0151] Exemplarily, after receiving the connection request initiated by the PC to establish the first service with the mobile phone or tablet, the trust ring returns a connection result to the PC. The connection result is used to indicate whether the connection initiated in step 1 is successful.
[0152] In some embodiments, if the second device has established a first P2P connection with the third device, or if a GO role already exists in the first P2P connection, a result indicating that the connection establishment failed will be returned to the PC.
[0153] Optionally, the result of the enabling failure includes a special error code. The special error code is used to indicate that the connection establishment failed and re-networking is required. The reason for re-networking here is that the GO role already exists in the P2P connection corresponding to the second device, or the second device has been networked with the third device.
[0154] Step 3: The PC (or the first service in the PC) queries the shared service management framework for ongoing services.
[0155] After receiving the connection failure result returned by the trust ring module, the PC queries the shared service management framework for the business currently being used or ongoing services of the device to be connected. Exemplarily, the PC can query the shared service currently being used by the second device in the shared service management framework, as well as which device the second device and the third device are using the shared service. For example, the shared service being used by the second device and the third device is one or more of the following services: keyboard and mouse sharing service, network sharing service, screen projection service, global collection service, etc.
[0156] For example, the PC finds out that the mobile phone is currently using the second service, and the mobile phone establishes a P2P connection with the tablet.
[0157] Step 4: A prompt window is displayed on the PC interface.
[0158] Both step 3 and step 4 occur after step 2. The present application embodiment does not specifically limit the order of step 3 and step 4. For example, step 3 is performed first, and step 4 is performed later. For another example, step 3 and step 4 are performed simultaneously.
[0159] The prompt window is used to remind the user to confirm whether to continue to perform the networking connection, or to remind the user that if the networking connection is continued, the service currently being used by the second device will be interrupted. In some embodiments, the prompt window includes information corresponding to the service queried in step 3, such as the second service.
[0160] Optionally, the prompt window includes a confirmation control and a cancel control. The confirmation control is used for the user to choose to continue to execute the network connection; the cancel control is used for the user to choose to cancel the network connection. When the user confirms to continue to execute the network connection, the currently used service will be interrupted, and the currently used service specifically includes the service between the second device and the third device.
[0161] For example, Figure 4B As shown, the interface displayed in the PC includes window 1201. Window 1201 is used to prompt the user whether to continue to use the "keyboard and mouse sharing" service. If continued use, the service in use will be interrupted and reloaded. The service in use can be a keyboard and mouse service between a mobile phone and a tablet. Optionally, 1201 includes a continue control and a cancel control. In response to the user clicking the continue control, the PC initiates a request for re-networking again, and then executes the networking method of the embodiment of the present application.
[0162] Of course, if the user clicks the cancel operation in window 1201, the PC will not initiate a connection request for re-networking, i.e., step 5 will not be executed. This helps to avoid interrupting the user's use of higher priority services.
[0163] Optionally, Figure 4B Other services of the Trust Ring service are also shown, including but not limited to the following services: screen sharing, file access, keyboard and mouse sharing, network sharing, photo service, and scanning service. Screen sharing is used to share the screen content in the device to other devices for display. File access is used to access files on other devices. Keyboard and mouse sharing provides services for controlling other devices with keyboards and touchpads. Network sharing is used to share the mobile phone's network with other devices. If no device supporting a certain service is found in the Trust Ring, a prompt such as "No supported device found" may be displayed below the service option, for example, Figure 4B The prompt content below the photo service or scanning service shown in.
[0164] Understandably, Figure 4B The functional options included in the trust ring service shown in the figure are merely exemplary descriptions, and the embodiments of the present application are not limited thereto.
[0165] Step 5: The PC initiates a networking request again through the trust ring.
[0166] In some embodiments, the PC, in response to the user confirming the networking operation, again initiates a request for re-networking to the trusted ring module. That is, after obtaining the user's permission, the PC will again initiate a request for re-networking to the mobile phone or tablet.
[0167] The difference between step 5 and step 1 is that the connection request initiated in step 5 is a request for re-networking. Optionally, the connection request in step 1 and the re-networking request in step 5 can be distinguished by adding parameters, fields or identifiers in the message.
[0168] For example, the initial connection opensession in step 1 includes the same content as the connection establishment request in the related art; the re-networking request in step 5 is an opensession including a special code or parameter for indicating re-networking, which aims to re-initiate networking to seize the currently established P2P connection (for example, the first P2P connection between the second device and the third device).
[0169] Optionally, after step 5, the trust ring may return a response message to the PC. The response message is used to inform the PC that a re-networking operation is currently being performed.
[0170] Step 6: The trust ring synchronously returns the preemption code to the device corresponding to the second service.
[0171] Optionally, the device corresponding to the second service includes the two-end device involved in the P2P link corresponding to the second service, specifically including the aforementioned second device and third device. In step 6, the trust ring module returns the preemption code to the two-end devices involved in the second service at the same time. FIG. 2A to FIG. 2D The mobile phone and tablet in the system return the preemption code at the same time.
[0172] It should be noted that, for the device involved in the second service, a reconnection parameter may be set when the connection is established for the first time. The reconnection parameter is used to indicate whether a reconnection is required when the service is interrupted or preempted.
[0173] For example, the reconnection parameters clearly indicate whether reconnection is required when the service is interrupted or preempted. If the second device or the third device has set the parameters that require reconnection when the connection is first established, then after the first P2P link corresponding to the second service is interrupted, you can try to reconnect. The process of reconnection can be referred to in the subsequent Fig. 9 process.
[0174] During the interruption of the second service, if there is data interaction between the second device and the third device, the data interaction will fail and an error code will be prompted to the user. In other words, during the period when the P2P link corresponding to the second service is preempted or interrupted, if the second device and the third device use the P2P link to transmit data, a transmission failure will be prompted.
[0175] For example, after the PC and the mobile phone are networked, if the service between the mobile phone and the tablet supports a relay connection, the service before the interruption of the mobile phone and the tablet can be restored, and a restoration completion code can be returned to both the mobile phone and the tablet.
[0176] Step 7: The trust ring module returns a recovery completion code to the device corresponding to the second service.
[0177] In some embodiments, after the network is restored, the trust circle module synchronously returns a recovery completion code to the second device and the third device.
[0178] Different types of services call corresponding modules or components in the system architecture. Due to the limitation of architecture division, some businesses or services cannot interact directly with the trust ring and require the participation of interconnected middleware. Figure 5 FIG4 is a schematic diagram showing that both the first service and the second service require the participation of the interconnection middleware. Figure 5 The difference is that the interactive messages or data between the first service and the trust ring module need to be forwarded or transparently transmitted by the first interconnection middleware; the interactive messages or data between the second service and the trust ring module need to be forwarded or transparently transmitted by the second interconnection middleware. Figure 5 As shown, at least the following steps are included:
[0179] Step 501: A first service sends a service enablement request to a first interconnection middleware.
[0180] Step 502: The first interconnection middleware sends a connection establishment request to the trust ring module.
[0181] As you can see, Figure 5 Steps 501 and 502 in are similar to Figure 4A Follow step 1 in .
[0182] Step 503-1: The trust ring module returns an instruction requiring re-networking to the first interconnection middleware.
[0183] Step 503-2: The first interconnection middleware returns an instruction to the first service indicating that the enabling fails and that re-networking is required.
[0184] Step 504: The first service queries the shared service management framework for ongoing services.
[0185] The description of step 504 can be found in the previous text. Figure 4A The description of step 3 in is not repeated here for the sake of brevity.
[0186] Step 505: a prompt window is displayed in the PC interface. The description of step 505 can be found in the previous text. Figure 4A The description of step 4 in is not repeated here for the sake of brevity.
[0187] Step 506: The first service initiates a request to the first interconnection middleware to re-enable the service.
[0188] Step 507: The first interconnection middleware initiates a re-networking connection to the trust ring again.
[0189] As you can see, Figure 5 Steps 506 and 507 in are similar to Figure 4A Follow step 5 in the
[0190] Step 508: The trust ring returns the preemption code to the second interconnection middleware (synchronously returns to the interconnection middleware corresponding to both ends, for example, the two ends refer to the mobile phone and the tablet).
[0191] Step 509: The second interconnection middleware returns a preemption code to the second service. Optionally, the preemption code may be returned by calling a preemption callback (or interface).
[0192] As you can see, Figure 5 Steps 508 and 509 in are similar to Figure 4A Follow step 6 in the
[0193] Step 510: The trust ring returns a recovery completion code to the second interconnection middleware.
[0194] Step 511: The second interconnection middleware returns a recovery completion code to the second service. Optionally, the recovery code may be returned by calling a recovery callback (or recovery interface).
[0195] Optionally, when the second service between the mobile phone and the tablet is interrupted, the second service may be interrupted by calling a disconnection callback.
[0196] As you can see, Figure 5 Steps 510 and 511 in are similar to Figure 4A Follow step 7 in the
[0197] For a description of setting reconnection parameters when establishing a connection for the first time, refer to Figure 4A For the sake of brevity, the description is not repeated here.
[0198] Understandably, Figure 5The example shown in FIG. 1 is that both the first service and the second service require the participation of the interconnection middleware, but the embodiments of the present application are not limited thereto. For example, the first service requires the participation of the interconnection middleware, but the second service does not require the participation of the interconnection middleware. For another example, the first service does not require the participation of the interconnection middleware, but the second service requires the participation of the interconnection middleware.
[0199] Figure 6 An example diagram of another service preemption process is shown. Figure 6 and Figure 5 The difference is that in Figure 6 In the example process, the first service requires the participation of the interconnection middleware, while the second service does not require the participation of the interconnection middleware. Figure 6 Steps 601 to 607 in the Figure 5 The description of steps 501 to 507 in FIG. 6; Steps 608 and 609 can refer to Figure 4A The description of steps 6 and 7 in Figure 6 For the description of the second service, please refer to the above Figure 4A For the sake of brevity, the introduction in will not be repeated here.
[0200] Figure 7 A diagram showing another example of a service preemption process is shown. Figure 7 and Figure 5 The difference is that in Figure 7 In the example process, the first service does not require the participation of the interconnection middleware, while the second service requires the participation of the interconnection middleware. Figure 7 Steps 701 to 705 in the Figure 1 The description of steps 1 to 5 in FIG. 706 and 710 can refer to Figure 5 Description of step 508 to step 511 in Figure 7 For the related description about the second service, please refer to the introduction in FIG. 4 , which will not be repeated here for the sake of brevity.
[0201] based on Figures 5 to 7 As shown in the example, in some embodiments, when executing some services, the device does not interact directly with the trust ring module, but relies on the interconnected relay to connect with the trust ring module to achieve the transmission of messages or data.
[0202] The embodiments of the present application do not specifically limit the types of services involving the interconnection middleware, which may depend on the service implementation and / or architecture division.
[0203] Exemplarily, when the device runs the screen projection service, it will call the virtualization capability in the system. Based on this, the execution process of the screen projection service involves the interconnection middleware module.
[0204] Exemplarily, when the device runs the global collection service, non-distributed file storage is involved. Based on this, the execution process of the global collection service involves the interconnected middleware module.
[0205] Exemplarily, when a device runs a network sharing service, an interconnection middleware module is also involved.
[0206] It should be understood that the above-mentioned service types related to the interconnection middleware module are merely exemplary descriptions, and the embodiments of the present application are not limited thereto.
[0207] It should also be understood that for ease of understanding, Figure 4A , Figures 5 to 7 The diagram shown in the figure is a simplified schematic diagram, and the embodiments of the present application are not limited thereto. For example, a PC, a mobile phone, and a tablet all include a trust ring module and a corresponding shared service module, which can be referred to in the above Figure 3A or Figure 3B Examples at .
[0208] For ease of understanding, the following combination Figure 8 The timing interaction diagram shown in describes the process of preempting services. Figure 8 As shown, taking the first device as a PC as an example, the PC includes a first service (eg, keyboard and mouse sharing service), a trust circle module and a sharing service management framework; the mobile phone and the tablet have established a first P2P connection. It should be understood that Figure 8 The modules included in each device are also simplified descriptions, and the embodiments of the present application are not limited to this. For example, each device includes a trust ring module, a shared service management framework module, and related service modules. The service performed between the mobile phone and the tablet is the second service (for example, a keyboard and mouse sharing service). The first service and the second service can be the same type of service or different types of service, and there is no specific limitation on this.
[0209] Step 801: The first service initiates a connection establishment request to the trust ring module.
[0210] The establishment request is a non-preemptive connection request. The establishment request is used by the PC to initiate a first service to the mobile phone or tablet.
[0211] The embodiment of the present application does not limit the specific type of the first service. For example, the first service is a keyboard and mouse sharing service.
[0212] Step 802: The trust circle module in the PC returns a result to the first service, and the returned result indicates that the connection establishment fails.
[0213] Step 803: The first service queries the service currently being used by the mobile phone or tablet. For example, the mobile phone and the tablet have established a first P2P connection and are using the second service.
[0214] Step 804 , the shared service management framework in the PC returns the service currently being used by the mobile phone or tablet, for example, the second service.
[0215] Step 805: A window pops up on the PC. The window is used to prompt the user whether to establish a network. For example, the window can be Figure 4B The window shown in .
[0216] It should be understood that the description here is only based on the user's decision to network (or the PC determines to adopt the third connection strategy mentioned above), and the embodiments of the present application are not limited to this. In fact, for the case where the PC adopts the second connection strategy or the first connection strategy for networking, Figure 8 Some of the steps shown in may still apply.
[0217] Step 806-1, in response to the user clicking to cancel the connection establishment operation, or when the countdown in the operation window ends when the user does not execute the operation, the connection establishment fails.
[0218] Step 807: In response to the user clicking to confirm the networking operation (or the user agrees to the networking), a re-networking request is initiated to the trust ring module.
[0219] Step 808: The PC initiates a first service to the mobile phone or tablet.
[0220] Step 809: The connection between the mobile phone and the tablet is terminated. For example, the mobile phone and the tablet terminate the ongoing second service.
[0221] Step 810-1, the mobile phone sends a connection request to the PC.
[0222] Step 810-2: The PC replies with a connection response message to the mobile phone.
[0223] Based on step 810 - 1 and step 810 - 2 , the transmission channel between the mobile phone and the PC is successfully established.
[0224] It can be understood that the technology for establishing a transmission channel between devices can refer to the relevant technology and will not be repeated here.
[0225] Optionally, in step 811 - 1 , the tablet sends a connection request to the PC.
[0226] Step 811-2: The PC sends a connection response message to the tablet.
[0227] Based on step 811 - 1 and step 811 - 2 , the transmission channel between the mobile phone and the tablet is successfully established.
[0228] It can be understood that the technology for establishing a transmission channel between devices can refer to the relevant technology and will not be repeated here.
[0229] Step 812-1, the first service of the PC receives a message indicating that the connection is successfully established. Alternatively, if the connection is not successfully established, step 812-2, the first service of the PC receives a message indicating that the connection is failed to be established.
[0230] Step 813: The PC performs a first service with the mobile phone or tablet.
[0231] Step 814: The second service between the mobile phone and the tablet is restored. The second service between the mobile phone and the tablet can be transferred by the PC.
[0232] For example, after the PC network is successfully established, Figure 8 It is shown that the PC can be used as the source side, or the service initiator; the mobile phone and the tablet can both be used as the sink side, or understood as the receiving end.
[0233] Exemplarily, steps 810-1 to 814 can be understood as part of the process of the PC successfully establishing the second P2P connection (refer to Figure 8 The dotted box corresponding to the second P2P connection in the figure).
[0234] It should be understood that Figure 8 An example of the timing steps of preempting networking in an embodiment of the present application is shown in FIG. , but the embodiment of the present application is not limited to this.
[0235] For ease of understanding, the following combination Fig. 9 The timing interaction diagram shown in describes the re-networking process. Fig. 9 As shown, the second device is a mobile phone, and the third device is a tablet. The second service is being performed between the mobile phone and the tablet. For example, for the first P2P connection established between the mobile phone and the tablet, Fig. 9 The mobile phone shown in the figure can be used as the source side, or the service initiator; the tablet can be used as the sink side, or understood as the receiving end.
[0236] Step 901: When enabling the second service between the mobile phone and the tablet for the first time, the mobile phone sets the re-networking parameters.
[0237] The re-networking parameter is used to indicate that re-networking is required when the service is interrupted.
[0238] It can be understood that since the mobile phone is the source side, the step of setting the re-networking parameters can be performed by the mobile phone, and the tablet does not need to perform it. After the mobile phone sets the re-networking parameters, it will be synchronized to the opposite device (for example, the tablet).
[0239] Step 902: Both the mobile phone and the tablet receive a message that they are disconnected and need to re-establish the network.
[0240] Step 903: The second service in the mobile phone and the tablet both receive a callback for re-establishing the network.
[0241] Furthermore, the first P2P connection between the mobile phone and the tablet has been interrupted.
[0242] Step 904: Both the mobile phone and the tablet prompt that the networking is in progress and waiting.
[0243] Optionally, a window may be displayed on the mobile phone and tablet to remind the user that networking is currently in progress.
[0244] Optionally, in step 905, a timeout is set in the prompt window displayed on the mobile phone and the tablet.
[0245] After the countdown ends, if the network has not been successfully established, a prompt will be given that the network has failed, and the aforementioned second service will be exited.
[0246] Optionally, when the countdown ends, if the network has not been successfully established, the second service between the mobile phone and the tablet can be automatically restored.
[0247] Step 906-1: The trust ring module of the mobile phone sends a message of networking failure to the second service. Alternatively, the trust ring module of the tablet sends a message of networking failure to the second service.
[0248] Step 906-2: The mobile phone or tablet will prompt the user that the networking has failed and the user will be logged out of the service.
[0249] Step 907-1: The trust ring module of the mobile phone sends a message of successful networking to the second service. Alternatively, the trust ring module of the tablet sends a message of successful networking to the second service.
[0250] Step 907-2, a prompt window indicating successful networking is displayed on the mobile phone. It can be understood that since the mobile phone is the source side, the window indicating successful networking can be displayed on the mobile phone but not on the tablet.
[0251] Step 908, the mobile phone and PC services (such as Figure 8 The first service shown in () is in progress.
[0252] Optionally, in step 909, the service connection between the mobile phone and the tablet has been restored.
[0253] It should be noted that the restoration connection shown in step 909 means that after the PC reorganizes the network successfully, the service between the mobile phone and the tablet can be transferred through the PC. Of course, whether to restore the service between the mobile phone and the tablet depends on the corresponding information of the service in the configuration table, and the details can be referred to the above description.
[0254] It should be understood that Fig. 9 The examples shown in the preceding Figure 8The timing processes shown in the figure can be implemented in combination or independently, and the embodiments of the present application do not specifically limit this.
[0255] It should also be understood that Figure 8 and Fig. 9 The process shown in the description is only an example, and the embodiments of the present application are not limited thereto.
[0256] refer to Fig.10 , Fig.10 FIG. 1 is a schematic flow chart showing a method for connecting multiple devices according to an embodiment of the present application. Fig.10 As shown, the method includes:
[0257] Step 1101: A first device initiates a first service to a second device or a third device. The second device and the third device have established a first P2P connection, and the second device and the third device are performing a second service.
[0258] Step 1102: The first device determines a connection strategy by querying a configuration table.
[0259] The connection strategy is used by the first device to determine in which way to network. Optionally, the connection strategy may include a first connection strategy, a second connection strategy, and a third connection strategy. Based on services of different types or characteristics, a suitable connection strategy is adopted to provide a better user experience. The following describes example implementations of connection strategies in different situations.
[0260] Optionally, the first service is a network device sharing service, and the second service is a keyboard and mouse sharing service, and the following step 1103A is performed. Exemplarily, when the second device and the third device are performing the keyboard and mouse sharing service, a network sharing service is initiated to the second device or the third device; wherein a first P2P connection has been established between the second device and the third device, the second device is a GO role in the first P2P connection, and the third device is a GC role in the first P2P connection.
[0261] Step 1103A, when the keyboard and mouse sharing service is allowed to be interrupted and the keyboard and mouse sharing service is allowed to be connected through transit, networking is performed according to a first connection strategy, wherein the first connection strategy is: interrupting the connection between the second device and the third device, re-networking with the first device as the group manager GO, and restoring the connection between the second device and the third device after re-networking.
[0262] The specific process of step 1103A can be found in the previous text. Figure 2B The description is not repeated here.
[0263] Optionally, the first service is a call sharing service, and the second service is a network sharing service, and the following step 1103B is performed. Exemplarily, when the second device and the third device are performing the network sharing service, the call sharing service is initiated to the second device or the third device.
[0264] Step 1103B, when the network sharing service is not allowed to be interrupted and / or the network sharing service is not allowed to be connected through transit, and the priority of the call sharing service is higher than or equal to the priority of the network sharing service, networking is performed according to the second connection strategy, and the second connection strategy is: seizing the connection between the second device and the third device, and networking with the first device as the role of the group manager GO.
[0265] The specific process of step 1103B can be found in the previous text. Figure 2C The description is not repeated here.
[0266] Optionally, the first service is a keyboard and mouse sharing service, and the second service is a network sharing service, and the following step 1103C is performed. Exemplarily, when the second device and the third device are performing a network sharing service, the first device initiates a keyboard and mouse sharing service to the second device or the third device.
[0267] Step 1103C, when the network sharing service is not allowed to be interrupted and / or the network sharing service is not allowed to be connected through transit, and the priority of the keyboard and mouse sharing service is lower than the priority of the network sharing service; according to the third connection strategy, a first interface is displayed, the first interface includes a first window, the first window includes a first control, and the third connection strategy refers to a strategy of re-networking or maintaining the current networking based on the user's decision.
[0268] Optionally, in step 1104A, in response to the user clicking the first control, the first P2P connection between the second device and the third device is interrupted, and the first device is used as the group manager GO to re-establish the network.
[0269] Optionally, the first window further includes a second control; the method further includes: step 1104B, in response to the user clicking the second control, maintaining the connection between the second device and the third device.
[0270] The specific process of step 1103B and step 1104A can be found in the previous text. Figure 2D The description is not repeated here.
[0271] The specific process of step 1103B and step 1104B can be found in the previous text. Figure 2E The description is not repeated here.
[0272] It should be understood that Fig.10 In fact, when the first service is another type of service and the second service is another type of service, the embodiment of the present application is also applicable, that is, based on the specific characteristics of the service or the information recorded in the configuration table of the service, a suitable connection strategy is determined for networking.
[0273] In some embodiments, re-networking with the first device as the group manager GO includes:
[0274] receiving a first connection request from the second device;
[0275] Establishing a second P2P connection with the second device, the second device being a GC role in the second P2P connection, and the first device being a GC role in the second P2P connection;
[0276] Alternatively, a second connection request is received from the third device; the third device plays the GC role in the second P2P connection, and the first device plays the GC role in the second P2P connection.
[0277] Optionally, after re-networking with the first device as the role of the group manager GO, the method further includes:
[0278] In a case where the service between the second device and the third device allows connection in a transit manner, the service between the second device and the third device is restored.
[0279] Exemplarily, the first device is a PC, the second device is a mobile phone, and the third device is a tablet.
[0280] Optionally, in some embodiments, before networking is performed according to the first connection strategy, the method further includes:
[0281] The first connection strategy is determined by querying a configuration table, wherein the configuration table includes at least information corresponding to the keyboard and mouse sharing service, and the information corresponding to the keyboard and mouse sharing service includes: information that the keyboard and mouse sharing service allows interruption, and information that the keyboard and mouse sharing service allows connection through transit.
[0282] Optionally, in some embodiments, before networking is performed according to the second connection strategy, the method further includes:
[0283] The second connection strategy is determined by querying a configuration table, wherein the configuration table includes at least information corresponding to the network sharing service, and the information corresponding to the network sharing service includes: information that the network sharing service is not allowed to be interrupted, information that the network sharing service is not allowed to be connected through transit, priority information of the network sharing service, and priority information of the call sharing service.
[0284] Optionally, in some embodiments, before displaying the first interface, the method further includes:
[0285] The third connection strategy is determined by querying a configuration table, wherein the configuration table includes at least information corresponding to the network sharing service, and the information corresponding to the network sharing service includes: information that the network sharing service is not allowed to be interrupted, information that the network sharing service is not allowed to be connected through transit, priority information of the network sharing service, and priority information of the keyboard and mouse sharing service; wherein the priority of the network sharing service is higher than the priority of the keyboard and mouse sharing service.
[0286] Optionally, in some embodiments, the configuration table further includes information of one or more of the following services: file transfer service, screen projection service, global favorites service, application continuation service;
[0287] The information of each service includes at least one or more of the following information: information on whether the service is allowed to be interrupted, information on whether the service is allowed to be connected through a transit method, and information on the priority of the service.
[0288] Optionally, in some embodiments, the configuration table is configured in a cloud server; the data stored in the configuration table is dynamically adjusted based on data fed back by users.
[0289] For the description of the configuration table, please refer to the previous introduction and will not be repeated here.
[0290] Fig.11 A structural schematic diagram of an electronic device 1000 suitable for the present application is shown.
[0291] The electronic device 1000 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
[0292] Among them, the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0293] It should be noted that Fig.11 The structure shown does not constitute a specific limitation on the electronic device 1000. In other embodiments of the present application, the electronic device 1000 may include Fig.11 The electronic device 1000 may include more or fewer components than those shown. Fig.11 A combination of some of the components shown, or the electronic device 1000 may include Fig.11 Subcomponents of some of the components shown. For example, Fig.11 The illustrated proximity light sensor 180G may be optional. Fig.11 The components shown may be implemented in hardware, software, or a combination of software and hardware.
[0294] The processor 110 may include one or more processing units. For example, the processor 110 may include at least one of the following processing units: an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and a neural-network processing unit (NPU). Different processing units may be independent devices or integrated devices.
[0295] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0296] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0297] In some embodiments, the processor 110 may include one or more interfaces. For example, the processor 110 may include at least one of the following interfaces: an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM interface, and a USB interface.
[0298] Fig.11The connection relationship between the modules shown is only a schematic illustration and does not constitute a limitation on the connection relationship between the modules of the electronic device 1000. Optionally, the modules of the electronic device 1000 may also adopt a combination of multiple connection modes in the above embodiments.
[0299] The charging management module 140 is used to receive power from the charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive current from the wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive electromagnetic waves through the wireless charging coil of the electronic device 1000 (the current path is shown as a dotted line). While the charging management module 140 is charging the battery 142, it can also power the electronic device 1000 through the power management module 141.
[0300] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, and battery health status (e.g., leakage, impedance). Optionally, the power management module 141 can be set in the processor 110, or the power management module 141 and the charging management module 140 can be set in the same device.
[0301] The wireless communication function of the electronic device 1000 can be implemented through components such as the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
[0302] The electronic device 1000 can realize the display function through the GPU, the display screen 194 and the application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
[0303] The display screen 194 can be used to display images or videos. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a mini light-emitting diode (Mini LED), a micro light-emitting diode (Micro LED), a micro OLED (Micro OLED) or a quantum dot light emitting diode (QLED). In some embodiments, the electronic device 1000 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0304] The electronic device 1000 can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194 and the application processor.
[0305] The ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can perform algorithm optimization on the noise, brightness and color of the image. The ISP can also optimize the exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.
[0306] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard red green blue (RGB), YUV or other format. In some embodiments, the electronic device 1000 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0307] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 1000 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0308] NPU is a processor that draws on the structure of biological neural networks, such as the transmission mode between neurons in the human brain to quickly process input information, and can also continuously self-learn. Through NPU, the electronic device 1000 can realize intelligent cognition and other functions, such as image recognition, face recognition, voice recognition and text understanding.
[0309] The electronic device 1000 can implement audio functions, such as music playing and recording, through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor.
[0310] The key 190 includes a power key and a volume key. The key 190 can be a mechanical key or a touch key. The electronic device 1000 can receive a key input signal and implement a function related to the case input signal.
[0311] In some embodiments, the processor 110 is used to initiate a first service to a second device or a third device, the second device and the third device have established a first P2P connection, and the second device and the third device are performing a second service; and is also used to determine a connection strategy by querying a configuration table.
[0312] Exemplarily, when the second device and the third device are performing a keyboard and mouse sharing service, a network sharing service is initiated to the second device or the third device; wherein a first P2P connection has been established between the second device and the third device, the second device is a GO role in the first P2P connection, and the third device is a GC role in the first P2P connection; the processor 110 is used to perform networking according to a first connection strategy when the keyboard and mouse sharing service is allowed to be interrupted and the keyboard and mouse sharing service is allowed to be connected through a transit manner, wherein the first connection strategy refers to: interrupting the connection between the second device and the third device, re-networking with the first device as the role of the group manager GO, and restoring the connection between the second device and the third device after re-networking.
[0313] Exemplarily, when the second device and the third device are performing a network sharing service, a call sharing service is initiated to the second device or the third device; the processor 110 is used to perform networking according to a second connection strategy when the network sharing service is not allowed to be interrupted and / or the network sharing service is not allowed to be connected through transit, and the priority of the call sharing service is higher than or equal to the priority of the network sharing service. The second connection strategy refers to: seizing the connection between the second device and the third device, and performing networking with the first device as the role of the group manager GO.
[0314] For other situations where a decision cannot be made by querying the configuration table (or the execution conditions of the first connection strategy or the second connection strategy are not met), the user can decide whether to conduct networking. For example, when the second device and the third device are performing network sharing services, a keyboard and mouse sharing service is initiated to the second device or the third device; the processor 110 is used when the network sharing service is not allowed to be interrupted and / or the network sharing service is not allowed to be connected through a transit method, and the priority of the keyboard and mouse sharing service is lower than the priority of the network sharing service; according to the third connection strategy, the display screen 194 is called to display the first interface, the first interface includes a first window, the first window includes a first control, and the third connection strategy refers to a strategy for re-networking or maintaining the current networking based on the user's decision.
[0315] It can be understood that the method for connecting multiple devices in the embodiment of the present application can be applied to Fig.11 In the electronic device shown in , the specific implementation steps can refer to the introduction of the method embodiment above, which will not be repeated here.
[0316] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0317] The present application also provides a computer program product, which, when executed by a processor, implements the method described in any method embodiment of the present application.
[0318] The computer program product can be stored in a memory, and is finally converted into an executable target file that can be executed by a processor after preprocessing, compiling, assembling and linking.
[0319] The present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a computer, the method described in any method embodiment of the present application is implemented. The computer program can be a high-level language program or an executable target program.
[0320] The computer-readable storage medium may be a volatile memory or a nonvolatile memory, or may include both a volatile memory and a nonvolatile memory. The nonvolatile memory may be a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus random access memory (DR RAM).
[0321] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described devices and equipment and the technical effects produced can refer to the corresponding processes and technical effects in the aforementioned method embodiments, and will not be repeated here.
[0322] In several embodiments provided in the present application, the disclosed systems, devices and methods can be implemented in other ways. For example, some features of the method embodiments described above can be ignored or not performed. The device embodiments described above are merely schematic, and the division of units is only a logical function division. There may be other division methods in actual implementation, and multiple units or components may be combined or integrated into another system. In addition, the coupling between the units or the coupling between the components may be direct coupling or indirect coupling, and the above coupling includes electrical, mechanical or other forms of connection.
[0323] It should be understood that in the various embodiments of the present application, the size of the serial number of each process does not mean the order of execution. 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 embodiments of the present application.
[0324] In addition, the terms "system" and "network" are often used interchangeably in this article. The term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0325] The terms (or numbers) "first", "second", ..., etc. that appear in the embodiments of the present application are only used for descriptive purposes, that is, only to distinguish different objects, such as different "devices", etc., and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first", "second", ..., etc. may explicitly or implicitly include one or more features. In the description of the embodiments of the present application, "at least one (item)" refers to one or more. "Multiple" means two or more. "At least one of the following (items)" or similar expressions thereof refers to any combination of these items, including any combination of a single (item) or a plurality of (items).
[0326] For example, the meaning of the expression similar to "the item includes at least one of the following: A, B, and C" in the embodiments of the present application, unless otherwise specified, generally means that the item can be any one of the following: A; B; C; A and B; A and C; B and C; A, B and C; A and A; A, A and A; A, A and B; A, A and C, A, B and B; A, C and C; B and B, B, B and B, B, B and C, C and C; C, C and C, and other combinations of A, B and C. The above is an example of three elements, A, B and C, to illustrate the optional items of the item. When it is expressed as "the item includes at least one of the following: A, B, ..., and X", that is, when there are more elements in the expression, the items that can be applied to the item can also be obtained according to the above rules.
[0327] In short, the above is only a preferred embodiment of the technical solution of this application, and is not intended to limit the protection scope of this application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application should be included in the protection scope of this application.
Claims
1. A method for connecting multiple devices, characterized in that: The method is applied to a first device, and the method includes: When the second device and the third device are performing a keyboard and mouse sharing service, initiating a network sharing service to the second device or the third device; wherein a first P2P connection has been established between the second device and the third device, the second device is a GO role in the first P2P connection, and the third device is a GC role in the first P2P connection; When the keyboard and mouse sharing service is allowed to be interrupted and the keyboard and mouse sharing service is allowed to be connected through transit, networking is performed according to a first connection strategy, wherein the first connection strategy refers to: interrupting the connection between the second device and the third device, re-networking with the first device as the group manager GO, and restoring the connection between the second device and the third device after re-networking.
2. The method according to claim 1, characterized in that The method further comprises: When the second device and the third device are performing a network sharing service, initiating a call sharing service to the second device or the third device; When the network sharing service is not allowed to be interrupted and / or the network sharing service is not allowed to be connected through transit, and the priority of the call sharing service is higher than or equal to the priority of the network sharing service, networking is performed according to the second connection strategy, and the second connection strategy is: seizing the connection between the second device and the third device, and networking with the first device as the role of the group manager GO.
3. The method according to claim 1 or 2, characterized in that: The method further comprises: When the second device and the third device are performing a network sharing service, initiating a keyboard and mouse sharing service to the second device or the third device; wherein the network sharing service is not allowed to be interrupted and / or the network sharing service is not allowed to be connected in a transit manner, and the priority of the keyboard and mouse sharing service is lower than the priority of the network sharing service; According to the third connection strategy, a first interface is displayed, wherein the first interface includes a first window, the first window includes a first control, and the third connection strategy refers to a strategy of re-networking or maintaining the current networking based on a user's decision; In response to a user clicking on the first control, the first P2P connection between the second device and the third device is interrupted, and the first device is used as the group manager GO to re-establish the network.
4. The method according to claim 3, characterized in that The first window also includes a second control; the method further includes: In response to a user clicking on the second control, maintaining the connection between the second device and the third device.
5. The method according to any one of claims 1 to 4, characterized in that The re-networking with the first device as the group manager GO includes: receiving a first connection request from the second device; Establishing a second P2P connection with the second device, the second device being a GC role in the second P2P connection, and the first device being a GC role in the second P2P connection; Alternatively, a second connection request is received from the third device; the third device plays the GC role in the second P2P connection, and the first device plays the GC role in the second P2P connection.
6. The method according to claim 5, characterized in that After re-networking with the first device as the role of the group manager GO, the method further includes: In a case where the service between the second device and the third device allows connection in a transit manner, the service between the second device and the third device is restored.
7. The method according to any one of claims 1 to 6, characterized in that The first device is a PC, the second device is a mobile phone, and the third device is a tablet.
8. The method according to claim 1, characterized in that Before networking is performed according to the first connection strategy, the method further includes: The first connection strategy is determined by querying a configuration table, wherein the configuration table includes at least information corresponding to the keyboard and mouse sharing service, and the information corresponding to the keyboard and mouse sharing service includes: information that the keyboard and mouse sharing service allows interruption, and information that the keyboard and mouse sharing service allows connection through transit.
9. The method according to claim 2, characterized in that: Before networking is performed according to the second connection strategy, the method further includes: The second connection strategy is determined by querying a configuration table, wherein the configuration table includes at least information corresponding to the network sharing service, and the information corresponding to the network sharing service includes: information that the network sharing service is not allowed to be interrupted, information that the network sharing service is not allowed to be connected through transit, priority information of the network sharing service, and priority information of the call sharing service.
10. The method according to claim 3, characterized in that Before displaying the first interface, the method further includes: The third connection strategy is determined by querying a configuration table, wherein the configuration table includes at least information corresponding to the network sharing service, and the information corresponding to the network sharing service includes: information that the network sharing service is not allowed to be interrupted, information that the network sharing service is not allowed to be connected through transit, priority information of the network sharing service, and priority information of the keyboard and mouse sharing service; wherein the priority of the network sharing service is higher than the priority of the keyboard and mouse sharing service.
11. The method according to any one of claims 8 to 10, characterized in that The configuration table also includes information on one or more of the following services: file transfer service, screen projection service, global favorites service, and application continuation service; The information of each service includes at least one or more of the following information: information on whether the service is allowed to be interrupted, information on whether the service is allowed to be connected through a transit method, and information on the priority of the service.
12. The method according to any one of claims 8 to 11, characterized in that The configuration table is configured in a cloud server; the data stored in the configuration table is dynamically adjusted based on data fed back by users.
13. An electronic device, characterized in that: The electronic device includes: one or more processors, and a memory; The memory is coupled to the one or more processors, and the memory is used to store computer program codes, wherein the computer program codes include computer instructions, and the one or more processors call the computer instructions to enable the electronic device to perform the method according to any one of claims 1 to 12.
14. A chip system, characterized in that: The chip system is applied to an electronic device, and the chip system includes one or more processors, and the one or more processors are used to call computer instructions so that the electronic device executes the method as described in any one of claims 1 to 12.
15. A computer-readable storage medium, characterized in that: The computer-readable storage medium comprises instructions, which, when executed on an electronic device, enable the electronic device to perform the method as claimed in any one of claims 1 to 12.
Citation Information
Patent Citations
Network mode conflict resolution
CN105379181A
Connection method between devices and electronic device
CN117135767A
