Method and device for using network across devices

Forwarding and receiving network usage requests through the P2P near field communication channel solves the problem of conflict between network sharing services and P2P transmission functions in the traditional method, realizes efficient and automated operation of cross-device network usage, and improves user experience and traffic management.

CN117715014BActive Publication Date: 2024-10-18HONOR DEVICE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310937496.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-27
Publication Date
2024-10-18
Estimated Expiration
2043-07-27

AI Technical Summary

Technical Problem

In the traditional cross-device network usage method, there is a conflict between network sharing services and point-to-point data transmission functions, resulting in poor user experience and cumbersome operations, making it impossible to achieve the coexistence of the two at the same time.

Method used

Forward the network request and receive the response result through the point-to-point (P2P) near field communication channel, modify the routing table to realize the network routing use of the P2P channel, avoid manual access operations, and automatically switch services under traffic monitoring.

Benefits of technology

It realizes the coexistence of network and P2P data transmission functions, reduces user manual operations, improves user experience, and ensures seamless switching and cost control under traffic management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117715014B_ABST
    Figure CN117715014B_ABST
Patent Text Reader

Abstract

The present application provides a method and apparatus for cross-device network access, the method comprising: obtaining a network access request of a first application running on a first device; forwarding the network access request to a second device through a peer-to-peer (P2P) near-field communication channel, so as to respond to the network access request using the current network of the second device; receiving a response result to the network access request sent by the second device through a P2P near-field communication channel, and sending it to the first application. This solution mainly solves the problem of conflict between the two functions of hotspot network and P2P data transmission by allowing the first device to forward the network access request to the P2P channel, and then the second device responds after receiving the network access request. That is, P2P takes into account both network access and ordinary data transmission functions, so that both functions can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of cross-device network use, and more particularly to a method and apparatus for cross-device network use. Background Art

[0002] With the development of technology, there is a technical demand for cross-device Internet access. For example, device A can connect to the Internet, but device B may not be able to connect to the Internet due to insufficient funds or other reasons. Therefore, device A can share its network with device B, so that device B can access the Internet with the help of device A. For example, the WiFi hotspot function of a mobile phone is a function that allows the mobile phone to share its network with other devices, and other devices can access the Internet by accessing the mobile phone hotspot. However, the steps to join a hotspot are relatively cumbersome. Each time, you need to find and select the device that is sharing the hotspot, and enter the correct access password of the device corresponding to the selected hotspot before you can connect. The user experience is not friendly enough.

[0003] What is more serious is that after accessing the hotspot to access the Internet, the point-to-point (P2P) transmission between the two devices will be interrupted. For example, the P2P transmission can be the transmission of various types of data such as images and files between the two devices.

[0004] That is, there is a conflict between traditional network sharing services and peer-to-peer transmission.

[0005] Therefore, how to use the network more reasonably across devices to avoid conflicts between network use and point-to-point data transmission functions and enable the two to coexist is a technical problem that needs to be solved urgently. Summary of the invention

[0006] The present application provides a method and apparatus for using a network across devices, which can more reasonably use a network across devices to avoid conflicts between network use and point-to-point data transmission functions, allowing the two to coexist.

[0007] In a first aspect, a method for cross-device network access is provided, which is applied to a first device, and the method includes: obtaining a network access request of a first application running on the first device; forwarding the network access request to a second device through a point-to-point (P2P) near-field communication channel, so as to respond to the network access request using the current network of the second device; receiving a response result to the network access request sent by the second device through the P2P near-field communication channel, and sending it to the first application.

[0008] In the technical solution of the present application, the problem of the conflict between the hotspot network and P2P data transmission is solved mainly by allowing the first device to forward the network request to the P2P channel, and then the second device responds after receiving the network request. That is, P2P takes into account both network and ordinary data transmission functions, so that both functions can be realized. P2P transmission does not need to be manually selected and accessed every time. After the first successful connection, the transmission function can be automatically started as long as the two devices are close to each other. Compared with the traditional access hotspot, it saves the user the manual access operation every time. The key to solving the problem in the present application solution is to forward the network request and receive the response result through the P2P channel. It can be achieved by simply modifying the routing table and modifying the P2P channel into the routing table. This method is very simple and will not bring other effects that degrade the performance of the device.

[0009] In combination with the first aspect, in some implementations of the first aspect, before forwarding the network request through the P2P near field communication channel, the method further includes:

[0010] The network request obtained from the first application is routed to the P2P near field communication channel through the modified routing table of the first device; the modified routing table is used to forward any network request of any application of the first device to the P2P near field communication channel.

[0011] Modifying the routing table is equivalent to adding the P2P near-field communication channel to the network routing table. In the subsequent use of the network, the P2P near-field communication channel will also be used as a network route, thereby realizing the function of "borrowing the network" through the P2P near-field communication channel, that is, the function of using the network across devices, and realizing the same network sharing function as WiFi hotspot without causing the P2P connection to be disconnected.

[0012] In combination with the first aspect, in some implementations of the first aspect, the method further includes:

[0013] Acquire the data to be forwarded of the second application running on the first device; the data to be forwarded is used to represent any data that is not requested by the network and needs to be forwarded to the second device; forward the data to be forwarded to the second device through a P2P near field communication channel; or,

[0014] The forwarded data is received from the second device through the P2P near field communication channel, and the forwarded data is not requested through the network.

[0015] In this implementation, the process of conventional P2P data transmission is described. That is to say, in the solution of the embodiment of the present application, the P2P near-field communication channel can be used to forward network requests and receive network response results, and can also transmit other data besides network requests. It should be understood that network requests are unidirectional. In this application, the network request is made by the first device, and the second device responds. Conventional P2P data transmission is bidirectional, and the first device can transmit data to the second device, or the second device can transmit data to the first device.

[0016] In combination with the first aspect, in some implementations of the first aspect, before forwarding the network request through the P2P near field communication channel, the method further includes: establishing a P2P near field communication connection between the first device and the second device.

[0017] In other words, a P2P near-field communication connection must be established between two devices before the P2P near-field communication channel can be used to achieve cross-device networking.

[0018] In combination with the first aspect, in some implementations of the first aspect, the method further includes: monitoring the remaining traffic of the first device; when the remaining traffic of the first device is less than or equal to a preset remaining traffic threshold, starting the cross-device network service.

[0019] In this implementation, by monitoring traffic to trigger the start of the service, seamless switching can be achieved when the traffic of the first device is used up. The user no longer needs to manually connect to the hotspot, etc., and network disconnection due to traffic running out, or additional charges due to overuse of traffic, can be avoided.

[0020] In combination with the first aspect, in some implementations of the first aspect, the method further includes: obtaining a selection operation of a first control by a user on a first display interface of a first device, where the first control is used to indicate starting a cross-device network service;

[0021] In response to the selection operation, when the selection operation is to start the cross-device network service, the cross-device network service is started; or when the selection operation is not to start the cross-device network service, the cross-device network service is not started.

[0022] In this implementation, the user can independently choose whether to start the service.

[0023] In combination with the first aspect, in some implementations of the first aspect, the method further includes: obtaining a selection operation of a second control by a user on a second display interface of the first device, the second control being used to indicate disconnection of the cross-device network service;

[0024] In response to the selection operation, when the selection operation is to disconnect the cross-device network service, the cross-device network service is turned off; or, when the selection operation is not to disconnect the cross-device network service, the cross-device network service is not disconnected.

[0025] In this implementation, the user can independently choose whether to close / disconnect the service.

[0026] In conjunction with the first aspect, in some implementations of the first aspect, the first application is in a preset whitelist of cross-device network service. That is, by presetting the whitelist, only some specific approved applications can use the solution of the application to achieve cross-device network, avoiding traffic consumption of malware.

[0027] In conjunction with the first aspect, in some implementations of the first aspect, the P2P near field communication channel is a WiFi P2P channel. The WiFi P2P channel is currently the most commonly used and can be better applied to existing products.

[0028] In a second aspect, a method for cross-device network access is provided, which is applied to a second device, and the method includes: receiving a network access request from a first application of a first device through a point-to-point P2P near-field communication channel; responding to the network access request using the current network of the second device; and sending a response result to the network access request to the first device through the P2P near-field communication channel.

[0029] In the technical solution of the present application, the problem of the conflict between the hotspot network and P2P data transmission is solved mainly by allowing the first device to forward the network request to the P2P channel, and then the second device responds after receiving the network request. That is, P2P takes into account both network and ordinary data transmission functions, so that both functions can be realized. P2P transmission does not need to be manually selected and accessed every time. After the first successful connection, the transmission function can be automatically started as long as the two devices are close to each other. Compared with the traditional access hotspot, it saves the user the manual access operation every time. The key to solving the problem in the present application solution is to forward the network request and receive the response result through the P2P channel. It can be achieved by simply modifying the routing table and modifying the P2P channel into the routing table. This method is very simple and will not bring other effects that degrade the performance of the device.

[0030] It should be noted that the technical effects of the first aspect are also applicable to the second aspect.

[0031] In conjunction with the second aspect, in some implementations of the second aspect, before responding to the network request using the current network of the second device, the method further includes:

[0032] Through the modified routing table of the second device, the network request received from the P2P near-field communication channel is routed to the current network of the second device; the modified routing table is used to route any network request received by the second device through the P2P near-field communication channel to the current network of the second device.

[0033] Modifying the routing table is equivalent to adding the P2P near-field communication channel to the network routing table. In the subsequent use of the network, the P2P near-field communication channel will also be used as a network route, thereby realizing the function of "borrowing the network" through the P2P near-field communication channel, that is, the function of using the network across devices, and realizing the same network sharing function as WiFi hotspot without causing the P2P connection to be disconnected.

