A network traffic sharing method and an electronic device
By sharing traffic and signals between electronic devices, network access problems caused by insufficient cellular network or poor signal are solved, and convenient network access and improved communication convenience are achieved.
Patent Information
- Application Number
- CN202110337839.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-30
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2041-03-30
AI Technical Summary
In some special scenarios, electronic devices cannot access the Internet due to insufficient cellular network traffic or poor signal, and existing traffic sharing solutions become inapplicable in actual applications.
Through a network traffic sharing method, the first electronic device is connected to a plurality of second electronic devices, obtains the remaining resource information and cellular signal strength of each device, determines a plurality of traffic sharing schemes, and selects a target scheme that meets the constraints of specific modes to realize traffic sharing.
This method allows electronic devices with insufficient cellular traffic or poor signal to achieve convenient network access by sharing traffic and signals with surrounding devices and improving the convenience of device communication.
Smart Images

Figure CN115150884B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of terminals, and in particular, to a network traffic sharing method and an electronic device. Background Art
[0002] With the progress of technology, technologies such as artificial intelligence, the Internet of Things, and big data have developed rapidly, and the demand for mobile communication traffic has increased explosively. At the same time, the number of electronic devices has also increased sharply. However, in some special scenarios, some electronic devices may be temporarily unable to access the Internet through the cellular network due to insufficient cellular network traffic of their own or poor cellular network signals of the accessed cellular network. If there are other electronic devices in the same geographical area as this electronic device at this time, then the electronic device without cellular traffic or with poor cellular network signals can send a traffic sharing request to the traffic sharing server, and the traffic sharing server can select other electronic devices with sufficient traffic or better signals to provide data sharing services for it, so as to enable the electronic device without cellular traffic or with poor cellular signals to access the Internet normally.
[0003] However, some electronic devices are very likely to be unable to send a traffic sharing request to the traffic sharing server due to exhausted cellular traffic or poor cellular signals, resulting in the inapplicability of the existing traffic sharing scheme in actual applications. Summary of the Invention
[0004] This application provides a network traffic sharing method and an electronic device, so as to enable an electronic device with insufficient cellular traffic or poor cellular network signals to conveniently access the network by means of other surrounding electronic devices.
[0005] In a first aspect, an embodiment of this application provides a network traffic sharing method, which can be applied to a first electronic device. The first electronic device is connected to N - 1 second electronic devices. The method includes:
[0006] N - 1 second electronic devices send status messages to a first electronic device, where the status message of any one of the second electronic devices is used to characterize the remaining resource information of the second electronic device; the first electronic device obtains a traffic sharing mode; then, the first electronic device obtains the remaining resource information of the N - 1 second electronic devices from the status messages of the N - 1 second electronic devices, and obtains the remaining resource information of the first electronic device; the first electronic device determines M traffic sharing schemes according to the remaining resource information of the N - 1 second electronic devices, the remaining resource information of the first electronic device, and the traffic sharing mode, where M is a positive integer. The first electronic device determines a target traffic sharing scheme that meets the constraint conditions corresponding to the traffic sharing mode from the M traffic sharing schemes; finally, the first electronic device sends a notification message to the N - 1 second electronic devices, and the notification message is used to indicate the target traffic sharing scheme, and the first electronic device and the N - 1 second electronic devices complete traffic sharing within the network according to the target traffic sharing scheme.
[0007] In the embodiments of the present application, the above method is used to enable electronic devices with insufficient cellular traffic or poor cellular network signals to conveniently access the network by means of other surrounding electronic devices, improving the convenience of device communication.
[0008] In a possible design, the remaining resource information of the second electronic device includes: the remaining power of the second electronic device and / or the remaining computing resources of the second electronic device. The remaining resource information of the first electronic device includes: the remaining power of the second electronic device and / or the remaining computing resources of the second electronic device.
[0009] In a possible design, when the second electronic device has cellular communication capabilities, the status message of the second electronic device is also used to characterize: one or more of the cellular signal strength of the second electronic device or the remaining network traffic of the second electronic device; when the first electronic device has cellular communication capabilities, the first electronic device obtains the cellular signal strength of the first electronic device, and the remaining resources of the first electronic device further include: the remaining network traffic of the first electronic device. The first electronic device can determine M traffic sharing schemes according to the remaining resource information of the N - 1 second electronic devices, the remaining resource information of the first electronic device, and the cellular signal strength of the first electronic device.
[0010] In a possible design, the traffic sharing mode includes one or more of the network quality optimal mode, the longest battery life mode, and the most efficient traffic utilization mode; the constraint condition corresponding to the network quality optimal mode is that the target traffic sharing scheme enables each electronic device in the device group to use the cellular communication capability provided by the electronic device with the best cellular signal. The device group consists of a first electronic device and N - 1 second electronic devices; the constraint condition corresponding to the longest battery life mode is that the target traffic sharing scheme enables the longest working time for each electronic device in the device group to work simultaneously; the constraint condition corresponding to the most efficient traffic utilization mode is that the target traffic sharing scheme enables the remaining network traffic of each electronic device in the device group to be evenly distributed. This method can flexibly share the cellular communication capabilities and cellular traffic of the electronic devices in the device group, with a wider range of applicable scenarios and stronger applicability.
[0011] In a possible design, the first electronic device constructs a mathematical model corresponding to the traffic sharing mode according to the remaining resource information of the N - 1 second electronic devices, the remaining resource information of the first electronic device, and the traffic sharing mode; calculates the global optimal solution of the mathematical model, and determines the target traffic sharing scheme according to the global optimal solution. This method can efficiently solve for the optimal solution.
[0012] In a possible design, the first electronic device can specifically detect the distance between the N - 1 second electronic devices and the first electronic device; in response to detecting that the distance between the first electronic device and the N - 1 second electronic devices is less than a preset distance, the first electronic device sends a notification message to the N - 1 second electronic devices. This method can filter out electronic devices that are far away from the first electronic device, which helps to improve the security of communication.
[0013] In a possible design, the first electronic device detecting the distance between the N - 1 second electronic devices and the first electronic device includes: detecting the distance between the N - 1 second electronic devices and the first electronic device through Bluetooth positioning technology, ultra-wideband UWB positioning technology, or WiFi positioning technology. This method helps to accurately locate the distance between electronic devices.
[0014] In a possible design, the connection between the first electronic device and the N - 1 second electronic devices includes: the first electronic device establishes a connection with the N - 1 second electronic devices through a short-range wireless communication protocol; wherein, the short-range wireless communication protocol includes one or more of the WiFi communication protocol, the UWB communication protocol, the Bluetooth communication protocol, the ZigBee communication protocol, or the NFC protocol.
[0015] In a possible design, the first electronic device and the second electronic device may log in to the same account or associated accounts, and the same account or associated accounts may be any one of an instant messaging account, an email account, and a mobile phone number.
[0016] In a second aspect, an embodiment of the present application provides a network traffic sharing method, which is applied to a second electronic device. N - 1 second electronic devices are connected to a first electronic device. The method includes: The second electronic device sends a message to the first electronic device. The status message of the second electronic device is used to characterize the remaining resource information of the second electronic device. The first electronic device determines a target traffic sharing scheme according to the remaining resource information of the N - 1 second electronic devices, the remaining resource information of the first electronic device, and the traffic sharing mode selected by the user. The second electronic device receives a notification message from the first electronic device and, according to the target traffic sharing scheme, uses the cellular transmission capability of other electronic devices or provides the cellular transmission capability to other electronic devices. The other electronic devices are any one or more of the N electronic devices including the N - 1 second electronic devices and the first electronic device except the second electronic device itself.
[0017] In a possible design, the remaining resource information of the second electronic device may include: the remaining battery power of the second electronic device and / or the remaining computing resources of the second electronic device.
[0018] In a possible design, when the second electronic device has cellular communication capabilities, the status message of the second electronic device is further used to characterize one or more of the cellular signal strength of the second electronic device or the remaining network traffic of the second electronic device.
[0019] In a possible design, the traffic sharing mode may include, but is not limited to, one or more of the network quality optimal mode, the longest battery life mode, and the most efficient traffic utilization mode; where:
[0020] The constraint condition corresponding to the network quality optimal mode is: the target traffic sharing scheme enables each electronic device in the device group to use the cellular communication capability provided by the electronic device with the best cellular signal. The device group is composed of the first electronic device and the N - 1 second electronic devices;
[0021] The constraint condition corresponding to the longest battery life mode is: the target traffic sharing scheme enables the longest working time for each electronic device in the device group to work simultaneously;
[0022] The constraint condition corresponding to the most efficient traffic utilization mode is: the target traffic sharing scheme enables the remaining network traffic of each electronic device in the device group to be evenly distributed.
[0023] In a third aspect, an embodiment of the present application provides a first electronic device, including a touch screen, a processor, and a memory. The memory is used to store one or more computer programs. When the one or more computer programs stored in the memory are executed by the processor, the first electronic device can implement the method of any possible design in any of the above aspects.
[0024] In a fourth aspect, an embodiment of the present application provides a second electronic device, including a touch screen, a processor, and a memory. The memory is used to store one or more computer programs. When the one or more computer programs stored in the memory are executed by the processor, the second electronic device can implement the method of any possible design in any of the above aspects.
[0025] In a fifth aspect, an embodiment of the present application provides a communication system, which may include the first electronic device as shown in the third aspect, and at least one second electronic device as shown in the fourth aspect.
[0026] In a sixth aspect, an embodiment of the present application further provides a device, which includes a module / unit for executing the method of any possible design in the first aspect above, and / or includes a module / unit for executing the method of any possible design in the second aspect above. These modules / units can be implemented by hardware or by hardware executing corresponding software.
[0027] In a seventh aspect, an embodiment of the present application further provides a computer-readable storage medium, which includes a computer program. When the computer program runs on an electronic device, the electronic device is caused to execute the method of any possible design in the first aspect above, or the electronic device is caused to execute the method of any possible design in the second aspect above.
[0028] In an eighth aspect, an embodiment of the present application further provides a computer program product. When the computer program product runs on an electronic device, the first electronic device is caused to execute the method of any possible design in the first aspect above, or the second electronic device is caused to execute the method of any possible design in the second aspect above.
[0029] In a ninth aspect, an embodiment of the present application further provides a chip, which is coupled to a memory and is used to execute the computer program stored in the memory to execute the method of any possible design in the first aspect above, or to execute the method of any possible design in the second aspect above.
[0030] For the technical effects that can be achieved by the various designs in any one of the second to ninth aspects above, please refer to the descriptions of the technical effects that can be achieved by each design in the first aspect above, and will not be repeated here. Brief Description of the Drawings
[0031] Figure 1A It is a schematic diagram of a traffic sharing method;
[0032] Figure 1B It is a schematic diagram of another traffic sharing method;
[0033] Figure 2 It is a schematic diagram of a communication system architecture provided by an embodiment of the present application;
[0034] Figure 3 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application;
[0035] Figure 4 It is a schematic diagram of the flow of a network traffic sharing method provided by an embodiment of the present application;
[0036] Figure 5A It is a schematic diagram of a device group composed of multiple devices provided by an embodiment of the present application;
[0037] Figure 5B It is a schematic diagram of the traffic sharing method between devices provided by an embodiment of the present application;
[0038] Figures 6A to 6C It is a schematic diagram of a set of interfaces provided by an embodiment of the present application;
[0039] Figure 7 It is a schematic diagram of another traffic sharing method between devices provided by an embodiment of the present application;
[0040] Figure 8 It is a schematic diagram of a traffic sharing device provided by an embodiment of the present application;
[0041] Figure 9 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Detailed Embodiments
[0042] Next, with reference to the drawings in the embodiments of the present application, the technical solutions in the embodiments of the present application will be described. Before introducing the technical solutions in the embodiments of the present application, some terms in the present application will be explained to facilitate the understanding of those skilled in the art.
[0043] Next, some concepts related to the embodiments of the present application will be introduced:
[0044] (1), Wide Area Network, also known as cellular network in this article. Exemplarily, the cellular network can be a 3rd-generation wireless telephone technology (3G) network, a 4th-generation mobile communication technology (4G) network, a 5th-generation mobile communication technology (5G) network, a future evolved public land mobile network (PLMN), or the Internet, etc.
[0045] (2), Local Area Network, which can be a short-range communication network such as a wireless fidelity (WiFi) hotspot network, a WiFi peer-to-peer (Wi-Fi P2P) network, a Bluetooth network, a ZigBee network, or a near field communication (NFC) network. Hereinafter, the WiFi hotspot network will be taken as an example for illustration.
[0046] (3), Cellular communication capability. In the embodiments of the present application, the electronic device providing the cellular communication capability is also referred to as the source electronic device, and the electronic device using the cellular communication capability provided by the source electronic device is also referred to as the destination electronic device. An electronic device having cellular communication capability means that the electronic device can access the Internet by accessing the wide area network. Generally, an electronic device with good cellular signal quality and / or having remaining cellular traffic has cellular communication capability. The source electronic device can provide cellular communication capability for the destination electronic device, which means that the destination electronic device can access the Internet by accessing the wide area network through the source electronic device.
[0047] Currently, a traffic sharing scheme provided in the prior art is as follows: The electronic device sends a request for traffic sharing to the cloud server. The cloud server can pre-receive the registration of the electronic device, and thus manage which electronic devices the electronic device can send requests for traffic sharing to according to the registration information. The cloud server can select an electronic device according to the set constraint conditions to provide traffic sharing services for the electronic device that sends the sharing request. Exemplarily, such as Figure 1AAs shown, the electronic device 100 sends a request message for traffic sharing to the cloud server 300. This request message is used to request traffic sharing. The cloud server 300 selects the electronic device 200 with sufficient traffic according to the set constraints to provide network traffic sharing services for the electronic device 100. This solution essentially requires that all electronic devices can be connected to the Internet and the cloud server. However, this condition cannot be met by all electronic devices. For example, the electronic device 100 may be a tablet device. Since it only supports accessing the local area network in terms of hardware and does not support accessing the wide area network, it cannot send a request message to the cloud server 300. In addition, the decision result of selecting an electronic device with sufficient traffic according to the set constraints is made by the cloud server. The cloud server can only obtain the location information of the device from the registered electronic devices to determine which devices are around the device that has made the sharing request. For the electronic devices with sufficient traffic that are not registered with the cloud server, even if they are located around the device that has made the sharing request, the cloud server will not select them to provide cellular communication capabilities for the device that has made the sharing request because it does not know the information of such electronic devices.
[0048] Another traffic sharing solution is also provided in the prior art. In this solution, an electronic device with cellular Internet access capabilities turns on the mobile hotspot, and the other electronic devices connect to this hotspot one after another, and then use the cellular traffic of this hotspot to access the Internet. Exemplarily, as Figure 1B shown, the electronic device 100 with sufficient cellular traffic turns on the mobile hotspot. The electronic devices 200 and 400 connect to the mobile hotspot of the electronic device 100. The electronic devices 200 and 400 establish a network connection with the electronic device 100 through the WiFi network. However, this solution only supports one electronic device to act as the hotspot, and the other electronic devices all use the hotspot traffic. The power consumption of the electronic device acting as the hotspot is very high, and the battery life is weak.
[0049] Therefore, the present application provides a network traffic sharing method, which is used to enable an electronic device with insufficient cellular traffic or poor cellular network signal to conveniently access the network by means of other surrounding electronic devices.
[0050] In the description of the embodiments of the present application, the terms used in the following embodiments are only for the purpose of describing specific embodiments and are not intended to limit the present application. In the specification and appended claims of the present application, the singular forms "a", "an", "the", "above-mentioned", "said", and "this" are also intended to include expressions such as "one or more", unless the context clearly indicates otherwise. It should also be understood that in the following embodiments of the present application, "at least one" and "one or more" mean one or more than two (including two). The term "and / or" is used to describe the association relationship of associated objects and indicates that three relationships may exist; for example, A and / or B may mean: A exists alone, A and B exist simultaneously, or B exists alone, where A and B may be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0051] References to "one embodiment" or "some embodiments" or the like described in this specification mean that a specific feature, structure, or characteristic described in connection with that embodiment is included in one or more embodiments of the present application. Thus, statements such as "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments", etc., which appear in different places in this specification, are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in another way. The terms "comprise", "include", "have" and their variants all mean "including but not limited to", unless otherwise specifically emphasized in another way. The term "connection" includes direct connection and indirect connection, unless otherwise stated. "First" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity of the indicated technical features.
[0052] In the embodiments of the present application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design solution described as "exemplarily" or "for example" in the embodiments of the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplarily" or "for example" is intended to present relevant concepts in a specific manner.
[0053] The network traffic sharing method provided by the embodiments of the present application can be applicable to Figure 2 the schematic diagram of the communication system architecture shown in Figure 2As shown, the communication system architecture may at least include: electronic device 100, electronic device 200, electronic device 300, …, and electronic device N00, where N is a positive integer greater than 3. Among them, electronic devices 100 to N00 can establish connections wirelessly. In this embodiment, when electronic device 100 and electronic device 200 establish a connection wirelessly, the wireless communication protocol used can be a short-range communication protocol, such as the wireless fidelity (Wi-Fi) protocol, Bluetooth protocol, ZigBee protocol, near field communication (NFC) protocol. When electronic device 100 and electronic device 200 establish a connection wirelessly, the wireless communication protocol used can also be various cellular network protocols, etc., which are not specifically limited here.
[0054] In specific implementation, the above-mentioned electronic devices 100 to N00 can be mobile phones, tablet computers, handheld computers, personal computers (PCs), cellular phones, personal digital assistants (PDAs), wearable devices (such as smart watches), smart home devices (such as televisions), in-vehicle computers, game consoles, and augmented reality (AR) / virtual reality (VR) devices, etc. This embodiment does not impose special restrictions on the specific device forms of electronic devices 100 to N00. And in this embodiment, the device forms of electronic devices 100 to N00 can be the same. For example, electronic devices 100 to N00 are all mobile phones. The device forms of electronic devices 100 to N00 can also be different. For example, electronic device 100 is a PC and electronic device 200 is a mobile phone.
[0055] The above-mentioned electronic devices 100 to N00 can be touch-screen devices or non-touch-screen devices. In this embodiment, electronic devices 100 to N00 are all terminals that can run an operating system, install applications, and have a display (or display screen).
[0056] In specific implementation, Figure 2 The number of electronic devices in the shown communication system can be more or less. The system can include but is not limited to at least one of the following: wireless lines, gateway devices such as routers and access points (APs). For example, multiple devices in the system can access the same local area network through communication lines and gateway devices and communicate through the local area network.
[0057] In some embodiments, multiple devices connected via a network are trusted devices with respect to each other. For example, among multiple devices, user terminal devices such as smartphones and tablets can be installed with application programs for communication (such as but not limited to Huawei Smart Home). This application program can log in to an account, which can be referred to as an account application hereinafter. The user terminal devices among the above-mentioned multiple devices can log in to the same account or associated accounts through this account application, so as to communicate through the above-mentioned account application server. For example, the logged-in account can be an instant messaging account, an email account, a mobile phone number, and so on. Other devices among the multiple devices except the user terminal devices can be connected to the above-mentioned account application server through wireless methods such as Bluetooth and Wi-Fi or wired methods such as USB (for example, the user can manually add smart home devices to Huawei Smart Home through Bluetooth). Thus, the identity of the communication object can be recognized among multiple devices through the above-mentioned account application server (for example, devices logged in or registered on Huawei Smart Home are trusted devices, otherwise they are untrusted devices), and in this way, relatively secure communication can be carried out through the above-mentioned account application server. Among them, the above-mentioned other devices can include but are not limited to smart home devices such as smart TVs and smart cameras, and wearable devices such as smart bracelets, smart watches, and smart glasses.
[0058] In the embodiments of the present application, Figure 3 The N + 1 electronic devices shown can be networked through near-field communication technology to form a device group including the N + 1 electronic devices, and then traffic sharing can be performed within the device group. In a possible specific implementation, any device in the device group needs to be verified to access the same Wi-Fi network, so that the identity of the communication object can be recognized among multiple devices through this Wi-Fi network (for example, devices that pass the password verification are trusted devices, otherwise they are untrusted devices), and in this way, relatively secure communication can be carried out through this Wi-Fi network.
[0059] The network traffic sharing method provided by the embodiments of the present application can be applied to electronic devices. In some embodiments, the electronic device can be a portable terminal with functions such as a personal digital assistant and / or a music player, such as a mobile phone, a tablet computer, a wearable device with wireless communication function (such as a smart watch), a vehicle-mounted device, etc. Exemplary embodiments of the portable terminal include but are not limited to portable terminals equipped with Harmony (Hongmeng) or other operating systems. The above-mentioned portable terminal can also be a laptop computer (Laptop) with a touch-sensitive surface (such as a touch panel), etc. It should also be understood that in some other embodiments, the above-mentioned terminal can also be a desktop computer with a touch-sensitive surface (such as a touch panel).
[0060] Take Figure 2Taking any one of the electronic devices in the communication system shown as an example, such as electronic device 100, the following is a schematic diagram of the hardware structure of an electronic device 100 provided in an embodiment of the present application. Refer to Figure 3 , the hardware structures of electronic devices 200 to N00 can refer to the hardware structure of electronic device 100. The methods in the following embodiments can be implemented in electronic devices 100 to N00 having the above hardware structure.
[0061] As Figure 3 shown, a schematic diagram of the structure of electronic device 100 is shown.
[0062] 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, antennas 1, 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone interface 170D, a sensor module 180, keys 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, a barometric 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.
[0063] It can be understood that the structure schematically shown in the embodiment of the present application does not constitute a specific limitation on electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or combine certain components, or split certain components, or have different component arrangements. The components shown can be implemented in hardware, software, or a combination of software and hardware.
[0064] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.
[0065] The electronic device 100 realizes the display function through the GPU, the display screen 194, and the application processor, etc. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to execute mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change the display information.
[0066] The electronic device 100 can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, and the application processor, etc.
[0067] The SIM card interface 195 is used to connect the SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to achieve contact and separation from the electronic device 100. The electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 may support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards may 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 achieve functions such as calls and data communication. In some embodiments, the electronic device 100 uses an eSIM, that is, an embedded SIM card.
[0068] The wireless communication function of the electronic device 100 can be implemented by antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modulation and demodulation processor, baseband processor, etc. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas. For example, antenna 1 can be multiplexed 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.
[0069] The mobile communication module 150 can provide solutions for wireless communications such as 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 150 can include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves by antenna 1, filter and amplify the received electromagnetic waves, and then transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor and convert it into electromagnetic waves through antenna 1 for radiation. In some embodiments, at least some functional modules of the mobile communication module 150 can be disposed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 can be disposed in the same device.
[0070] The wireless communication module 160 can provide solutions for wireless communications such as 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 radiation (IR) technology, etc. 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 through antenna 2, performs frequency modulation and filtering on the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signals to be sent from the processor 110, perform frequency modulation and amplification on them, and convert them into electromagnetic waves through antenna 2 for radiation.
[0071] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technologies. The wireless communication technologies may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time-Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc.
[0072] It can be understood that Figure 3 the components shown do not constitute a specific limitation on the electronic device 100. The electronic device 100 may further include more or fewer components than those shown, or combine certain components, or split certain components, or have different component arrangements. In addition, Figure 3 the combination / connection relationship between the components in
[0073] Combined with Figure 2 the device group shown, an embodiment of the present application proposes a network traffic sharing method. Referring to Figure 4 shown, this method can realize cellular traffic sharing within the device group, and specifically includes the following steps:
[0074] S400, each of the electronic devices 100 to N00 respectively obtains the remaining resource information of the device itself.
[0075] In addition, the electronic devices 200 to N00 also generate status messages including the remaining resource information.
[0076] Among them, the remaining resource information obtained for any one of the electronic devices 100 to N00 includes one or more of the remaining battery power of the electronic device, the remaining computing resources of the electronic device, and the remaining cellular network traffic of the electronic device. In a possible embodiment, for an electronic device capable of accessing a wide area network, the status message may further include the strength of the received cellular network signal, and the signal strength of the cellular network is used to indicate the strength of the received cellular signal or the quality of the cellular signal.
[0077] S401. The electronic device 200 to the electronic device N00 respectively send status messages to the electronic device 100.
[0078] In this step, in a possible implementation, the status message may further include the device identifier of the sending device, such as the number of the sending device in the device group, or the login account of the sending device, or the routing address, so as to facilitate the electronic device 100 to determine which electronic device in the device group the status message comes from.
[0079] In the embodiment of the present application, the electronic device 100 can be referred to as a central device. In a possible embodiment, before executing the above S400, that is, before establishing a wireless connection between the electronic device 100 to the electronic device N00, after the electronic device 100 to the electronic device N00 complete networking through the near-field communication technology, the electronic device 100 is first determined as the central device in the device group. Taking the electronic device 100 as an example, the electronic device 100 can emit signals through a short-range communication module (such as a Bluetooth communication module) to detect and scan the electronic devices (such as the electronic device 200) near the electronic device 100, so that the electronic device 100 can discover the nearby electronic devices through a short-range wireless communication protocol (such as a Bluetooth wireless communication protocol), establish a wireless communication connection with the nearby electronic devices, and transmit data to the nearby electronic devices. For example, the electronic device 100 can also directly connect with other electronic devices through the WiFi peer-to-peer (Wi-Fi P2P) communication protocol.
[0080] In the following text of the embodiment of the present application, the electronic device 100, which can also be referred to as the central device, is called the first electronic device, and any other electronic device in the device group except the central device is called the second electronic device. Specifically, there are various ways to determine the electronic device 100 as the central device in the device group. One possible implementation is that the central device is manually selected by the user. For example, the user can select the device with the most remaining power from the N + 1 electronic devices as the central device through a graphical interaction interface; or for another example, the user can select the device with the most remaining cellular data traffic from the N + 1 electronic devices as the central device through a graphical interaction interface; or for another example, the user can select the device with the most remaining computing resources from the N + 1 electronic devices as the central device through a graphical interaction interface. Another possible implementation is that the central device can be jointly elected by the electronic device 100 to the electronic device N00. For example, the electronic device 100 to the electronic device N00 mutually obtain the remaining power information of other devices, and the electronic device 100 to the electronic device N00 jointly elect the device with the most power as the central device. The specific election method can refer to the existing election implementation methods and will not be repeated here.
[0081] S402, the electronic device 100 obtains the traffic sharing mode of the current device group.
[0082] Exemplarily, the types of traffic sharing modes may include the network quality optimal mode, the longest battery life mode, and the most efficient traffic utilization mode. The so-called network quality optimal mode means that the devices in the device group all use the cellular communication capability provided by the electronic device with the best cellular network signal; the so-called longest battery life mode means that the devices in the device group have the longest battery life when working; the so-called most efficient traffic utilization mode means that the remaining network traffic of the devices in the device group is always evenly distributed.
[0083] Regarding the method for the electronic device 100 to obtain the traffic sharing mode of the current device group, a possible implementation is that the electronic device 100 obtains the default sharing mode. Exemplarily, the default sharing mode may be the network quality optimal mode, or the system default sharing mode may be the network quality optimal mode and the most efficient traffic utilization mode. Another possible implementation is that the electronic device provides multiple traffic sharing mode options for the user to select. The user can select at least one traffic sharing mode from the multiple traffic sharing mode options through the graphical user interface. After the electronic device 100 receives the user's operation, it obtains the traffic sharing mode of the current device group.
[0084] S403, the electronic device 100 determines M traffic sharing schemes according to the status messages of N - 1 electronic devices and the remaining resource information of the electronic device 100.
[0085] Wherein, M is a positive integer, and each traffic sharing scheme is used to indicate: the identifier of the source electronic device providing the cellular communication capability, the identifier of the destination electronic device receiving the cellular communication capability, and the corresponding relationship between the source electronic device and the target electronic device.
[0086] Exemplarily, assume that the device group includes Figure 5A the four electronic devices shown as follows, namely electronic device A, electronic device B, electronic device C, and electronic device D. Among them, the remaining cellular traffic of electronic device A is sufficient and the cellular network signal strength is strong, the cellular network signal strength of electronic device B is weak, electronic device C has remaining cellular traffic and the cellular signal strength is strong, electronic device D has no remaining cellular traffic. Electronic devices B, C, and D all report the status messages including the above remaining resource information to electronic device A (the central device). After electronic device A receives the status messages from electronic devices B to D, it classifies and summarizes the remaining resource information of electronic device A and the remaining resource information of other electronic devices. The specific summarized message can be seen in Table 1 below.
[0087] Table 1
[0088] Device Identification Remaining Resource Information Electronic Device A Sufficient remaining cellular data and strong cellular signal strength Electronic Device B Weak cellular signal strength Electronic Device C Has remaining cellular data and strong cellular signal strength Electronic Device D No remaining cellular data
[0089] From the remaining resource information of each electronic device in Table 1, it can be obtained that electronic device A and electronic device C in the device group can provide cellular communication capabilities. Therefore, when electronic device A is the central device, electronic device A can determine various traffic sharing schemes as shown in Table 2.
[0090] Table 2
[0091]
[0092] S404. The electronic device 100 determines a target traffic sharing scheme that satisfies the constraint conditions corresponding to the traffic sharing mode from M traffic sharing schemes according to the status messages of N - 1 electronic devices, the remaining resource information of the electronic device 100, and the traffic sharing mode.
[0093] It should be noted that the constraint conditions corresponding to different traffic sharing modes are different. For example:
[0094] The constraint condition corresponding to the network quality optimal mode is: the target traffic sharing scheme enables each electronic device in the device group to use the cellular communication capability provided by the electronic device with the best cellular signal.
[0095] The constraint condition corresponding to the longest battery life mode is: the target traffic sharing scheme enables the longest working time for each electronic device in the device group to work simultaneously.
[0096] The constraint condition corresponding to the most efficient use of traffic mode is: the target traffic sharing scheme enables the remaining network traffic of all electronic devices in the network to be always evenly distributed.
[0097] In a possible implementation, the electronic device 100 can pre - construct a mathematical model corresponding to each traffic sharing mode according to each traffic sharing mode, using a calculation method based on convex optimization theory. For example,
[0098] (1). The mathematical model corresponding to the network quality optimal mode can satisfy the following formula [1]:
[0099]
[0100] Among them, S i represents the cellular signal strength of electronic device i; S j represents the cellular signal strength of electronic device j; a ij represents that electronic device i provides cellular communication capability for electronic device j; a jiIt is indicated that electronic device j provides cellular communication capabilities for electronic device i, and maxmin{} represents maximizing the minimum; the value range of i is [1, N]; the value range of j is [1, N].
[0101] (2) The mathematical model corresponding to the longest battery life mode can satisfy the following formula [2]:
[0102]
[0103] Among them, E i represents the remaining battery power of electronic device i; E j represents the remaining battery power of electronic device j; a ij represents that electronic device i provides cellular communication capabilities for electronic device j; a ji represents that electronic device j provides cellular communication capabilities for electronic device i, maxmin{} represents maximizing the minimum; the value range of i is [1, N]; the value range of j is [1, N], and γ represents the power consumption of an electronic device per unit time.
[0104] (3) The mathematical model corresponding to the most efficient use of traffic mode can satisfy the following formula [3]:
[0105]
[0106] Among them, R i represents the remaining network traffic of electronic device i; δ i represents the cellular traffic consumption of electronic device i per unit time, and δ j represents the cellular traffic consumption of electronic device j per unit time; a ij represents that electronic device i provides cellular communication capabilities for electronic device j; a ji represents that electronic device j provides cellular communication capabilities for electronic device i, maxmin{} represents maximizing the minimum; the value range of i is [1, N]; the value range of j is [1, N].
[0107] Continuing with the above example, for Figure 5AFor the four electronic devices shown, assuming that the traffic sharing mode selected by the user in step 402 above is the network quality optimal mode and the traffic most efficient utilization mode, the mathematical model finally constructed by the electronic device 100 needs to satisfy the following constraints: enabling each electronic device in the device group to use the cellular communication capability provided by the electronic device with the best cellular signal; enabling the remaining network traffic of all electronic devices in the network to be always evenly distributed. The electronic device 100 calculates the global optimal solution of the mathematical model in the above formula [1] and formula [3]. According to the global optimal solution, the target traffic sharing scheme can be determined as: the electronic device A provides cellular communication capability for the electronic device D, and the electronic device C provides cellular communication capability for the electronic device B. Exemplarily, as Figure 5B shown, after the electronic device A determines the target traffic sharing scheme, the electronic device D performs data transceiver with the base station 1 through the electronic device A, and the electronic device B performs data transceiver with the base station 2 via the electronic device A and the electronic device C. That is to say, the electronic device A serves as a relay node between the electronic device B and the electronic device C.
[0108] In addition, it should be noted that Figure 5B the example shown is only an example. If the user selects a combined mode of two or more other traffic sharing modes according to actual needs, such as maximizing the battery life or optimizing the network quality or maximizing the traffic utilization rate, the electronic device 100 can also construct a mathematical model according to the corresponding constraints and obtain the corresponding global optimal solution. The specific principle is similar and will not be repeated and exemplified here.
[0109] It should be noted that the embodiments of the present application do not limit the number of types of traffic sharing modes. In actual applications, other traffic sharing modes may also be included. Referring to the above formula, different mathematical models can also be designed for other traffic sharing modes, that is, an algorithm for efficient solution is designed. In addition, the mathematical models of the foregoing several traffic sharing modes are only examples, and there may be more and more complex mathematical models for traffic sharing in actual applications.
[0110] S405, the electronic device 100 sends a notification message to the electronic devices 200 to N00, and the notification message is used to notify the target traffic sharing scheme.
[0111] Exemplarily, assume that the target traffic sharing scheme is as follows: The source electronic devices providing cellular communication capabilities are electronic device A and electronic device C, and the destination electronic devices receiving cellular communication capabilities are electronic device B and electronic device D. Electronic device A provides cellular communication capabilities for electronic device D, and electronic device C provides cellular communication capabilities for electronic device B. The electronic device 100 may send a notification message to the electronic devices 200 to N00. The notification message includes: The identities of the source electronic devices providing cellular communication capabilities are electronic device A and electronic device C, and the identities of the destination electronic devices receiving cellular communication capabilities are electronic device B and electronic device D. The correspondence between the source electronic devices and the destination electronic devices is that electronic device A corresponds to electronic device D, and electronic device C corresponds to electronic device B.
[0112] In a possible embodiment, the electronic device 100 sends the notification message to the electronic devices 200 to N00 only when it determines that the distances between the electronic devices 200 to N00 and the electronic device 100 are less than a preset distance. In this way, it helps to exclude the electronic devices outside the preset distance and can ensure the communication security to a certain extent.
[0113] S406. The electronic devices 200 to N00 all receive the notification message, obtain the target traffic sharing scheme from the notification message, and use the cellular communication capabilities of other electronic devices or provide cellular communication capabilities for other electronic devices according to the target traffic sharing scheme.
[0114] Exemplarily, assume that the target traffic sharing scheme is as follows: The source electronic devices providing cellular communication capabilities are electronic device A and electronic device C, and the destination electronic devices receiving cellular communication capabilities are electronic device B and electronic device D. Electronic device A provides cellular communication capabilities for electronic device D, and electronic device C provides cellular communication capabilities for electronic device B. After receiving the notification message, electronic device B to electronic device D, electronic device C obtains the target traffic sharing scheme from the notification message, and then provides cellular communication capabilities for electronic device B according to the target traffic sharing scheme. The data transmission between electronic device C and electronic device B is relayed by electronic device A; Electronic device B obtains the target traffic sharing scheme from the notification message, and then accesses the base station 2 through electronic device C; In addition, electronic device A obtains the target traffic sharing scheme from the notification message, and then provides cellular communication capabilities for electronic device D according to the target traffic sharing scheme. Electronic device D obtains the target traffic sharing scheme from the notification message, and then accesses the base station 1 through electronic device A.
[0115] In a possible embodiment, every once in a while or whenever a new electronic device is connected to the device group, the embodiments of the present application may repeatedly execute the above S400 to S406 to ensure that the central device can obtain the current latest remaining resource information of each electronic device in the device group, thereby obtaining a traffic sharing scheme that best meets the current device state. Ultimately, the users of the electronic devices within the device group can obtain the best Internet access experience.
[0116] In the embodiments of the present application, compared with Figure 1A the existing traffic sharing scheme shown, when multiple electronic devices are connected to the same local area network to form a device group, and the central device obtains information such as the remaining resources and cellular signal strength of other devices in the device group, as well as calculates and solves the traffic sharing scheme, it can all be performed locally on the device without relying on a server. Moreover, multiple electronic devices do not need to pre-access the Internet. Since multiple electronic devices are connected to the same local area network, there is no need to obtain location information, nor to report the location information of the device itself to the server. In this way, even if the network traffic of some electronic devices in the device group is exhausted or does not support cellular Internet access, they can still access the Internet relying on the traffic sharing scheme provided by the embodiments of the present application.
[0117] In addition, in the present application, multiple devices in the local area network are allowed to share the cellular communication ability with other devices, rather than being limited to one-to-one or one-to-many. Compared with Figure 1B the existing traffic sharing scheme shown, it can better achieve long-lasting battery life and effective utilization of traffic, and can effectively improve the user experience.
[0118] To more systematically elaborate on the above method, the embodiments of the present application further use the actual scenario of four friends going on an outing and playing mobile online games together to illustrate the method provided by the embodiments of the present application by way of example.
[0119] First of all, since the four people are in the suburbs, it is very likely that the smart devices of the users cannot be charged at any time when the battery is low, and some smart devices of the users, such as tablets, do not have the ability to access the Internet via cellular network. In addition, there are no fixed WiFi hotspots in the suburbs for smart devices to access. Based on this, in this scenario, when playing mobile online games together, it is very likely to encounter problems such as tablets being unable to access the network and insufficient network traffic of some electronic devices. To solve the problems existing in this scenario, the embodiments of the present application can complete traffic sharing with the following scheme.
[0120] Specifically, the four friends can communicate with each other about the remaining battery power and remaining network traffic on their devices, and then select mobile phone A with the most remaining battery power as the central device. After that, the user of mobile phone A enables the traffic sharing function. Exemplarily, as Figure 6AAs shown, mobile phone A receives a click operation by the user on the quick control of traffic sharing 601 in the drop-down menu interface 600. In response to this click operation, the working mode of traffic sharing is opened. Similarly, the other three friends can also open the working mode of traffic sharing according to the above method. After that, the user of mobile phone A can start the personal hotspot according to the operation steps as shown in Figure 6B shown. Exemplarily, as shown in (a) of Figure 6B , mobile phone A receives a click operation by the user on the personal hotspot control 611 in interface 610. In response to this operation, mobile phone A displays interface 620 as shown in (b) of Figure 6B . The user of mobile phone A can set information such as the hotspot name and password on this interface 620, and view the electronic devices connected to this personal hotspot. After the other three friends of the user of mobile phone A learn the hotspot name and password of the personal hotspot, they select to connect to this personal hotspot. In this way, the four devices of the four friends are all connected to the same local area network, and the device networking is completed.
[0121] After mobile phone A receives a click operation by the user on the connected device control 621 in this interface 620, in response to this operation, mobile phone A displays interface 630 as shown in (c) of Figure 6B . This interface 630 displays information about the electronic devices currently connected to this personal hotspot. As shown in (c) of Figure 6B , interface 630 shows that three electronic devices have successfully connected to this personal hotspot.
[0122] If the user of mobile phone A confirms with the other three friends that they have all successfully connected, then the user of mobile phone A can perform a click operation on the start traffic sharing control 631 as shown in (c) of Figure 6B . In response to this operation, mobile phone A starts to execute the method steps performed by the electronic device 100 as shown in Figure 4 above, and the other three electronic devices connected to this personal hotspot also respectively execute the method steps performed by the electronic devices 200 to electronic device N00 as shown in Figure 4 above. Specifically, mobile phone B, mobile phone C, and tablet D report status messages to mobile phone A. Among them, the status message of mobile phone B includes the cellular signal strength S of mobile phone B B , the remaining battery power E of mobile phone B B , the remaining network traffic R of mobile phone B B , and the remaining computing resources C of mobile phone B B . The status message of mobile phone C includes the cellular signal strength S of mobile phone C C , the remaining battery power E of mobile phone A C , the remaining network traffic R of mobile phone C C , and the remaining computing resources C of mobile phone C CThe status message of tablet D includes the remaining battery power E of tablet D D 、the remaining network traffic R of tablet D D and the remaining computing resources C of tablet D D 。In addition, mobile phone A also obtains the cellular signal strength S of the device itself A 、the remaining battery power E of mobile phone A A 、the remaining network traffic R of mobile phone A A and the remaining computing resources C of mobile phone B A 。
[0123] Then, summarize the remaining resource information and cellular signal strength information of mobile phones A, B, C and tablet D. Mobile phone A can also display the summarized information to the user of mobile phone A in the form of a pop-up window, so as to facilitate the user to select a suitable traffic sharing mode subsequently. Exemplarily, mobile phone A can display a pop-up window 640 as shown in (a) of Figure 6C , and this pop-up window 640 displays a notification message including the remaining resource information and cellular signal strength of each device. If the user needs to view the notification message in detail, the user can click the view detailed information control 641. If the user needs to select a traffic sharing mode, the user can click the operate traffic sharing mode control 642. In response to this operation, mobile phone A can display an interface 650 as shown in (b) of Figure 6C , and this interface 650 includes three traffic sharing modes available for the user to select, namely the optimal network quality mode, the long battery life mode and the most efficient use of traffic mode. If four friends hope to play games for as long as possible and do not want the battery power of mobile phones and tablets to be consumed too quickly, they can select the long battery life mode 651.
[0124] After mobile phone A accepts the operation of the user on the long battery life mode control 651 in interface 650, mobile phone A uses the summarized information and the long battery life mode to construct a corresponding mathematical model according to the above embodiment and solve it to obtain the global optimal solution. Then, as shown in Figure 7 , mobile phone A determines the traffic sharing scheme according to the global optimal solution as that mobile phone A provides cellular communication capabilities for mobile phone B, and mobile phone C provides cellular communication capabilities for tablet D. Mobile phone A distributes a notification message indicating this traffic sharing scheme to mobile phone B, mobile phone C and tablet D. Mobile phones A to D perform data transmission and reception according to the traffic sharing scheme. Among them, mobile phone B sends and receives game data packets with base station 1 through mobile phone A. Mobile phone A serves as a relay node between mobile phone C and tablet D. Tablet D sends and receives game data packets with base station 2 through mobile phone A and mobile phone C.
[0125] Based on the above method, at fixed time intervals, Mobile B and Tablet D report status messages including current remaining resource information to Mobile A again. Mobile A re-determines the traffic sharing plan and distributes it to other electronic devices. For example, the re-determined traffic sharing plan is as follows: Mobile A provides cellular communication capabilities for Tablet D, and Mobile B provides cellular communication capabilities for Mobile C. Then, Mobile A and Tablet D perform traffic sharing according to the newly determined traffic sharing plan. The specific sharing method can refer to the sharing method of the embodiment Figure 4 shown above. This can ensure that the power of all devices within the local area network is evenly consumed, achieving the goal of the longest common gaming time for everyone. In this embodiment, although some devices among the four friends do not support cellular communication capabilities, they can still form a cluster of devices through networking, so that the cellular communication capabilities and network traffic of other devices can be flexibly shared. In this way, even devices with poor cellular signals or those that do not support cellular communication capabilities can access the Internet freely and smoothly.
[0126] Based on the same technical concept as the above method embodiment, the embodiments of the present application provide a first communication device and a second communication device. The first communication device is specifically used to implement the method of the first electronic device in the above embodiment, and the second communication device is specifically used to implement the method of the second electronic device in the above embodiment. The structure of the first communication device is as Figure 8 shown, including: a first receiving module 801, a first processing module 802, and a first sending module 803. The structure of the second communication device is as Figure 8 shown, including a second receiving module 811, a second processing module 812, and a second sending module 813.
[0127] Among them, the first receiving module 801 is used to receive status messages from the N - 1 second electronic devices. Among them, the status message of any one of the second electronic devices is used to characterize the remaining resource information of the second electronic device. The first receiving module 801 is also used to receive user operations.
[0128] The first processing module 802 is used to obtain a traffic sharing mode in response to a user operation. Obtain the remaining resource information of the N - 1 second electronic devices from the status messages of the N - 1 second electronic devices, and obtain the remaining resource information of the first electronic device; determine M traffic sharing plans according to the remaining resource information of the N - 1 second electronic devices, the remaining resource information of the first electronic device, and the traffic sharing mode, where M is a positive integer; determine a target traffic sharing plan that satisfies the constraint conditions corresponding to the traffic sharing mode from the M traffic sharing plans
[0129] The first sending module 803 is used to send a notification message to the N - 1 second electronic devices, and the notification message is used to indicate the target traffic sharing plan.
[0130] In a possible embodiment, the remaining resource information of the second electronic device includes: the remaining battery power of the second electronic device and / or the remaining computing resources of the second electronic device. The remaining resource information of the first electronic device includes: the remaining battery power of the second electronic device and / or the remaining computing resources of the second electronic device.
[0131] In a possible embodiment, when the second electronic device has cellular communication capabilities, the status message of the second electronic device is further used to characterize: one or more of the cellular signal strength of the second electronic device or the remaining network traffic of the second electronic device;
[0132] When the first electronic device has cellular communication capabilities, the first processing module 802 is further configured to: obtain the cellular signal strength of the first electronic device, and determine M traffic sharing schemes according to the remaining resource information of the N-1 second electronic devices, the remaining resource information of the first electronic device, and the cellular signal strength of the first electronic device. The remaining resource information of the first electronic device further includes the remaining network traffic of the first electronic device.
[0133] In a possible embodiment, the traffic sharing mode includes one or more of the network quality optimal mode, the longest battery life mode, and the most efficient traffic utilization mode;
[0134] The constraint condition corresponding to the network quality optimal mode is: the target traffic sharing scheme enables each electronic device in the device group to use the cellular communication capabilities provided by the electronic device with the best cellular signal. The device group is composed of the first electronic device and the N-1 second electronic devices;
[0135] The constraint condition corresponding to the longest battery life mode is: the target traffic sharing scheme enables the longest working time for each electronic device in the device group to work simultaneously;
[0136] The constraint condition corresponding to the most efficient traffic utilization mode is: the target traffic sharing scheme enables the remaining network traffic of each electronic device in the device group to be evenly distributed.
[0137] In a possible embodiment, the first processing module 802 determines a target traffic sharing scheme that meets the constraint conditions corresponding to the traffic sharing mode from the M traffic sharing schemes. Specifically, it is used to: construct a mathematical model corresponding to the traffic sharing mode according to the traffic sharing mode; calculate the global optimal solution of the mathematical model, and determine the target traffic sharing scheme according to the global optimal solution. Among them, the mathematical model corresponding to the optimal network quality mode satisfies the above formula [1]; the mathematical model corresponding to the longest battery life mode satisfies the above formula [2]; the mathematical model corresponding to the most efficient traffic utilization mode satisfies the above formula [3].
[0138] In a possible embodiment, the first processing module 802 is further used to: detect the distance between the N - 1 second electronic devices and the first electronic device; in response to detecting that the distance between the first electronic device and the N - 1 second electronic devices is less than a preset distance, the first sending module 803 is used to send a notification message to the N - 1 second electronic devices.
[0139] Based on the above second communication device, the second sending module 813 is used to send a status message to the first electronic device, where the status message of the second electronic device is used to characterize the remaining resource information of the second electronic device.
[0140] The second receiving module 811 is used to receive a notification message from the second electronic device;
[0141] The second processing module 812 is used to obtain a target traffic sharing scheme from the notification message. The target traffic sharing scheme is determined according to the remaining resource information of the N - 1 second electronic devices, the remaining resource information of the first electronic device, and the traffic sharing mode selected by the user; according to the target traffic sharing scheme, use the cellular transmission capability of other electronic devices or provide the cellular transmission capability to other electronic devices. The other electronic devices are any one or more of the N electronic devices including the N - 1 second electronic devices and the first electronic device except the second electronic device itself.
[0142] In a possible embodiment, the remaining resource information of the second electronic device includes: the remaining battery power of the second electronic device and / or the remaining computing resources of the second electronic device.
[0143] In a possible embodiment, when the second electronic device has cellular communication capabilities, the status message of the second electronic device is further used to characterize one or more of the cellular signal strength of the second electronic device or the remaining network traffic of the second electronic device.
[0144] In a possible embodiment, the traffic sharing mode includes one or more of an optimal network quality mode, a longest battery life mode, and a most efficient traffic utilization mode;
[0145] The constraint condition corresponding to the optimal network quality mode is that the target traffic sharing scheme enables each electronic device in the device group to use the cellular communication capability provided by the electronic device with the best cellular signal, and the device group is composed of the first electronic device and the N - 1 second electronic devices;
[0146] The constraint condition corresponding to the longest battery life mode is that the target traffic sharing scheme enables the longest working time for each electronic device in the device group to work simultaneously;
[0147] The constraint condition corresponding to the most efficient traffic utilization mode is that the target traffic sharing scheme enables the remaining network traffic of each electronic device in the device group to be evenly distributed.
[0148] In some other embodiments of the present application, embodiments of the present application disclose an electronic device, as Figure 9 shown, the electronic device may include: a touch screen 901, where the touch screen 901 includes a touch panel 906 and a display screen 907; one or more processors 902; a memory 903; one or more applications (not shown); and one or more computer programs 904. The above components can be connected through one or more communication buses 905. Wherein the one or more computer programs 904 are stored in the above memory 903 and are configured to be executed by the one or more processors 902, and the one or more computer programs 904 include instructions, and the above instructions can be used to execute as Figure 4 the respective steps in the corresponding embodiments.
[0149] Embodiments of the present application further provide a computer-readable storage medium, in which computer program instructions are stored. When the computer program instructions run on an electronic device, the electronic device is enabled to execute the above-related method steps to implement the method in the above embodiments.
[0150] Embodiments of the present application further provide a computer program product. When the computer program product runs on a computer, the computer is enabled to execute the above-related steps to implement the method in the above embodiments.
[0151] In addition, embodiments of the present application further provide a device, which may specifically be a chip, a component, or a module. The device may include a processor and a memory connected to each other; wherein, the memory is used to store computer execution instructions. When the device runs, the processor may execute the computer execution instructions stored in the memory, so that the chip executes the methods in the above method embodiments.
[0152] Among them, the electronic device, computer-readable storage medium, computer program product or chip provided in the embodiments of the present application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be elaborated here.
[0153] Through the description of the above embodiments, those skilled in the art can understand that for the convenience and brevity of description, only the division of the above functional modules is used as an example. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
[0154] In several embodiments provided in the present application, it should be understood that the disclosed device and method can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another device, or some features can be discarded or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in an electrical, mechanical or other form.
[0155] The unit described as a separated component may or may not be physically separated. The component displayed as a unit may be a physical unit or multiple physical units, that is, it may be located in one place, or it may be distributed to multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0156] In addition, each functional unit in the various embodiments of the present application can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0157] When an 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 readable storage medium. Based on this understanding, the technical solution of the embodiments of the present application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions for causing a device (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the methods of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read only memory (ROM), random access memory (RAM), magnetic disks, or optical discs.
[0158] The above content is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of changes or substitutions, which should all be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A network traffic sharing method, applied to a first electronic device, the first electronic device being connected to N - 1 second electronic devices, where N is a positive integer greater than 1, characterized in that, Including: Receiving status messages from the N - 1 second electronic devices, where the status message of any one of the second electronic devices is used to characterize the remaining resource information of the second electronic device; Obtaining a traffic sharing mode; Obtaining the remaining resource information of the N - 1 second electronic devices from the status messages of the N - 1 second electronic devices, and obtaining the remaining resource information of the first electronic device; Determining M traffic sharing schemes according to the remaining resource information of the N - 1 second electronic devices and the remaining resource information of the first electronic device, where M is a positive integer; Determining a target traffic sharing scheme that meets the constraint conditions corresponding to the traffic sharing mode from the M traffic sharing schemes according to the remaining resource information of the N - 1 second electronic devices, the remaining resource information of the first electronic device, and the traffic sharing mode; Sending a notification message to the N - 1 second electronic devices, where the notification message is used to indicate the target traffic sharing scheme.
2. The method according to claim 1, characterized in that, The remaining resource information of the second electronic device includes: the remaining battery power of the second electronic device and / or the remaining computing resources of the second electronic device; the remaining resource information of the first electronic device includes: the remaining battery power of the second electronic device and / or the remaining computing resources of the second electronic device.
3. The method according to claim 2, characterized in that, When the second electronic device has cellular communication capabilities, the status message of the second electronic device is also used to characterize: one or more of the cellular signal strength of the second electronic device or the remaining network traffic of the second electronic device; When the first electronic device has cellular communication capabilities, the method further includes: obtaining the cellular signal strength of the first electronic device; the remaining resource information of the first electronic device further includes the remaining network traffic of the first electronic device; Determining M traffic sharing schemes according to the remaining resource information of the N - 1 second electronic devices and the remaining resource information of the first electronic device, including: Determining M traffic sharing schemes according to the remaining resource information of the N - 1 second electronic devices, the remaining resource information of the first electronic device, and the cellular signal strength of the first electronic device.
4. The method according to any one of claims 1 to 3, characterized in that, The determining, from the M traffic sharing schemes, a target traffic sharing scheme that meets the constraint conditions corresponding to the traffic sharing mode according to the remaining resource information of the N - 1 second electronic devices, the remaining resource information of the first electronic device, and the traffic sharing mode, includes: Constructing a mathematical model corresponding to the traffic sharing mode according to the remaining resource information of the N - 1 second electronic devices, the remaining resource information of the first electronic device, and the traffic sharing mode; Calculating the global optimal solution of the mathematical model, and determining the target traffic sharing scheme according to the global optimal solution.
5. The method according to any one of claims 1 to 4, characterized in that, The traffic sharing mode includes one or more of a network quality optimal mode, a longest battery life mode, and a most efficient traffic utilization mode; The constraint condition corresponding to the optimal network quality mode is that the target traffic sharing scheme enables each electronic device in the device group to use the cellular communication capability provided by the electronic device with the best cellular signal, and the device group is composed of the first electronic device and the N - 1 second electronic devices; The constraint condition corresponding to the longest battery life mode is that the target traffic sharing scheme enables the longest working time for each electronic device in the device group to work simultaneously; The constraint condition corresponding to the most efficient traffic utilization mode is that the target traffic sharing scheme enables the remaining network traffic of each electronic device in the device group to be evenly distributed.
6. The method according to claim 5, characterized in that, The mathematical model corresponding to the optimal network quality mode satisfies the following formula [1]: Among them, S i represents the cellular signal strength of electronic device i; S j represents the cellular signal strength of electronic device j; a ij represents that electronic device i provides cellular communication capabilities for electronic device j; a ji represents that electronic device j provides cellular communication capabilities for electronic device i, maxmin{} represents maximizing the minimum; the value range of i is [1, N]; the value range of j is [1, N]; The mathematical model corresponding to the longest battery life mode satisfies the following formula [2]: Among them, E i represents the remaining power of electronic device i; E j represents the remaining power of electronic device j; a ij represents that electronic device i provides cellular communication capabilities for electronic device j; a ji represents that electronic device j provides cellular communication capabilities for electronic device i, maxmin{} represents maximizing the minimum; the value range of i is [1, N]; the value range of j is [1, N], and γ represents the power consumption of an electronic device per unit time; The mathematical model corresponding to the most efficient traffic utilization mode satisfies the following formula [3]: Among them, R i represents the remaining network traffic of electronic device i; δ i represents the cellular traffic consumption of electronic device i per unit time, and δ j represents the cellular traffic consumption of electronic device j per unit time; a ij represents that electronic device i provides cellular communication capabilities for electronic device j; a ji represents that electronic device j provides cellular communication capabilities for electronic device i, and maxmin{} represents maximizing the minimum; the value range of i is [1, N]; the value range of j is [1, N].
7. The method according to any one of claims 1 to 6, characterized in that, It further includes: Detect the distance between the N - 1 second electronic devices and the first electronic device; Send a notification message to the N - 1 second electronic devices, including: In response to detecting that the distance between the first electronic device and the N - 1 second electronic devices is less than a preset distance, send a notification message to the N - 1 second electronic devices.
8. The method according to claim 7, wherein The detecting the distance between the N - 1 second electronic devices and the first electronic device includes: Detect the distance between the N - 1 second electronic devices and the first electronic device through Bluetooth positioning technology, ultra-wideband UWB positioning technology, or wireless fidelity WiFi positioning technology.
9. The method according to any one of claims 1 to 8, wherein The first electronic device and the second electronic device log in to the same account or associated accounts, and the same account or associated accounts are any one of instant messaging accounts, email accounts, and mobile phone numbers.
10. A method for sharing network traffic, applied to a second electronic device, N - 1 of the second electronic devices are connected to a first electronic device, N is a positive integer greater than 1, wherein It includes: Send a status message to the first electronic device, where the status message of the second electronic device is used to characterize the remaining resource information of the second electronic device; Receive a notification message from the first electronic device; Obtain the target traffic sharing scheme from the notification message, and the target traffic sharing scheme is determined according to the remaining resource information of the N - 1 second electronic devices, the remaining resource information of the first electronic device, and the traffic sharing mode selected by the user; According to the target traffic sharing scheme, use the cellular transmission capability of other electronic devices or provide the cellular transmission capability to other electronic devices, and the other electronic devices are any one or more of the N electronic devices including the N - 1 second electronic devices and the first electronic device except the second electronic device.
11. The method according to claim 10, wherein The remaining resource information of the second electronic device includes: the remaining battery power of the second electronic device and / or the remaining computing resources of the second electronic device.
12. The method according to claim 10 or 11, wherein When the second electronic device has cellular communication capabilities, the status message of the second electronic device is also used to characterize one or more of the cellular signal strength of the second electronic device or the remaining network traffic of the second electronic device.
13. The method according to any one of claims 10 to 12, wherein The traffic sharing mode includes one or more of the network quality optimal mode, the longest battery life mode, and the most efficient traffic utilization mode; The constraint condition corresponding to the network quality optimal mode is that the target traffic sharing scheme enables each electronic device in the device group to use the cellular communication capability provided by the electronic device with the best cellular signal. The device group consists of the first electronic device and the N - 1 second electronic devices; The constraint condition corresponding to the longest battery life mode is that the target traffic sharing scheme enables the longest working time for each electronic device in the device group to work simultaneously; The constraint condition corresponding to the most efficient traffic utilization mode is that the target traffic sharing scheme enables the remaining network traffic of each electronic device in the device group to be evenly distributed.
14. A first electronic device, the first electronic device is connected to N - 1 second electronic devices, N is a positive integer greater than 1, wherein The first electronic device includes a processor and a memory; The memory stores program instructions; The processor is used to run the program instructions stored in the memory, so that the first electronic device performs: Receiving status messages from the N - 1 second electronic devices, where the status message of any one of the second electronic devices is used to characterize the remaining resource information of the second electronic device; Obtaining the traffic sharing mode; Obtaining the remaining resource information of the N - 1 second electronic devices from the status messages of the N - 1 second electronic devices, and obtaining the remaining resource information of the first electronic device; Determining M traffic sharing schemes according to the remaining resource information of the N - 1 second electronic devices and the remaining resource information of the first electronic device, where M is a positive integer; Determining a target traffic sharing scheme that meets the constraint condition corresponding to the traffic sharing mode from the M traffic sharing schemes according to the remaining resource information of the N - 1 second electronic devices, the remaining resource information of the first electronic device, and the traffic sharing mode; Sending a notification message to the N - 1 second electronic devices, where the notification message is used to indicate the target traffic sharing scheme.
15. The first electronic device according to claim 14, wherein The remaining resource information of the second electronic device includes: the remaining battery power of the second electronic device and / or the remaining computing resources of the second electronic device; the remaining resource information of the first electronic device includes: the remaining battery power of the second electronic device and / or the remaining computing resources of the second electronic device.
16. The first electronic device according to claim 15, wherein When the second electronic device has cellular communication capability, the status message of the second electronic device is also used to characterize: one or more of the cellular signal strength of the second electronic device or the remaining network traffic of the second electronic device; When the first electronic device has cellular communication capability, the processor is used to run the program instructions stored in the memory, so that the first electronic device also performs: Obtaining the cellular signal strength of the first electronic device, and the remaining resource information of the first electronic device also includes the remaining network traffic of the first electronic device; The processor is used to run the program instructions stored in the memory, so that the first electronic device specifically performs: Determine M traffic sharing schemes based on the remaining resource information of the N - 1 second electronic devices, the remaining resource information of the first electronic device, and the cellular signal strength of the first electronic device.
17. The first electronic device according to any one of claims 14 to 16, characterized in that, The processor is configured to run the program instructions stored in the memory, such that the first electronic device specifically performs: Construct a mathematical model corresponding to the traffic sharing mode according to the remaining resource information of the N - 1 second electronic devices, the remaining resource information of the first electronic device, and the traffic sharing mode; Calculate the global optimal solution of the mathematical model, and determine the target traffic sharing scheme according to the global optimal solution.
18. The first electronic device according to any one of claims 14 to 17, characterized in that, The traffic sharing mode includes one or more of a network quality optimal mode, a longest battery life mode, and a most efficient traffic utilization mode; The constraint condition corresponding to the network quality optimal mode is: the target traffic sharing scheme enables each electronic device in the device group to use the cellular communication capability provided by the electronic device with the best cellular signal. The device group consists of the first electronic device and the N - 1 second electronic devices; The constraint condition corresponding to the longest battery life mode is: the target traffic sharing scheme enables the longest working time for each electronic device in the device group to work simultaneously; The constraint condition corresponding to the most efficient traffic utilization mode is: the target traffic sharing scheme enables the remaining network traffic of each electronic device in the device group to be evenly distributed.
19. The first electronic device according to claim 18, characterized in that, The mathematical model corresponding to the network quality optimal mode satisfies the following formula [1]: Among them, S i represents the cellular signal strength of electronic device i; S j represents the cellular signal strength of electronic device j; a ij represents that electronic device i provides cellular communication capabilities for electronic device j; a ji represents that electronic device j provides cellular communication capabilities for electronic device i, maxmin{} represents maximizing the minimum; the value range of i is [1, N]; the value range of j is [1, N]; The mathematical model corresponding to the longest battery life mode satisfies the following formula [2]: Among them, E i represents the remaining power of electronic device i; E j represents the remaining power of electronic device j; a ij represents that electronic device i provides cellular communication capabilities for electronic device j; a ji represents that electronic device j provides cellular communication capabilities for electronic device i, maxmin{} represents maximizing the minimum; the value range of i is [1, N]; the value range of j is [1, N], and γ represents the power consumption of an electronic device per unit time; The mathematical model corresponding to the most efficient traffic utilization mode satisfies the following formula [3]: Among them, R i represents the remaining network traffic of electronic device i; δ i represents the cellular traffic consumption of electronic device i per unit time, and δ j represents the cellular traffic consumption of electronic device j per unit time; a ij represents that electronic device i provides cellular communication capabilities for electronic device j; a ji represents that electronic device j provides cellular communication capabilities for electronic device i, and maxmin{} represents maximizing the minimum; the value range of i is [1, N]; the value range of j is [1, N].
20. The first electronic device according to any one of claims 14 to 19, characterized in that, The processor is configured to run the program instructions stored in the memory, such that the first electronic device further performs: Detect the distance between the N - 1 second electronic devices and the first electronic device; The processor is configured to run the program instructions stored in the memory, such that the first electronic device specifically performs: In response to detecting that the distance between the first electronic device and the N - 1 second electronic devices is less than a preset distance, send a notification message to the N - 1 second electronic devices.
21. The first electronic device according to claim 20, characterized in that, The processor is configured to run the program instructions stored in the memory, such that the first electronic device specifically performs: Detect the distance between the N - 1 second electronic devices and the first electronic device through Bluetooth positioning technology, ultra - wideband UWB positioning technology, or wireless fidelity WiFi positioning technology.
22. The electronic device according to any one of claims 14 to 21, characterized in that, The first electronic device and the second electronic device log in to the same account or associated accounts, and the same account or associated accounts are any one of an instant messaging account, an email account, and a mobile phone number.
23. A second electronic device, N - 1 of said second electronic devices are connected to the first electronic device, N being a positive integer greater than 1, characterized in that, The second electronic device includes a processor and a memory; The memory stores program instructions; The processor is configured to run the program instructions stored in the memory, such that the second electronic device performs: Send a status message to the first electronic device, where the status message of the second electronic device is used to characterize the remaining resource information of the second electronic device. Receive a notification message from the first electronic device; Obtain a target traffic sharing scheme from the notification message, where the target traffic sharing scheme is determined according to the remaining resource information of the N-1 second electronic devices, the remaining resource information of the first electronic device, and the traffic sharing mode selected by the user; According to the target traffic sharing scheme, use the cellular transmission capabilities of other electronic devices or provide cellular transmission capabilities to other electronic devices, where the other electronic devices are any one or more of the N electronic devices including the N-1 second electronic devices and the first electronic device except the second electronic device itself.
24. The second electronic device according to claim 23, wherein, The remaining resource information of the second electronic device includes: the remaining battery power of the second electronic device and / or the remaining computing resources of the second electronic device.
25. The second electronic device according to claim 23 or 24, wherein, When the second electronic device has cellular communication capabilities, the status message of the second electronic device is further used to characterize one or more of the cellular signal strength of the second electronic device or the remaining network traffic of the second electronic device.
26. The second electronic device according to any one of claims 23 to 25, wherein, The traffic sharing mode includes one or more of the network quality optimal mode, the longest battery life mode, and the most efficient traffic utilization mode; The constraint condition corresponding to the network quality optimal mode is: the target traffic sharing scheme enables each electronic device in the device group to use the cellular communication capabilities provided by the electronic device with the best cellular signal, and the device group is composed of the first electronic device and the N-1 second electronic devices; The constraint condition corresponding to the longest battery life mode is: the target traffic sharing scheme enables the longest working time for each electronic device in the device group to work simultaneously; The constraint condition corresponding to the most efficient traffic utilization mode is: the target traffic sharing scheme enables the remaining network traffic of each electronic device in the device group to be evenly distributed.
27. A communication system, wherein, The communication system includes the first electronic device according to any one of claims 14 to 22 and N-1 second electronic devices according to any one of claims 23 to 26.
28. A computer-readable storage medium, wherein, The computer-readable storage medium includes program instructions that, when the program instructions run on the first electronic device, cause the first electronic device to execute the method according to any one of claims 1 to 9.
29. A computer-readable storage medium, wherein, The computer-readable storage medium includes program instructions that, when the program instructions run on the second electronic device, cause the second electronic device to execute the method according to any one of claims 10 to 13.
Citation Information
Patent Citations
Wireless access point selection method with resource allocation optimization effect
CN107249206A
Multitask mobile data distribution method based on public WiFi distribution
CN108337643A