[0034] In conjunction with the second aspect, in some implementations of the second aspect, the method further includes:

[0035] Acquire the data to be forwarded of the second application running on the second device; the data to be forwarded is used to represent any data that is not requested by the network and needs to be forwarded to the first device; forward the data to be forwarded to the first device through the P2P near field communication channel; or,

[0036] The forwarded data is received from the first device through the P2P near field communication channel, and the forwarded data is not requested through the network.

[0037] In this implementation, the process of conventional P2P data transmission is described. That is to say, in the solution of the embodiment of the present application, the P2P near-field communication channel can be used to forward network requests and receive network response results, and can also transmit other data besides network requests. It should be understood that network requests are unidirectional. In this application, the network request is made by the first device, and the second device responds. Conventional P2P data transmission is bidirectional, and the first device can transmit data to the second device, or the second device can transmit data to the first device.

[0038] In conjunction with the second aspect, in some implementations of the second aspect, when responding to the network request using the current network of the second device, the method may include:

[0039] Check whether the first application is in a preset whitelist of the cross-device network service;

[0040] When the first application is in the preset whitelist, the current network of the second device is used to respond to the network request.

[0041] In conjunction with the second aspect, in certain implementations of the second aspect, before receiving the network access request, the method further includes: establishing a P2P near field communication connection between the first device and the second device. That is, only after the P2P near field communication connection is established between the two devices can the P2P near field communication channel be used to implement cross-device network access.

[0042] In conjunction with the second aspect, in some implementations of the second aspect, the method further includes: monitoring the remaining traffic of the second device; when the remaining traffic of the second device is less than or equal to a preset remaining traffic threshold, disconnecting the cross-device network service. In this implementation, traffic monitoring of the second device is added, because when the second device's own traffic has been used up, it means that it is no longer suitable to lend the network to other devices. Disconnecting the service at this time can prevent additional charges due to excessive traffic.

[0043] In combination with the second aspect, in some implementations of the second aspect, the method further includes: obtaining a selection operation of a user on a first control on a first display interface of a second device, the first control being used to indicate starting a cross-device network service;

[0044] In response to the selection operation, when the selection operation is to start the cross-device network service, the cross-device network service is started; or when the selection operation is not to start the cross-device network service, the cross-device network service is not started.

[0045] In this implementation, the user can independently choose whether to start the service.

[0046] In combination with the second aspect, in some implementations of the second aspect, the method further includes: obtaining a selection operation of a second control by a user on a second display interface of a second device, where the second control is used to indicate disconnection of the cross-device network service;

[0047] In response to the selection operation, when the selection operation is to disconnect the cross-device network service, the cross-device network service is turned off; or, when the selection operation is not to disconnect the cross-device network service, the cross-device network service is not disconnected.

[0048] In this implementation, the user can independently choose whether to close / disconnect the service.

[0049] In conjunction with the second aspect, in some implementations of the second aspect, the P2P near field communication channel is a WiFi P2P channel. The WiFi P2P channel is currently the most commonly used and can be better applied to existing products.

[0050] In conjunction with the second aspect, in some implementations of the second aspect, the current network of the second device is WiFi or a data network. That is, no matter whether the current network of the second device is WiFi or a data network, as long as the network request can be sent to the network, it is not necessary to limit the use of only one network.

[0051] According to a third aspect, a device for using a network across devices is provided, the device comprising a unit composed of software and / or hardware for executing any one of the methods of the first aspect or the second aspect.

[0052] In a fourth aspect, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the electronic device is enabled to implement any one of the methods of the first aspect or the second aspect.

[0053] In a fifth aspect, a chip is provided, comprising a processor, wherein the processor is used to read and execute a computer program stored in a memory, and when the computer program is executed by the processor, the electronic device where the chip is located can implement any one of the methods of the first aspect or the second aspect.

[0054] Optionally, the chip also includes a memory, and the memory is electrically connected to the processor.

[0055] Optionally, the chip may also include a communication interface.

[0056] In a sixth aspect, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by an electronic device, any one of the methods of the first aspect or the second aspect can be implemented.

[0057] In a seventh aspect, a computer program product is provided, which includes a computer program, and when the computer program is executed by an electronic device, it can implement any one of the methods of the first aspect or the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 It is a schematic comparison diagram of the interaction process between devices in a cross-device network.

[0059] Figure 2 It is a schematic diagram of a system architecture of an embodiment of the present application.

[0060] Figure 3 It is a schematic flowchart of a method for using the Internet across devices according to an embodiment of the present application.

[0061] Figure 4 It is a schematic diagram of a method for using WiFi hotspots to achieve cross-device Internet access.

[0062] Figure 5 It is a schematic flowchart of another method for using the Internet across devices according to an embodiment of the present application.

[0063] Figure 6 It is a schematic flowchart of another method for using the Internet across devices according to an embodiment of the present application.

[0064] Figure 7 It is a schematic diagram of the execution process of the first device in a method for using a network across devices in an embodiment of the present application.

[0065] Figure 8 It is a schematic diagram of the execution process of the first device in a method for using a network across devices in an embodiment of the present application.

[0066] Fig. 9 It is a schematic diagram of the execution process of the second device in a method for using a network across devices in an embodiment of the present application.

[0067] Fig.10 It is a schematic diagram of the execution process of the first device in a method for using a network across devices in an embodiment of the present application.

[0068] Fig.11 It is a schematic diagram of the execution process of the second device in a method for using a network across devices in an embodiment of the present application.

[0069] Fig.12 It is a schematic diagram of the execution process of a method for using a network across devices according to an embodiment of the present application.

[0070] Fig.13 It is a schematic diagram of an execution process of triggering disconnection of a cross-device network service on a second device side in an embodiment of the present application.

[0071] Fig.14 It is a schematic diagram of an execution process of triggering disconnection of a cross-device network service on a first device side in an embodiment of the present application.

[0072] Fig.15 It is a schematic diagram of an execution process of disconnecting a cross-device network service due to an exception in an embodiment of the present application.

[0073] Fig.16 It is a schematic diagram of a device authentication process in an embodiment of the present application.

[0074] Fig.17 This is a schematic diagram of an interface for opening and closing a network sharing service in the present application.

[0075] Fig.18 It is a schematic diagram of an apparatus for using a network across devices according to an embodiment of the present application.

[0076] Fig.19It is a schematic diagram of another apparatus for using a network across devices according to an embodiment of the present application.

[0077] Fig. 20 It is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application.

[0078] Fig.21 It is a schematic diagram of the hardware structure of another electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0079] The solution of the embodiment of the present application is introduced below in conjunction with the accompanying drawings. The method for cross-device network use provided by the present application can be applied to various scenarios where cross-device network use is required.

[0080] Figure 1 This is a schematic comparison diagram of the interaction process between devices in a cross-device network. Figure 1 As shown, device #1 is mainly taken as an in-vehicle terminal (car computer), a laptop or a tablet computer, but it should be understood that device #1 refers to the party that needs to "borrow the network" in the cross-device network, that is, the borrower. As long as the condition is met, it can also be a mobile phone, smart bracelet, or any other device with Internet access and support for near-field communication such as WiFi. Device #2 is mainly taken as an example of a mobile phone, but it should be understood that device #2 refers to the party that "provides the network" in the cross-device network, that is, the borrower. As long as the condition is met, it can also be other electronic devices such as a laptop computer that can insert a card to access the Internet.

[0081] exist Figure 1 In the example, device #1 wants to connect to the network with the help of device #2. For example, device #1 wants to download a song, but wants to download it with the help of device #2's data.

[0082] If the traditional solution is adopted, that is, method 1, by accessing the WiFi hotspot provided by device #1, the network request will be directly transmitted to device #2 through the small network formed by this hotspot, and then sent to the network through the wireless network (mainly WiFi) or data network (that is, the mobile network provided by each operator) of device #2, and receive the response result from the network, which is the download of the song data packet.

[0083] However, due to the conflict between WiFi hotspot and P2P channel transmission, after successfully connecting to the WiFi hotspot, there is no way to use the P2P channel transmission function. And each time you join the hotspot, it is a tedious manual operation process.

[0084] In response to the above problems, this application solves the above conflict problem by allowing device #1 to forward the network request to the P2P channel, and then device #2 responds after receiving the network request. That is, P2P takes into account both network usage and ordinary data transmission, so that both functions can be realized. P2P transmission does not need to be manually selected and connected every time. After the first successful connection, the transmission function can be automatically started as long as the two devices are close to each other. Compared with the traditional access hotspot, it saves the user the manual access operation every time.

[0085] The key to solving the problem in this application solution is to forward network requests and receive response results through P2P channels. This can be achieved by simply modifying the routing table and modifying the P2P channel into the routing table. This method is very simple and will not affect the performance of other devices.

[0086] Figure 2 Schematic diagram of a system architecture of an embodiment of the present application. Figure 2 As shown, the application layer includes three applications (apps) including settings, system interaction and system applications. In the settings application, feature switches can be added to enable the network sharing service to be disconnected, started, etc., as well as monitoring and traffic limit settings. System interaction can provide users with visual status notifications or signal bar displays, so that users know some status related to the cross-device network service, such as whether two devices are connected. System applications provide scenario-based control center shortcut switches. For example, a selection interface can be provided to users, allowing users to choose whether to enable the cross-device navigation service.

[0087] The framework layer (eg, framework layer and service layer) includes, for example, a network server (HnSystemServer), a network collaboration service (NetworkSynergyService), a network process service (OemNetdService), and a network management (networkManage).

[0088] The framework layer has no user-perceived interface and is mainly responsible for routing switching and traffic query of network sharing services.

[0089] HnSystemServer shows the network sharing service (NerworkSharingService), device management (magiclink device management, devicemanagersdk-inDevice.arr), network channel (magiclink network management, NetworkSynergy.arr) and temperature control module (AwareSdkEx).

[0090] NetworkSynergyService shows the network collaboration server (NetworkSynergyServer) and the network collaboration client (NetworkSynergyClient).

[0091] The arp proxy protocol (arp proxy) is shown in OemNetdService.

[0092] In networkManage, ip forwarding is shown.

[0093] The hardware layer includes hardware modules such as related drivers as an example.

[0094] It should be understood that Figure 2 This is just an exemplary structure. In practice, there may be other modules and there is no limitation.

[0095] In the solution of the embodiment of the present application, the application layer mainly involves automatic connection (Auto) smart travel services, which interact with network sharing services and MagicLink, and handle the interaction processes related to the interface (UI) layer. A network sharing service (NetWorkSharingService) has been added to the framework layer to handle processes related to the network sharing service, including channel establishment, gateway settings, etc. At the service layer, the MagicLink service middle station is mainly used to receive information from the business layer and the framework layer, establish a connection with the peer device, and transmit data.

[0096] Figure 3 is a schematic flow chart of a method for using a network across devices in an embodiment of the present application. Figure 3 Each step is introduced. The first device can be Figure 1 Device #1 in the example, the second device can be Figure 1 Device #2 in the example, for more information, see Figure 1 , no further details are given. In order to facilitate understanding of the solution, the following mainly takes the case where the first device is a vehicle-mounted terminal (vehicle computer) and the second device is a mobile phone terminal (mobile phone) as an example.

[0097] S301. A first device obtains a network request of a first application running on the first device.

[0098] The first application can be any application that generates network demand and can generate network requests, such as browser applications, video sharing applications, shopping applications, chat applications, etc., which are not listed one by one. Applications that do not need to connect to the network will not generate network requests (that is, requests to access the network) and will not be considered as the first application. For applications that are not running, network requests will not be generated, so here we mainly obtain network requests from running applications.

[0099] The acquisition method may be, for example, that a network request sent by a third-party application (an example of the first application) is received by the network channel module.

[0100] In one implementation, the first application is in a preset whitelist of the cross-device network service. That is, by presetting the whitelist, only certain approved applications can use the solution of the application to achieve cross-device network use, thereby avoiding traffic consumption of malware.

[0101] S302, the first device forwards the network request to the second device through the P2P near field communication channel, so as to respond to the network request using the current network of the second device; the second device receives the network request from the first application of the first device through the P2P near field communication channel.

[0102] In one implementation, the P2P near field communication channel is a WiFi P2P channel, which is currently the most commonly used channel and can be better applied to existing products.

[0103] In one implementation, a P2P near field communication channel is used to establish a network sharing channel between network channel modules of the first device and the second device, and then the data (here, the network request) of this step is transmitted using the network sharing channel.

[0104] In one implementation, before forwarding the network request through the P2P near-field communication channel, the above method also includes: routing the network request obtained from the first application to the P2P near-field communication channel through a modified routing table of the first device; the modified routing table is used to forward any network request of any application of the first device to the P2P near-field communication channel.

[0105] Modifying the routing table is equivalent to adding the P2P near-field communication channel to the network routing table. In the subsequent use of the network, the P2P near-field communication channel will also be used as a network route, thereby realizing the function of "borrowing the network" through the P2P near-field communication channel, that is, the function of using the network across devices, and realizing the same network sharing function as WiFi hotspot without causing the P2P connection to be disconnected.

[0106] In one implementation, the method further includes:

[0107] Acquire the data to be forwarded of the second application running on the first device; the data to be forwarded is used to represent any data that is not requested by the network and needs to be forwarded to the second device; forward the data to be forwarded to the second device through a P2P near field communication channel; or,

[0108] The forwarded data is received from the second device through the P2P near field communication channel, and the forwarded data is not requested through the network.

[0109] In this implementation, the process of conventional P2P data transmission is described. That is to say, in the solution of the embodiment of the present application, the P2P near-field communication channel can be used to forward network requests and receive network response results, and can also transmit other data besides network requests. It should be understood that network requests are unidirectional. In this application, the network request is made by the first device, and the second device responds. Conventional P2P data transmission is bidirectional, and the first device can transmit data to the second device, or the second device can transmit data to the first device.

[0110] For an introduction to the two functions, please refer to Fig.12 content, in Fig.12 Two channels established based on P2P are shown in the figure. The P2P connection channel is a regular P2P channel, and the network sharing channel is used to transmit network requests and response results.

[0111] In one implementation, before forwarding the network request through the P2P near field communication channel, that is, before step S302, the method further includes: establishing a P2P near field communication connection between the first device and the second device.

[0112] That is to say, after the P2P near field communication connection is established between the two devices, the P2P near field communication channel can be used to realize cross-device network use. The establishment process will be detailed below and will not be repeated here.

[0113] In one implementation, the method further includes: monitoring the remaining traffic of the first device; when the remaining traffic of the first device is less than or equal to a preset remaining traffic threshold, starting the cross-device network service.

[0114] In this implementation, by monitoring the traffic to trigger the start of the service, it is possible to achieve seamless switching when the traffic of the first device is used up, and the user no longer needs to manually connect to the hotspot, etc., and avoid network disconnection due to running out of traffic, or additional fees due to over-use of traffic. Figure 8 and Fig. 9 An example of the specific execution process of monitoring traffic is given in FIG.

[0115] S303: The second device responds to the network request using the current network of the second device.

[0116] In one implementation, the current network of the second device is WiFi or a data network. That is, no matter whether the current network of the second device is WiFi or a data network, as long as the network request can be sent to the network, it is not necessary to limit the use of only one network.

[0117] In one implementation, step S303 may include: checking whether the first application is in a preset whitelist of the cross-device network service; when the first application is in the preset whitelist, responding to the network request using the current network of the second device. That is, by presetting the whitelist, only some specific approved applications can use the solution of the application to achieve cross-device network use, thereby avoiding traffic consumption of malware.

[0118] In one implementation, before responding to the network request using the current network of the second device, that is, before step S303, the method further includes:

[0119] Through the modified routing table of the second device, the network request received from the P2P near-field communication channel is routed to the current network of the second device; the modified routing table is used to route any network request received by the second device through the P2P near-field communication channel to the current network of the second device.

[0120] Modifying the routing table is equivalent to adding the P2P near-field communication channel to the network routing table. In the subsequent use of the network, the P2P near-field communication channel will also be used as a network route, thereby realizing the function of "borrowing the network" through the P2P near-field communication channel, that is, the function of using the network across devices, and realizing the same network sharing function as WiFi hotspot without causing the P2P connection to be disconnected.

[0121] In one implementation, the method further includes:

[0122] Acquire the data to be forwarded of the second application running on the second device; the data to be forwarded is used to represent any data that is not requested by the network and needs to be forwarded to the first device; forward the data to be forwarded to the first device through the P2P near field communication channel; or,

[0123] The forwarded data is received from the first device through the P2P near field communication channel, and the forwarded data is not requested through the network.

[0124] In this implementation, the process of conventional P2P data transmission is described. That is to say, in the solution of the embodiment of the present application, the P2P near-field communication channel can be used to forward network requests and receive network response results, and can also transmit other data besides network requests. It should be understood that network requests are unidirectional. In this application, the network request is made by the first device, and the second device responds. Conventional P2P data transmission is bidirectional, and the first device can transmit data to the second device, or the second device can transmit data to the first device.

[0125] S304. The second device sends a response result to the network request to the first device through the P2P near field communication channel; the first device receives the response result to the network request sent by the second device through the P2P near field communication channel, and sends it to the first application.

[0126] In one implementation, the method further includes: monitoring the remaining traffic of the second device; when the remaining traffic of the second device is less than or equal to a preset remaining traffic threshold, disconnecting the cross-device network service. In this implementation, traffic monitoring of the second device is added, because when the second device's own traffic has been used up, it means that it is no longer suitable to lend the network to other devices. Disconnecting the service at this time can prevent additional charges due to excessive traffic.

[0127] Figure 3 The method may further include providing the user with the ability to autonomously choose to activate and / or deactivate the service.

[0128] In one implementation, the method further includes: obtaining a selection operation of a user on a first display interface of a first device on a first control, the first control being used to indicate starting a cross-device network service; in response to the selection operation, when the selection operation is to start the cross-device network service, starting the cross-device network service; or, when the selection operation is not to start the cross-device network service, not starting the cross-device network service. In this implementation, the user can independently choose whether to start the service.

[0129] In another implementation, a selection operation of a user on a second display interface of a first device on a second control is obtained, and the second control is used to indicate disconnecting the cross-device network service; in response to the selection operation, when the selection operation is to disconnect the cross-device network service, the cross-device network service is closed; or when the selection operation is not to disconnect the cross-device network service, the cross-device network service is not disconnected. In this implementation, the user can independently choose whether to close / disconnect the service.

[0130] In one implementation, the method further includes: obtaining a selection operation of a first control by a user on a first display interface of a second device, the first control being used to indicate starting a cross-device network service;

[0131] In response to the selection operation, when the selection operation is to start the cross-device network service, the cross-device network service is started; or when the selection operation is not to start the cross-device network service, the cross-device network service is not started.

[0132] In this implementation, the user can independently choose whether to start the service.

[0133] In another implementation, the method further includes: obtaining a selection operation of a second control by a user on a second display interface of a second device, the second control being used to indicate disconnection of the cross-device network service;

[0134] In response to the selection operation, when the selection operation is to disconnect the cross-device network service, the cross-device network service is turned off; or, when the selection operation is not to disconnect the cross-device network service, the cross-device network service is not disconnected.

[0135] In this implementation, the user can independently choose whether to close / disconnect the service.

[0136] Figure 3 The scheme shown mainly solves the problem of the conflict between the hotspot network and P2P data transmission by allowing the first device to forward the network request to the P2P channel, and then the second device responds after receiving the network request. That is, P2P takes into account both network and ordinary data transmission functions, so that both functions can be realized. P2P transmission does not need to be manually selected and accessed every time. After the first successful connection, the transmission function can be automatically started as long as the two devices are close to each other. Compared with the traditional access hotspot, it saves the user the manual access operation every time. The key to solving the problem in the present application is to forward the network request and receive the response result through the P2P channel. It can be achieved by simply modifying the routing table and modifying the P2P channel into the routing table. This method is very simple and will not bring other effects that degrade the performance of the device.

[0137] Figure 4 This is a schematic diagram of a method for using WiFi hotspots to achieve cross-device Internet access. Figure 4 Each step is introduced. That is, Figure 4 It is a traditional network sharing solution.

[0138] Under the premise that the super mode (modem) switch is turned on, the mobile phone and the vehicle computer are successfully connected by Bluetooth for the first time. Then steps S401-S405 can be executed.

[0139] S401, the vehicle computer sends a request to the mobile phone to open the WiFi hotspot.

[0140] S402: The mobile phone obtains the selection operation of whether to open the hotspot performed by the user through the pop-up window.

[0141] S403. The mobile phone saves the user's selection operation. If the user selects "agree to open the hotspot", the hotspot is opened. Otherwise, if the user does not select "agree to open the hotspot", the hotspot is not opened.

[0142] S404: The mobile phone sends WiFi hotspot information or an indication of request failure to the vehicle computer.

[0143] When the user selects "Agree to open hotspot", the WiFi hotspot information is sent. When the user does not select "Agree to open hotspot", an indication of request failure is sent.

[0144] S405. The vehicle computer connects to the mobile phone hotspot according to the WiFi hotspot information or displays the indication according to the indication of request failure.

[0145] Under the premise that the super modem switch is turned on, the mobile phone and the vehicle computer are successfully reconnected through Bluetooth, and then steps S406-S410 can be executed.

[0146] S406. The vehicle computer attempts to connect to a mobile phone hotspot that has been successfully connected in the past.

[0147] S407: The vehicle computer sends a request to the mobile phone to open the WiFi hotspot.

[0148] S408. If there is a record of historical consent to the vehicle-machine connection, the mobile phone turns on the hotspot; if there is no record of historical consent to the vehicle-machine connection, the mobile phone obtains the user's selection operation of whether to turn on the hotspot through a pop-up window; and the mobile phone saves the user's selection operation. If the user selects "agree to turn on the hotspot", the hotspot is turned on. Otherwise, if the user does not select "agree to turn on the hotspot", the hotspot is not turned on.

[0149] S409: The mobile phone sends WiFi hotspot information or an indication of request failure to the vehicle computer.

[0150] When the user selects "Agree to open hotspot", the WiFi hotspot information is sent. When the user does not select "Agree to open hotspot", an indication of request failure is sent.

[0151] S410: The vehicle computer connects to the mobile phone hotspot according to the WiFi hotspot information or displays the indication according to the indication of request failure.

[0152] It can be seen that the traditional solution of connecting to a hotspot, whether it is the first successful connection or not, requires a hotspot opening request, user manual selection, connection and other processes to complete. However, the solution of this application does not require such selection and repeated operations. Figure 4The disadvantage of the method shown is that when the hotspot is successfully connected, the P2P connection between the mobile phone and the car will be disconnected. Different from this, the solution of the present application does not have such a conflict, the original P2P connection will not be disconnected, and network sharing can be achieved, that is, cross-device Internet access.

[0153] Figure 5 It is a schematic flowchart of another method for using the Internet across devices according to an embodiment of the present application. Figure 5 It can be seen as Figure 3 An example of the scheme shown is shown below. Figure 5 Each step is introduced. The car computer can be regarded as Figure 1 The example of device #1 in the example can also be seen as an example of the first device, and the mobile phone can be seen as Figure 1 Device #2 in the figure can also be considered as an example of a second device.

[0154] First, you need to establish a BR long connection between the car and the mobile phone. BR long connection is a Bluetooth long connection, which can be regarded as an example of a near-field communication channel.

[0155] S501. The vehicle computer sends a network sharing request to the mobile phone through a near field communication channel.

[0156] S502: Establish a WiFi P2P connection between the vehicle computer and the mobile phone.

[0157] That is, steps S501 - S502 are examples of steps of establishing a P2P near field communication connection.

[0158] S503: The vehicle computer modifies the routing table and forwards all network requests to the P2P connection channel.

[0159] That is, an example of the steps of modifying a routing table and forwarding a network request using the modified routing table.

[0160] S504: The vehicle computer obtains a network request of any app on the vehicle computer.

[0161] That is, this is an example of the step of obtaining a network request from the first application, an example of step S301.

[0162] S505: The vehicle computer sends a network request to the mobile phone through the P2P connection channel.

[0163] This can be regarded as an example of step S302.

[0164] S506: The mobile phone forwards the received network request to the current network of the mobile phone (wireless network WiFi or data network).

[0165] This can be regarded as an example of step S303.

[0166] S507. The mobile phone returns a response result of the network request to the vehicle computer through the P2P connection channel.

[0167] This can be regarded as an example of step S304.

[0168] It can be seen that the present application mainly changes the forwarding channel of the network request through the operation of step S503, so that the network request can be sent and the response result can be received by using the P2P connection channel.

[0169] Figure 6 It is a schematic flowchart of another method for using the Internet across devices according to an embodiment of the present application. Figure 6 It can be seen as Figure 3 or Figure 5 An example of the scheme shown is shown below. Figure 6 Each step is introduced. The car computer can be regarded as Figure 1 The example of device #1 in the example can also be seen as an example of the first device, and the mobile phone can be seen as Figure 1 Device #2 in the figure can also be considered as an example of a second device.

[0170] First, you need to establish a BR long connection between the car and the mobile phone. BR long connection is a Bluetooth long connection, which can be regarded as an example of a near-field communication channel.

[0171] S601. The Bluetooth module in the vehicle computer sends a notification of successful Bluetooth connection to the network channel (magiclink) module in the vehicle computer.

[0172] S602: The network channel in the vehicle computer sends a Bluetooth device online notification to the network sharing service (NerworkSharingService) in the vehicle computer.

[0173] S603: The NetworkSharingService in the vehicle computer sends a Bluetooth device online notification to the network sharing service of the application layer in the vehicle computer.

[0174] S604: The network sharing service in the vehicle computer performs an Internet access detection.

[0175] The Internet access detection includes detecting whether the local device supports Internet access and detecting whether the peer device supports Internet access.

[0176] S605: The network sharing service in the vehicle computer provides the user with a choice of whether to enable the network sharing service.

[0177] This may include determining whether it is the first connection, and then asking the user whether to enable the network sharing service through a pop-up window or the like, and obtaining the user's selection operation.

[0178] S606: The network sharing service in the vehicle computer pulls up the network sharing service to the NeworkSharingService in the vehicle computer.

[0179] S607: The network sharing service in the vehicle computer requests the NetworkSharingService in the vehicle computer to establish a network sharing channel.

[0180] S608. The NetworkSharingService in the vehicle computer requests the network channel in the vehicle computer to establish a P2P channel.

[0181] S609. In response to the establishment request in step S608, a P2P channel is established between the network channel in the mobile phone and the network channel in the vehicle computer.

[0182] S610: The network channel in the mobile phone requests the NetworkSharingService in the mobile phone to establish a P2P channel.

[0183] S611. The network channel in the mobile phone broadcasts a network sharing request to the automatic connection module in the mobile phone.

[0184] S612: The automatic connection module in the mobile phone registers the network sharing service with the network channel in the mobile phone.

[0185] S613: The network channel in the vehicle computer sends a message to the NeuralSharingService in the vehicle computer indicating that the P2P channel is successfully established.

[0186] S614. The NetworkSharingService in the vehicle computer sends a message that the P2P channel is successfully established to the network sharing service in the vehicle computer.

[0187] S615. The network channel in the mobile phone sends a message to the NetworkSharingService in the mobile phone indicating that the P2P channel is successfully established.

[0188] S616. The NetworkSharingService in the vehicle computer sends a network sharing command to the network channel in the vehicle computer.

[0189] S617: The network channel in the vehicle computer sends the network sharing command to the network channel in the mobile phone through the P2P channel.

[0190] S618. The network channel in the mobile phone sends the network sharing command to the NetworkSharingService in the mobile phone.

[0191] S619. The network channel in the mobile phone sends a notification of successful network sharing to the NeuralSharingService in the mobile phone.

[0192] S620: The network channel in the vehicle computer sends a notification of successful network sharing to the NetworkSharingService in the vehicle computer.

[0193] S621. The NetworkSharingService in the vehicle computer sends a network sharing success message to the network sharing service in the vehicle computer.

[0194] S622. The network sharing service in the vehicle computer sends setting configuration information to the NetworkSharingService in the vehicle computer.

[0195] The configuration information can be expressed as (switchStartus, whiteList), where switchStartus indicates enabling sharing, and whiteList indicates applying a whitelist.

[0196] S623. The NeuralSharingService in the vehicle computer saves the configuration information and adds the P2P channel to the network routing table.

[0197] S624, network sharing service storage device information in the vehicle computer.

[0198] S625. The network sharing service in the vehicle computer updates the displayed content on the interface.

[0199] Steps S601-S625 are steps in the setting stage, and the following steps S631-S642 are the execution steps of the specific Internet access process after the setting is completed. Steps S631-S642 can be regarded as an example of steps S301-S304.

[0200] S631. A third-party application on the vehicle computer (an example of a first application on a first device) sends a network request to the NetworkSharingService in the vehicle computer.

[0201] This can be regarded as an example of step S301.

[0202] S632. The NetworkSharingService in the vehicle computer determines whether to forward the network request to the P2P channel based on the configuration information.

[0203] That is to say, if the car computer itself has a network and can access the Internet, the configuration information is not the above configuration and the modified routing table, and there is no need to use the mobile phone to access the Internet. In this case, it is not forwarded to the P2P channel, but forwarded to the actual network route. If the configuration information indicates that the routing table has been modified and the P2P channel has been added to the routing table, it will be forwarded to the P2P channel.

[0204] S633. The NeuralSharingService in the vehicle computer sends a network request from a third-party application to the network channel in the vehicle computer.

[0205] S634: The network channel in the vehicle sends the network request to the network channel in the mobile phone through the P2P channel.

[0206] Steps S632-S634 can be regarded as an example of step S302.

[0207] S635. The network channel in the mobile phone reports the network request event to the NetworkSharingService in the mobile phone.

[0208] S636. The NetworkSharingService in the mobile phone forwards the network request to the current network (wireless WiFi or data network) on the mobile phone.

[0209] Steps S635-S636 can be regarded as an example of step S303.

[0210] S637. The NetworkSharingService in the mobile phone sends a network response result notification of the network request to the network channel in the mobile phone.

[0211] S638. The network channel in the mobile phone sends a network response result notification of the network request to the network channel in the vehicle computer through the P2P channel.

[0212] S639. The network channel in the vehicle computer sends a network response result notification of the network request to the NetworkSharingService in the vehicle computer.

[0213] S640. The NetworkSharingService in the vehicle computer sends a network response result notification of the network request to the third-party application in the vehicle computer.

[0214] S641. The NetworkSharingService in the vehicle computer updates the traffic to the network sharing service in the vehicle computer.

[0215] S642. The NetworkSharingService in the mobile phone sends a network response result notification of the network request to the automatic connection module in the mobile phone.

[0216] Steps S637-S642 can be considered as an example of step S304.

[0217] Figure 7 It is a schematic diagram of the execution process of the first device in a method for using a network across devices in an embodiment of the present application. Figure 7 Take the first device as a car computer as an example.

[0218] For car computers, some car computers support free system traffic for life, while media and entertainment applications are charged separately when using traffic. At the same time, considering the system information security issues, car manufacturers may not want to forward network requests for system applications. This application provides a "share all network requests" switch on the car computer side, that is, a switch to start or disconnect the network sharing service, for car manufacturers to customize adaptation. When the network sharing channel (the P2P near-field communication channel in this application) is successfully established, the network sharing service sets the switch status of "share all network requests" and the application whitelist to NetWorkSharingService. The car manufacturer decides whether to forward all network requests based on internal specifications. If the switch is turned on and the application requesting to use the network is not in the whitelist, the network sharing service on the car computer side will forward all network requests to the P2P channel by default, including navigation, music, video and other third-party applications; if the switch is turned off, only network requests for non-system applications are forwarded to the P2P channel by default, except when the application is in the whitelist control list.

[0219] S701. The automatic connection module sends a device online notification to the NerworkSharingService module.

[0220] S702: The automatic connection module sends a device online notification to the network sharing service module.

[0221] S703: The network sharing service module queries the vehicle computer equipment information management module whether the vehicle computer can access the Internet.

[0222] S704. The vehicle equipment information management module returns the query result to the network sharing service module.

[0223] S705: The network sharing service module queries the automatic connection module whether the peer device can access the Internet.

[0224] The peer end may be, for example, a mobile phone.

[0225] S706: The network sharing service module receives the query result returned by the automatic connection module as to whether the peer device can access the Internet.

[0226] S707: The network sharing service module queries the automatic connection module whether it is the first time to connect to the opposite device.

[0227] S708: The network sharing service module receives a query result returned by the automatic connection module as to whether the connection is made for the first time.

[0228] If it is the first connection, execute steps S709-S710; if it is not the first connection, execute step S711.

[0229] S709: The network sharing service prompts the user to confirm whether to enable the network sharing service by means of a pop-up window.

[0230] When the operation input by the user indicates to start (activate) the network sharing service, step S710 is executed.

[0231] S710. The network sharing service pulls up the network sharing service to NerworkSharingService.

[0232] S711. The network sharing service pulls up the network sharing service to NerworkSharingService.

[0233] S712. The network sharing service receives a notification of successful establishment of a network sharing channel (in this application, the P2P near field communication channel performs this function) from the NetworkSharingService.

[0234] S713. The network sharing service sends configuration information to NerworkSharingService.

[0235] The configuration information can be expressed as (switchStartus, whiteList), where switchStartus indicates enabling sharing, and whiteList indicates applying a whitelist.

[0236] Figure 7 It can be seen as an example of the steps of establishing P2P near-field communication and starting a network sharing service.

[0237] Figure 8 It is a schematic diagram of the execution process of the first device in a method for using a network across devices in an embodiment of the present application. Figure 8 Take the first device as a car computer as an example. Figure 8 It can be seen as how to trigger whether to enable the network sharing service through traffic monitoring.

[0238] S801. The automatic connection module sends a device online notification to the NerworkSharingService module.

[0239] S802: The automatic connection module sends a device online notification to the network sharing service module.

[0240] S803, the network sharing service module queries the vehicle computer equipment information management module whether the vehicle computer can access the Internet.

[0241] S804. The vehicle equipment information management module returns the query result to the network sharing service module.

[0242] Steps S801-S804 may refer to steps S701-S704 respectively.

[0243] S805. The network sharing service module queries the vehicle computer equipment information management module for the vehicle computer traffic limit.

[0244] S806. The vehicle equipment information management module returns the query result to the network sharing service module.

[0245] S807. The network sharing service module sets traffic monitoring to the vehicle equipment information management module.

[0246] S808. The vehicle equipment information management module returns a traffic change notification to the network sharing service module.

[0247] Figure 8 The solution shown mainly describes how to introduce traffic monitoring into the network sharing service process, and steps S805-S808 are steps for setting up related settings to monitor traffic changes.

[0248] S809: The network sharing service module queries the automatic connection module whether the peer device can access the Internet.

[0249] S810: The network sharing service module receives a query result returned by the automatic connection module as to whether the peer device can access the Internet.

[0250] S811. The network sharing service module queries the automatic connection module whether it is the first time to connect to the opposite device.

[0251] S812: The network sharing service module receives a query result returned by the automatic connection module as to whether the connection is made for the first time.

[0252] When it is the first connection, first execute step S813 and then execute step S814; if it is not the first connection, directly execute step S814.

[0253] S813: The network sharing service prompts the user to confirm whether to enable the network sharing service by displaying a pop-up window.

[0254] When the operation input by the user indicates to open (start) the network sharing service, step S814 is executed.

[0255] S814. The network sharing service monitors the changes in the vehicle-machine traffic flow, and determines whether the vehicle-machine traffic flow has reached the maximum value or whether the remaining traffic flow of the vehicle-machine traffic has reached the minimum value. When the judgment result is yes, execute step S815.

[0256] When the maximum value of the vehicle computer traffic is set, the monitoring process is to monitor whether the traffic is greater than or equal to the maximum value. If it is greater than or equal to the maximum value, it means that the network of this machine (vehicle computer) can no longer be used, and it is necessary to borrow the network from a second device such as a mobile phone. If the traffic does not reach the maximum value, it means that the network of this machine can still be used, and in this case, it is not necessary to borrow the network.

[0257] When the remaining flow threshold of the vehicle computer flow is set, the monitoring process is to monitor whether the flow is less than or equal to the remaining flow threshold. If it is less than or equal to the remaining flow, it means that the network of this machine (vehicle computer) can no longer be used, and it is necessary to borrow the network from a second device such as a mobile phone. If the flow is not greater than the remaining flow threshold, it means that the network of this machine can still be used, and in this case, it is not necessary to borrow the network.

[0258] S815. The network sharing service obtains the user's operation on whether to agree to use network sharing; when the operation is to agree to use, that is, to start the cross-device network service (network sharing service), execute steps S816-S818; when the operation is not to agree to use, that is, not to start the cross-device network service, execute step S819.

[0259] S816. The network sharing service pulls up the network sharing service to NerworkSharingService.

[0260] S817. The network sharing service receives a notification from the NetworkSharingService that a network sharing channel (in this application, a channel multiplexing for P2P near field communication) is successfully established.

[0261] S818. The network sharing service sends configuration information to NerworkSharingService.

[0262] The configuration information can be expressed as (switchStartus, whiteList), where switchStartus indicates enabling sharing, and whiteList indicates applying a whitelist.

[0263] S819, end.

[0264] Figure 8 This is an example of setting parameters and executing the process of starting a network sharing service (cross-device network service) by monitoring traffic changes. It can be seen from steps S814-S819 that when it is detected that the remaining traffic of the device is insufficient and a unified operation of the user is received, the cross-device sharing service provided by this application is started, and other steps of cross-device sharing are executed.

[0265] Fig. 9 It is a schematic diagram of the execution process of the second device in a method for using a network across devices in an embodiment of the present application. Fig. 9 Take the first device as a car computer as an example. Fig. 9 It can be seen as how to trigger the process of whether to start the second device in the network sharing service by monitoring the traffic.

[0266] S901. NerworkSharingService broadcasts a network sharing request to the network sharing service.

[0267] S902. The network sharing service registers a network sharing service listener with NerworkSharingService.

[0268] S903. NerworkSharingService returns a notification of successful network sharing to the network sharing service.

[0269] Steps S901-S903 are steps for setting up the network sharing service (inter-device network service).

[0270] S904: The network sharing service displays a notification of successful network sharing to the user by updating the UI.

[0271] Step S904 is mainly to provide the user with the current service status visible to the user.

[0272] S905. NerworkSharingService sends a traffic change notification to the network sharing service.

[0273] It can be seen that, for monitoring traffic changes, the steps that the second device needs to perform are relatively simple, and it only needs to synchronously update the traffic changes.

[0274] On the vehicle side (first device side), NetWorkSharingService interacts with Magiclink through session. When the application layer requests to use the network, it calls the Android native interface and finally interacts with NetWorkSharingService through request id, request body and callback. When the network sharing channel is successfully established, the vehicle network sharing service sets configuration information to NetWorkSharingService, including the switch status and whitelist of all network information. After receiving the set configuration information, NetWorkSharingService stores it and adds the network sharing P2P to the route. When receiving the network sharing request of the application, it determines whether the network request needs to be forwarded to the P2P connection according to the configuration information. The judgment specification is that for non-system applications, if the application requesting the network is not in the whitelist, it is forwarded to the shared network by default; for system applications, if the switch is turned on and it is not in the whitelist, it is forwarded to the shared network. For other scenarios, the vehicle's own traffic is used to access the Internet. When the network response result is received, it is returned to the corresponding application according to the request information.

[0275] Combine the following Fig.10 Introduce the above content.

[0276] Fig.10 It is a schematic diagram of the execution process of the first device in a method for using a network across devices in an embodiment of the present application. Fig.10 Take the first device as a car computer as an example.

[0277] S1001, the vehicle network sharing service pulls up the network sharing service to the NerworkSharingService.

[0278] S1002. The vehicle network sharing service requests the NetworkSharingService to establish a network sharing channel.

[0279] S1003. NerworkSharingService requests the network channel to establish a P2P channel.

[0280] S1004. The network channel sends a message to NerworkSharingService indicating that the P2P channel is successfully established.

[0281] S1005. NerworkSharingService sends a message to the network sharing service that the P2P channel is successfully established.

[0282] S1006. NerworkSharingService sends a network sharing command to the network channel.

[0283] S1007. The network channel sends a notification of successful establishment of the network sharing channel to NerworkSharingService.

[0284] S1008. NerworkSharingService sends a notification of successful establishment of a network sharing channel to the network sharing service.

[0285] S1009. The network sharing service sets configuration information to NerworkSharingService.

[0286] The configuration information can be expressed as (switchStartus, whiteList), where switchStartus indicates enabling sharing, and whiteList indicates applying a whitelist.

[0287] S1010. NerworkSharingService saves the configuration information.

[0288] S1011, NerworkSharingService adds the P2P channel to the network routing table.

[0289] S1012. A third-party application on the vehicle computer (an example of a first application on a first device) sends a network request to NeuralSharingService.

[0290] This can be regarded as an example of step S301.

[0291] S1013. NetworkSharingService determines whether to forward the network request to the P2P channel according to the configuration information.

[0292] That is to say, if the car computer itself has a network and can access the Internet, the configuration information is not the above configuration and the modified routing table, and there is no need to use the mobile phone to access the Internet. In this case, it is not forwarded to the P2P channel, but forwarded to the actual network route. If the configuration information indicates that the routing table has been modified and the P2P channel has been added to the routing table, it will be forwarded to the P2P channel.

[0293] S1014. NerworkSharingService sends a network request from a third-party application to the network channel.

[0294] S1015. The network channel sends a network response result notification corresponding to the network request received from the second device to the Network Sharing Service.

[0295] S1016. NetworkSharingService sends a network response result notification corresponding to the network request to the third-party application.

[0296] For the mobile phone side (second device side), one mobile phone can support the access of multiple car computers, so a distinguishable identifier can be added to the car computer. That is, different IDs are used for identification of different car computers.

[0297] When the mobile phone has established multiple network sharing channels, different IDs are used to uniquely identify different vehicle network sharing requests. When the mobile phone receives the vehicle network request, it will forward the vehicle network request to the network to which the current mobile phone is connected, and record the request ID. After receiving the network response result, it will be sent to the corresponding vehicle according to the ID and the traffic usage will be updated. Fig.11 Make an introduction.

[0298] Fig.11 It is a schematic diagram of the execution process of the second device in a method for using a network across devices in an embodiment of the present application. Fig.11 For example, the second device is a mobile phone and the number of vehicle computers that can be connected is one or more.

[0299] S1101. The network channel requests NerworkSharingService to establish a network sharing service, and the request carries the ID of the vehicle computer from which the request originated.

[0300] S1102. NerworkSharingService returns a response result to the network channel.

[0301] S1103. The network channel sends a notification of successful establishment of the network sharing channel to NeworkSharingService, and the notification carries the ID of the vehicle computer.

[0302] S1104. The network channel sends the received network request (network request) to NeuralSharingService, and the request carries the ID of the vehicle computer.

[0303] S1105. NerworkSharingService forwards the network request to the currently connected network.

[0304] S1106. NerworkSharingService sends a response result of the network request to the network channel, and the response result carries the ID of the vehicle computer.

[0305] S1107. NerworkSharingService reads the traffic value from the network management (Netd).

[0306] S1108. NerworkSharingService receives the return result of the traffic value from Netd.

[0307] For the service layer, the service layer is mainly responsible for the establishment of P2P connections and data transmission. It needs to add new network channel coordination services and provide aar to the upper network sharing services. Fig.12 Make an introduction.

[0308] Fig.12 It is a schematic diagram of the execution process of a method for using a network across devices according to an embodiment of the present application. Fig.12 The main purpose is to explain the steps that the service layer module participates in executing in the solution of the embodiment of the present application, that is, the steps executed by the WiFi driver (Driver) module.

[0309] First, you need to establish a BR long connection between the car and the mobile phone. BR long connection is a Bluetooth long connection, which can be regarded as an example of a near-field communication channel.

[0310] S1201. The Bluetooth module in the mobile phone sends a notification of successful Bluetooth connection to the network channel module in the mobile phone.

[0311] S1202: The Bluetooth module in the vehicle computer sends a notification of successful Bluetooth connection to the network channel module in the vehicle computer.

[0312] S1203: The NetworkSharingService in the vehicle computer requests the network channel in the vehicle computer to establish a P2P channel.

[0313] S1204: The network channel in the vehicle computer sends a request to the Bluetooth module to establish a P2P channel with the opposite device.

[0314] S1205: Establish a P2P connection between the WiFi driver in the mobile phone and the WiFi driver in the vehicle computer.

[0315] It should be understood that this is a conventional P2P connection, not a connection for network sharing, but a P2P connection for near field communication.

[0316] S1206: The WiFi driver in the mobile phone sends a notification of successful P2P channel establishment to the network channel in the mobile phone.

[0317] S1207: The network channel in the mobile phone sends a notification of successful P2P channel establishment to the NetworkSharingService in the mobile phone.

[0318] S1208. The WiFi driver in the vehicle computer sends a notification of successful P2P channel establishment to the network channel in the vehicle computer.

[0319] S1209: The network channel in the vehicle computer sends a notification of successful P2P channel establishment to the NeuralSharingService in the vehicle computer.

[0320] S1210. The NetworkSharingService in the vehicle computer sends a network sharing command to the network channel in the vehicle computer.

[0321] S1211. Establish a network sharing channel between the network channel in the vehicle computer and the network channel in the mobile phone.

[0322] Although the network sharing channel reuses the P2P channel, the shared channel is between two network channels, not between two WiFi drivers.

[0323] S1212. The network channel in the mobile phone sends a notification of successful establishment of the network sharing channel to the NerworkSharingService in the mobile phone.

[0324] S1213: The network channel in the vehicle computer sends a notification of successful establishment of the network sharing channel to the NeworkSharingService in the vehicle computer.

[0325] S1214. The NetworkSharingService in the vehicle computer sends data to the network channel in the vehicle computer.

[0326] S1215. The network channel in the vehicle computer and the network channel in the mobile phone transmit data through the network sharing channel.

[0327] S1216. The network channel in the mobile phone sends the data received through the network sharing channel to the NeuralSharingService in the mobile phone.

[0328] S1217. The NetworkSharingService in the mobile phone sends data to the network channel in the mobile phone.

[0329] S1218. The network channel in the vehicle computer and the network channel in the mobile phone transmit data through the network sharing channel.

[0330] S1219. The network channel in the vehicle computer sends the data received through the network sharing channel to the NeworkSharingService in the vehicle computer.

[0331] It can be seen that although the embodiment of the present application reuses the P2P channel to realize network sharing, the specific implementation of the service layer is different from that of conventional P2P. When the data is sent to the network channel in steps S1214 and S1217, the data in the network channel will be transmitted between the two network channel modules through the network sharing channel. Conventional P2P data transmission is to establish a channel between two WiFi driver modules for data transmission.

[0332] Users can also choose to disconnect the network sharing service according to their own needs, or trigger the disconnection of the network sharing service when a network anomaly occurs, the distance between the two devices becomes farther, resulting in the disconnection of near-field communication, or any other possible reasons.

[0333] Fig.13 It is a schematic diagram of an execution process of triggering disconnection of a cross-device network service on a second device side in an embodiment of the present application. Fig.13 For example, the second device is a mobile phone and the first device is a car computer.

[0334] like Fig.13 As shown, the mobile phone side can provide a button to disconnect the WiFi-P2P service (an example of the second control). After the user clicks the disconnect service button, the network sharing service senses the user's intention and executes the service disconnection operation; after the network channel on the mobile phone side receives the disconnection notification, it executes the P2P disconnection operation, and feeds back the execution result to the upper-level network sharing service, and updates the status in the UI interface to prompt the user; after the network channel on the vehicle side senses that the underlying link has been disconnected, it notifies the upper-level network sharing service of the status change and updates the UI on the vehicle side to prompt the user.

[0335] Fig.14 It is a schematic diagram of an execution process of triggering disconnection of a cross-device network service on a first device side in an embodiment of the present application. Fig.14 For example, the second device is a mobile phone and the first device is a car computer.

[0336] like Fig.14 As shown, the vehicle side can provide a button to disconnect the WiFi-P2P service (an example of the second control). After the user clicks the disconnect service button, the network sharing service perceives the user's intention and performs the service disconnection operation; after the network channel on the vehicle side receives the disconnection notification, it performs the P2P disconnection operation, and feeds back the execution result to the upper-level network sharing service, and updates the status in the UI interface to prompt the user; after the network channel on the mobile phone side perceives that the underlying link has been disconnected, it notifies the upper-level network sharing service of the status change and updates the UI on the mobile phone side to prompt the user.

[0337] Fig.15 It is a schematic diagram of an execution process of disconnecting a cross-device network service due to an exception in an embodiment of the present application. Fig.15 For example, the second device is a mobile phone and the first device is a car computer.

[0338] like Fig.15 As shown in the figure, when the underlying P2P physical link is abnormally disconnected, the network channel modules on the mobile phone side and the vehicle side promptly perceive this change and notify the upper-level network sharing service; after the network sharing services on the mobile phone side and the vehicle side receive the notification from the network channel, they update the status and notify the upper-level UI of the change.

[0339] In order to protect the safety of the device, the safety authentication of the device can also be performed before executing the embodiment of the present application. Fig.16 An introduction to the certification process.

[0340] Fig.16 Schematic diagram of a device authentication process in an embodiment of the present application. A mobile phone is an example of a second device, and a vehicle computer is an example of a first device.

[0341] S1601. The network sharing service of the vehicle computer sends a notification of Bluetooth broadcasting to the network channel of the vehicle computer.

[0342] S1602: The network channel of the vehicle computer sends information notifying the Bluetooth module of the vehicle computer to send a Bluetooth broadcast.

[0343] S1603: The network sharing service of the vehicle computer sets a callback to the network channel of the vehicle computer.

[0344] S1604: The network sharing service of the vehicle computer sets device authentication information to the network channel of the vehicle computer.

[0345] S1605. The network channel of the mobile phone sends a scan start message to the Bluetooth module of the mobile phone.

[0346] S1606. The network channel of the mobile phone receives a notification of discovering a Bluetooth device from the Bluetooth module of the mobile phone.

[0347] S1607, the network channel of the mobile phone detects whether the peer device has been authenticated. When the result is authenticated, execute steps S1608-S1609; when the result is not authenticated, execute S1610-S1619.

[0348] S1608. The network channel of the mobile phone sends a device online notification to the NerworkSharingService and automatic connection module of the mobile phone.

[0349] S1609, the network channel of the vehicle computer sends a device online notification to the NerworkSharingService, network sharing service and vehicle computer interconnection service of the vehicle computer.

[0350] S1610. The network channel of the mobile phone pulls up the travel service to the automatic connection module of the mobile phone.

[0351] S1611. The automatic connection module of the mobile phone detects whether the mobile phone has logged into the account. When the detection result is not logged in, step S1612 is executed first and then step S1613; when the detection result is logged in, step S1612 is not executed and step S1613 is executed directly.

[0352] S1612. The automatic connection module of the mobile phone jumps to the account login page through the user account module.

[0353] S1613. The automatic connection module of the mobile phone detects whether the peer device has been authenticated.

[0354] S1614. The automatic connection module of the mobile phone detects whether there is a device using the network sharing service.

[0355] S1615. A pop-up window is displayed requesting the user to authorize the peer device to enter the ring.

[0356] When the detection result of step S1613 is that there is no authentication, the detection result of step S1614 is that it is not in use, and the user selects authorization to enter the ring in step S1615, step S1616 can be executed.

[0357] S1616. The automatic connection module of the mobile phone opens device authentication to the network channel of the mobile phone.

[0358] S1617: The device authentication information is transmitted between the network channel of the mobile phone and the network channel of the vehicle computer through network sharing to complete the device authentication.

[0359] S1618. The network channel of the mobile phone sends a device online notification to the NerworkSharingService and automatic connection module of the mobile phone.

[0360] S1619, the network channel of the vehicle computer sends a device online notification to the vehicle computer's NetworkSharingService, network sharing service and vehicle computer interconnection service.

[0361] The user triggers the Bluetooth signal to be sent on the vehicle side. After the mobile phone detects the Bluetooth signal, it first identifies whether it is a known device. If it is a known device, it directly reports the device online notification to the automatic connection module; if the Bluetooth signal of the vehicle is an unknown device, it reports the Bluetooth signal of the vehicle to the automatic connection module. After the automatic connection module receives the vehicle signal, it first detects whether the local device has logged in to the account. If the account has not been logged in, it needs to remind the user to log in first. If the account has been logged in, it needs to detect whether the other device has been authenticated. The authenticated device directly ends the process; the unauthenticated device needs to go through the first authentication process. During the authentication process, the automatic connection module sets a unique identifier for each stage through the state machine to mark the current state of the vehicle. The states of different vehicle machines may be different. When a vehicle enters an abnormal state, the user is prompted through the UI. The automatic connection module requests user authorization and prompts the user that the current vehicle is requesting to join the network. Whether to allow it. After the user authorizes, the mobile phone and vehicle sides perform the device authentication process. After the authentication is successful, the user is notified that the device is online and the network sharing service can be enabled.

[0362] Fig.17 This is a schematic diagram of an interface for opening and closing a network sharing service in this application. Fig.17 As shown in the middle interface 1701, the interface shows a prompt message reminding the user whether to turn on the service, and provides a selection control, "turn on" and "cancel" option bars. Interface 1701 can be regarded as an example of the first display interface described above, and the "turn on" and / or "cancel" option bars can be regarded as an example of the first control. Assuming that the user clicks "turn on", the network sharing service can be started.

[0363] like Fig.17 As shown in the middle interface 1702, the interface shows a prompt message reminding the user whether to disconnect the service, and provides a selection control, "Disconnect" and "Cancel" option bars. Interface 1702 can be regarded as an example of the second display interface described above, and the "Disconnect" and / or "Cancel" option bars can be regarded as an example of the second control. Assuming that the user clicks "Disconnect", the network sharing service can be disconnected / turned off.

[0364] The above mainly introduces the method of the embodiment of the present application in conjunction with the accompanying drawings. It should be understood that although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence, these steps are not necessarily performed in sequence in the order shown in the figure. Unless clearly stated in this article, there is no strict order restriction on the execution of these steps, and these steps can be performed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the various embodiments described above may include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with other steps or at least a part of the steps or stages in other steps. The device of the embodiment of the present application is introduced below in conjunction with the accompanying drawings.

[0365] Fig.18 Schematic diagram of a device for using a network across devices in an embodiment of the present application. Fig.18 As shown, the device 2000 includes an acquisition unit 2001, a processing unit 2002 and a transceiver unit 2003. The device 2000 can be integrated in an electronic device such as a vehicle-mounted terminal, a tablet computer, a touch-screen laptop computer, etc. The device 2000 can be integrated in any first device of the present application, such as the above-mentioned device #1, a vehicle computer.

[0366] The device 2000 can be used to execute the steps executed by the first device in any of the above-mentioned methods for using a network across devices. For example, the acquisition unit 2001 can be used to execute step S301, and the transceiver unit 2003 can be used to execute steps S302 and S304. For another example, the transceiver unit 2003 can be used to execute steps S501, S502, S505, and S507, the processing unit 2002 can be used to execute step S503, and the acquisition unit 2001 can be used to execute step S504. The device 2000 can also be used to execute Figure 6-Figure 16 The steps performed by the first device in are not repeated here.

[0367] In one implementation, the apparatus 2000 may further include a storage unit for storing relevant data. The storage unit may be integrated in any one of the above units, or may be a unit independent of all the above units.

[0368] Fig.19 FIG. 1 is a schematic diagram of another cross-device network access device according to an embodiment of the present application. Fig.19 As shown, the device 3000 includes a transceiver unit 3001 and a processing unit 3002. The device 3000 can be integrated in an electronic device such as a mobile phone, a tablet computer, a touch-screen laptop computer, etc. The device 3000 can be integrated in any second device of the present application, such as the above-mentioned device #2, a mobile phone, and Fig.21 In the device 100.

[0369] The device 3000 can be used to execute the steps executed by the second device in any of the above-mentioned methods for using a network across devices. For example, the transceiver unit 3001 can be used to execute steps S302 and S304, and the processing unit can be used to execute step S303. For another example, the transceiver unit 3001 can be used to execute steps S501, S502, S505, and S507, and the processing unit 3002 can be used to execute step S506. The device 2000 can also be used to execute Figure 6-Figure 16 The steps performed by the second device in will not be repeated here.

[0370] In one implementation, the apparatus 3000 may further include a storage unit for storing relevant data. The storage unit may be integrated in any one of the above units, or may be a unit independent of all the above units.

[0371] Fig. 20 Schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application. Fig. 20 As shown, the electronic device 4000 includes: at least one processor 4001 ( Fig. 20 Only one is shown in the figure) a processor, a memory 4002, and a computer program 4003 stored in the memory 4002 and executable on the at least one processor 4001, and when the processor 4001 executes the computer program 4003, the steps in any one of the above methods are implemented.

[0372] Those skilled in the art will understand that Fig. 20 These are merely examples of electronic devices and do not constitute a limitation on the electronic device. In practice, the electronic device may include more or fewer components than those shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.

[0373] The processor 4001 may be a central processing unit (CPU), other general-purpose processors, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0374] In some embodiments, the memory 4002 may be an internal storage unit of the electronic device 4000, such as a hard disk or memory of the electronic device 4000. In other embodiments, the memory 4002 may also be an external storage device of the electronic device 4000, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 4000. Optionally, the memory 4002 may also include both an internal storage unit of the electronic device 4000 and an external storage device. The memory 4002 is used to store an operating system, an application program, a boot loader, data, and other programs, such as the program code of the computer program. The memory 4002 may also be used to temporarily store data that has been output or is to be output.

[0375] Fig.21 Schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application. Fig.21 As shown, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. 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.

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

[0377] For example, Fig.21The processor 110 shown may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.

[0378] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0379] 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.

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

[0381] In some embodiments, the I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). The processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the electronic device 100.

[0382] In some embodiments, the I2S interface can be used for audio communication. The processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170.

[0383] In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface to implement the function of answering calls through a Bluetooth headset.

[0384] In some embodiments, the PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. The audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface.

[0385] In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface to implement the function of answering calls through a Bluetooth headset. It should be understood that both the I2S interface and the PCM interface can be used for audio communication.

[0386] In some embodiments, the UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. The UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.

[0387] In some embodiments, the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. The processor 110 and the camera 193 communicate via the CSI interface to realize the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate via the DSI interface to realize the display function of the electronic device 100.

[0388] In some embodiments, the GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. The GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0389] Exemplarily, the USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.

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

[0391] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.

[0392] 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 external memory, 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, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

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

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

[0395] The mobile communication module 150 can provide a wireless communication solution applied to the electronic device 100, such as at least one of the following solutions: a second generation (2G) mobile communication solution, a third generation (3G) mobile communication solution, a fourth generation (5G) mobile communication solution, and a fifth generation (5G) mobile communication solution. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, and perform filtering and amplification on the received electromagnetic waves, and then transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modulation and demodulation processor, and the amplified signal is converted into electromagnetic waves and radiated out through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be arranged in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be arranged in the same device as at least some of the modules of the processor 110.

[0396] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

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

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

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

[0400] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Mini-LED, Micro-Led, Micro-oLed, quantum dot light-emitting diodes (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0401] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0402] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.

[0403] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0404] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0405] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0406] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0407] The external memory interface 120 can be used to connect an external memory card, such as a secure digital (SD) card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0408] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0409] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170 , the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0410] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.

[0411] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.

[0412] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.

[0413] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to microphone 170C to input the sound signal into microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.

[0414] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0415] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example, when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.

[0416] The gyroscope sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., the x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyroscope sensor 180B can also be used for navigation and somatosensory game scenes.

[0417] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.

[0418] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover according to the magnetic sensor 180D; according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, set the flip cover automatic unlocking and other features.

[0419] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.

[0420] The distance sensor 180F is used to measure the distance. The electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.

[0421] The proximity light sensor 180G may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The light-emitting diode may be an infrared light-emitting diode. The electronic device 100 emits infrared light outward through the light-emitting diode. The electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.

[0422] The ambient light sensor 180L is used to sense the ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.

[0423] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.

[0424] The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 reduces the performance of a processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 performs a boost on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.

[0425] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.

[0426] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone block of the vocal part of the human body. The bone conduction sensor 180M can also contact the human pulse to receive a blood pressure beat signal. In some embodiments, the bone conduction sensor 180M can also be set in an earphone and combined into a bone conduction earphone. The audio module 170 can parse out a voice signal based on the vibration signal of the vibrating bone block of the vocal part obtained by the bone conduction sensor 180M to realize a voice function. The application processor can parse the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M to realize a heart rate detection function.

[0427] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.

[0428] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0429] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0430] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.

[0431] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0432] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0433] An embodiment of the present application also provides an electronic device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein when the processor executes the computer program, the electronic device can implement the steps in any of the above methods.

[0434] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by an electronic device, the steps in the above-mentioned method embodiments can be implemented.

[0435] An embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed by an electronic device, the steps in the above-mentioned method embodiments can be implemented.

[0436] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the camera / electronic device, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0437] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0438] 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.

[0439] In the embodiments provided in the present application, it should be understood that the disclosed devices / equipment and methods can be implemented in other ways. For example, the device / equipment embodiments described above are merely schematic, for example, the division of the modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0440] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0441] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0442] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0443] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0444] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0445] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0446] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for using a network across devices, applied to a first device, characterized in that: include: Obtaining a network request of a first application running on the first device; Routing the network request obtained from the first application to a peer-to-peer P2P near field communication channel through the modified routing table of the first device; The modified routing table is used to forward any network request of any application of the first device to the P2P near field communication channel; the modified routing table is obtained by adding the P2P near field communication channel to the network routing table in the network sharing service NerworkSharingService; the P2P near field communication channel is a WiFiP2P channel; Forwarding the network request to the second device through the P2P near field communication channel, so as to respond to the network request using the current network of the second device; A response result to the network request sent by the second device is received through the P2P near field communication channel, and sent to the first application.

2. The method according to claim 1, characterized in that The method further comprises: Acquire data to be forwarded of a second application running on the first device; the data to be forwarded is used to represent any data that is not requested by a network and needs to be forwarded to the second device; forward the data to be forwarded to the second device through the P2P near field communication channel; or, The forwarded data is received from the second device through the P2P near field communication channel, and the forwarded data is not a network request.

3. The method according to claim 1, characterized in that Before forwarding the network request through the P2P near field communication channel, the method further includes: A P2P near field communication connection is established between the first device and the second device.

4. The method according to claim 1, characterized in that: The method further comprises: monitoring the remaining traffic of the first device; When the remaining traffic of the first device is less than or equal to a preset remaining traffic threshold, the cross-device network service is started.

5. The method according to claim 1, characterized in that The method further comprises: Acquire a selection operation of a first control by a user on a first display interface of the first device, where the first control is used to instruct to start a cross-device network service; In response to the selection operation, when the selection operation is to start the cross-device network service, the cross-device network service is started; or when the selection operation is not to start the cross-device network service, the cross-device network service is not started.

6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: Acquire a selection operation of a second control by a user on a second display interface of the first device, where the second control is used to indicate disconnection of a cross-device network service; In response to the selection operation, when the selection operation is to disconnect the cross-device network service, the cross-device network service is closed; or when the selection operation is not to disconnect the cross-device network service, the cross-device network service is not disconnected.

7. The method according to any one of claims 1 to 5, characterized in that The first application is in a preset whitelist of cross-device Internet services.

8. A method for using a network across devices, applied to a second device, characterized in that: include: Receiving a network request from a first application of a first device through a peer-to-peer P2P near field communication channel; The P2P near field communication channel is a WiFi P2P channel; The network request received from the P2P near field communication channel is routed to the current network of the second device through the modified routing table of the second device; the modified routing table is used to route any network request received by the second device through the P2P near field communication channel to the current network of the second device; the modified routing table is obtained by adding the P2P near field communication channel to the network routing table in the network sharing service NerworkSharingService; Using the current network of the second device, responding to the network request; A response result to the network request is sent to the first device through a P2P near field communication channel.

9. The method according to claim 8, characterized in that The method further comprises: Acquire data to be forwarded of a second application running on the second device; the data to be forwarded is used to represent any data that is not requested by the network and needs to be forwarded to the first device; forward the data to be forwarded to the first device through the P2P near field communication channel; or, The forwarded data is received from the first device through the P2P near field communication channel, and the forwarded data is not a network request.

10. The method according to claim 8, characterized in that The using the current network of the second device to respond to the network request includes: Checking whether the first application is in a preset whitelist of the cross-device network service; When the first application is in the preset whitelist, the current network of the second device is used to respond to the network request.

11. The method according to claim 8, characterized in that Before receiving the network request, the method further includes: A P2P near field communication connection is established between the first device and the second device.

12. The method according to claim 8, characterized in that The method further comprises: monitoring the remaining traffic of the second device; When the remaining traffic of the second device is less than or equal to a preset remaining traffic threshold, the cross-device network service is disconnected.

13. The method according to claim 8, characterized in that The method further comprises: Acquire a selection operation of a first control by a user on a first display interface of the second device, where the first control is used to instruct to start a cross-device network service; In response to the selection operation, when the selection operation is to start the cross-device network service, the cross-device network service is started; or when the selection operation is not to start the cross-device network service, the cross-device network service is not started.

14. The method according to any one of claims 8 to 13, characterized in that The method further comprises: Acquire a selection operation of a second control by a user on a second display interface of the second device, where the second control is used to indicate disconnection of a cross-device network service; In response to the selection operation, when the selection operation is to disconnect the cross-device network service, the cross-device network service is closed; or when the selection operation is not to disconnect the cross-device network service, the cross-device network service is not disconnected.

15. The method according to any one of claims 8 to 13, characterized in that The current network of the second device is WiFi or a data network.

16. A system for using a network across devices, characterized in that: The system includes a first device and a second device; the first device is used to execute the steps performed by the first device in the method described in any one of claims 1 to 15; the second device is used to execute the steps performed by the second device in the method described in any one of claims 1 to 15.

17. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the electronic device implements the method as claimed in any one of claims 1 to 7; or, when the processor executes the computer program, the electronic device implements the method as claimed in any one of claims 8 to 15.

18. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by an electronic device, the method according to any one of claims 1 to 7 is implemented; or, when the computer program is executed by an electronic device, the method according to any one of claims 8 to 15 is implemented.

Citation Information

Patent Citations

  • Data transmission method and device

    CN111328054A