CN115278804A - Network selection method and related equipment - Google Patents

Network selection method and related equipment Download PDF

Info

Publication number
CN115278804A
CN115278804A CN202210728301.0A CN202210728301A CN115278804A CN 115278804 A CN115278804 A CN 115278804A CN 202210728301 A CN202210728301 A CN 202210728301A CN 115278804 A CN115278804 A CN 115278804A
Authority
CN
China
Prior art keywords
network
standby
electronic device
electronic equipment
standby state
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210728301.0A
Other languages
Chinese (zh)
Other versions
CN115278804B (en
Inventor
赵和平
劳华剑
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202210728301.0A priority Critical patent/CN115278804B/en
Publication of CN115278804A publication Critical patent/CN115278804A/en
Application granted granted Critical
Publication of CN115278804B publication Critical patent/CN115278804B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/14Reselecting a network or an air interface
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0203Power saving arrangements in the radio access network or backbone network of wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephone Function (AREA)

Abstract

The embodiment of the application provides a network selection method and related equipment, which are applied to the field of communication. In the method, when the electronic equipment is determined to be in a standby state and the current first standby network of the electronic equipment is different from the first network, the standby network of the electronic equipment is switched from the first standby network to the first network. The first network is a network with the largest Network Address Translation (NAT) timeout time among a plurality of available networks of the electronic equipment. By using the method of the embodiment of the application, the standby network with the largest NAT timeout time is selected for standby, so that the standby power consumption of the electronic equipment can be effectively reduced, and the standby time of the electronic equipment is prolonged.

Description

Network selection method and related equipment
Technical Field
The present application relates to the field of communications technologies, and in particular, to a network selection method and a related device.
Background
A Network Address Translation (NAT) technology, specifically, a NAT device forms a mapping table between an internal device Network Address and an external device Network Address, that is, an NAT table, which can reduce the requirement for the external device Network Address, and can hide the internal device Network Address, thereby playing a role in security isolation.
In the prior art, in order to ensure normal operation of the message push service, the mobile phone and the message push server need to be constantly connected, that is, always kept in a connected state. When the communication link between the mobile phone and the server has no data communication for a certain time, the mobile wireless network operator or the routing gateway eliminates the corresponding item in the NAT table, thereby causing the interruption of the communication link; the certain Time is NAT timeout Time (Aging-Time). Therefore, in order to avoid the interruption of the always-connected link between the handset and the message push server, the heartbeat interval of the always-connected link must be less than the NAT timeout time. In this case, if the setting value of the NAT timeout time is small, in order to keep the constant connection without interruption, the mobile phone may be frequently woken up, which affects the standby time of the mobile phone.
Therefore, how to increase the standby time of the communication device is an urgent problem to be solved at present.
Disclosure of Invention
The application provides a network selection method and related equipment. According to the method, the standby power consumption of the electronic equipment can be effectively reduced, and the standby time of the electronic equipment is prolonged.
In a first aspect, the present application provides a network selection method, which may be applied to other devices such as electronic devices. For example, the above-described network selection method is performed by an electronic device, that is, the network selection method with respect to itself is performed by the electronic device. For another example, the network selection method described above may be performed by another device, such as electronic device a for electronic device B.
In the method, when the electronic equipment is determined to be in a standby state and the current first standby network of the electronic equipment is different from the first network, the standby network of the electronic equipment is switched from the first standby network to the first network. The first network is a network with the largest Network Address Translation (NAT) timeout time in a plurality of available networks of the electronic equipment.
The standby state of the electronic device is exemplarily a state in which the electronic device is turned on but the user does not perform any operation. However, the definition of the standby state includes, but is not limited to, the case of the above-described example.
The above-mentioned plural numbers mean two or more. The network refers to a communication network available and connectable to the electronic device, and includes at least one of a mobile communication network, a Wireless Local Area Network (WLAN) hotspot, and the like, where the mobile communication network may be a 2G mobile communication network, a 3G mobile communication network, a 4G mobile communication network, a 5G mobile communication network, and the like; and the WLAN hotspot may be at least one of a personal hotspot, wiFi (also called mobile hotspot), and the like.
By the scheme, the standby network with the largest NAT timeout time is selected for standby, so that the standby power consumption of the electronic equipment can be effectively reduced, and the standby time of the electronic equipment is prolonged. By the scheme, the electronic equipment can not only normally use the message push service, but also effectively reduce the standby power consumption of the electronic equipment.
With reference to the first aspect, in a possible implementation manner of the first aspect, in the network selection method, when it is determined that the electronic device is switched from the standby state to the operating state, a standby network of the electronic device is switched from a first network to the first standby network.
In the scheme, the standby network switching can be performed in response to the state change of the electronic equipment, so that the normal use of the electronic equipment by a user is not influenced, and the standby power consumption of the electronic equipment can be reduced.
With reference to the first aspect, in a possible implementation manner of the first aspect, the network selection method further includes: during switching the standby network of the electronic device from the first network to the first standby network, an identification of the first standby network is displayed on the electronic device.
In the scheme, the identification of the first standby network is displayed on the electronic equipment during the switching from the first network to the first standby network, so that the public opinion problem caused by the fact that a user finds the change of the network identification is avoided. In order to ensure that the user cannot find out the change of the network identifier, when the standby network is switched to the first network, the identifier of the first network is not displayed on the electronic equipment, but the identifier of the first standby network is continuously displayed on the electronic equipment. Further, in the whole process of executing the network selection method of the present application, the identifier of the first standby network selected by the user may be continuously displayed on the electronic device, that is, the display switching of the network identifier is not performed.
With reference to the first aspect, in a possible implementation manner of the first aspect, the determining that the electronic device is in a standby state includes:
the electronic equipment is in a screen-off state, and when the electronic equipment meets a first condition, the electronic equipment is determined to be in a standby state, wherein the first condition comprises at least one of the following conditions: the electronic equipment is in a long standby state; the current data flow of the electronic equipment is less than or equal to the flow threshold.
The long standby state refers to a long standby state, and the specific definition can be set according to the actual situation. Specifically, the method for determining that the electronic device is in the standby state includes the following situations:
in the first case, when the electronic device is in the screen-off state and the long standby state, it may be determined that the electronic device is in the standby state described above. According to the screen-off state, the fact that the user does not operate the electronic equipment can be confirmed; and under the long-time standby scene, the benefit for reducing the standby power consumption of the electronic equipment is larger, the frequent standby network switching can be avoided, and the equipment use experience of the user is guaranteed.
In a second case, when the electronic device is in the off-screen state and the current data traffic of the electronic device is less than or equal to the traffic threshold, it may be determined that the electronic device is in the standby state. The data flow of the electronic device can reflect the operation amount of the electronic device, when the data flow is less than or equal to the flow threshold, the operation amount of the electronic device can be judged to be less, and the standby network switching at the moment can not affect the normal use of the electronic device by a user. In addition, the standby network switching is carried out under the condition that the data traffic of the electronic equipment is less, so that the condition of traffic consumption caused by the standby network switching can be avoided.
In a third case, when the electronic device is in the screen-off state and the long standby state, and the current data traffic of the electronic device is less than or equal to the traffic threshold, it may be determined that the electronic device is in the standby state. And under a low-flow long-standby scene, standby network switching is performed, so that standby power consumption can be reduced, normal use of electronic equipment by a user is not influenced, and flow consumption can be avoided.
With reference to the first aspect, in a possible implementation manner of the first aspect, the method for determining that the electronic device is in the long standby state includes any one of the following.
In the first method, the current position of the electronic device belongs to one of a preset position set, the preset position set is a set of at least one preset position, and the holding time of the electronic device in the standby state of the preset position is greater than or equal to a time threshold.
In this embodiment, the preset position is a position that satisfies the long standby state, and may be, for example, a position determined in advance according to history data of the electronic device. Therefore, when the location of the electronic device belongs to one of the preset location sets, it indicates that the current state of the electronic device is the long standby state.
In the second method, the holding time of the current standby state of the electronic device is greater than or equal to the time threshold. The duration time, namely the maintaining time, of the electronic equipment in the standby state is recorded, and whether the electronic equipment meets the long standby state is judged according to the length of the maintaining time.
With reference to the first aspect, in a possible implementation manner of the first aspect, the determining that the electronic device is in a standby state and a current first standby network of the electronic device is different from the first network, and switching the standby network of the electronic device from the first standby network to the first network includes:
and matching in a network database according to the current position of the electronic equipment, and determining N available networks corresponding to the current position and NAT timeout time corresponding to each available network in the N available networks. N is an integer greater than one. The network database comprises at least one available network at a preset position and the corresponding relation of the NAT timeout time of the available network at the preset position, and the holding time of the electronic equipment in the standby state at the preset position is larger than or equal to a time threshold. And determining the available network with the maximum NAT timeout time in the N available networks as the first network.
In the scheme, the available networks of the electronic equipment do not change greatly at the same position, so when the current position of the electronic equipment is matched with the position in the network database, the first network can be determined by using the N available networks corresponding to the matched position and the NAT overtime time of the N available networks, the step of obtaining the NAT overtime time is saved, and the first network can be quickly determined to perform standby network switching.
With reference to the first aspect, in a possible implementation manner of the first aspect, the network selection method further includes:
the method comprises the steps of obtaining an available network of the electronic equipment at each preset position in a preset position set and NAT overtime time corresponding to the available network at the preset position, wherein the preset position set is a set of at least one preset position, and the holding time of the electronic equipment in a standby state of the preset position is larger than or equal to a time threshold. And establishing a network database according to the preset position, the available network at the preset position and the NAT timeout time corresponding to the available network at the preset position.
In the scheme, after the preset position is determined, the available network at the preset position and the NAT overtime time corresponding to the available network can be obtained, and then a network database can be established according to the corresponding relation among the preset position, the available network and the NAT overtime time for the subsequent determination of the first network.
In a second aspect, the present application further provides a network selection apparatus, which includes a processing module.
Specifically, the processing module is configured to determine that the electronic device is in a standby state, and when a current first standby network of the electronic device is different from a first network, switch the standby network of the electronic device from the first standby network to the first network, where the first network is a network with the largest NAT timeout time in network address translation among multiple available networks of the electronic device.
With reference to the second aspect, in a possible implementation manner of the second aspect, the processing module is further configured to:
and when the electronic equipment is determined to be switched from the standby state to the working state, switching the standby network of the electronic equipment from the first network to the first standby network.
With reference to the second aspect, in a possible implementation manner of the second aspect, the network selecting apparatus further includes:
the display module is used for displaying the identification of the first standby network on the electronic equipment during the period of switching the standby network of the electronic equipment from the first network to the first standby network.
With reference to the second aspect, in a possible implementation manner of the second aspect, the processing module is specifically configured to:
the electronic equipment is in a screen-off state, and when the electronic equipment meets a first condition, the electronic equipment is determined to be in a standby state, wherein the first condition comprises at least one of the following conditions: the electronic equipment is in a long standby state; the current data flow of the electronic equipment is less than or equal to the flow threshold.
With reference to the second aspect, in a possible implementation manner of the second aspect, the electronic device is in a long standby state, and includes:
the current position of the electronic equipment belongs to one of preset position sets, the preset position set is a set of at least one preset position, and the holding time of the electronic equipment in a standby state of the preset position is greater than or equal to a time threshold;
or,
the maintaining time of the current standby state of the electronic equipment is greater than or equal to the time threshold.
With reference to the second aspect, in a possible implementation manner of the second aspect, the processing module is specifically configured to:
matching in a network database according to the current position of the electronic equipment, and determining N available networks corresponding to the current position and NAT timeout time corresponding to each available network in the N available networks, wherein N is an integer greater than one; the network database comprises at least one available network at a preset position and a corresponding relation of NAT overtime time of the available network at the preset position, and the maintaining time of the electronic equipment in the standby state at the preset position is greater than or equal to a time threshold;
and determining the available network with the maximum NAT timeout time in the N available networks as the first network.
With reference to the second aspect, in a possible implementation manner of the second aspect, the network switching apparatus further includes:
the acquisition module is used for acquiring an available network of the electronic device at each preset position in a preset position set and NAT timeout time corresponding to the available network at the preset position, the preset position set is a set of at least one preset position, and the holding time of the electronic device in a standby state at the preset position is greater than or equal to a time threshold.
And the establishing module is used for establishing a network database according to the preset position, the available network at the preset position and the NAT overtime time corresponding to the available network at the preset position.
In a third aspect, the present application provides an electronic device. The electronic device may include a display screen, a memory, one or more processors. Wherein the memory may store a computer program and the processor may invoke the computer program to cause the electronic device to perform the network selection method according to any of the possible implementations of the first aspect.
In a fourth aspect, the present application provides a computer storage medium including instructions that, when executed on an electronic device, cause the electronic device to perform the network selection method according to any one of the possible implementations of the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip applied to an electronic device, where the chip includes one or more processors, and the processor is configured to invoke a computer instruction to cause the electronic device to execute the network selection method described in any one of the foregoing possible implementation manners of the first aspect.
In a sixth aspect, an embodiment of the present application provides a computer program product including instructions, which, when run on an electronic device, causes the electronic device to perform a network selection method according to any one of the possible implementation manners of the first aspect.
It is to be understood that the network selection apparatus provided in the second aspect, the electronic device provided in the third aspect, the computer storage medium provided in the fourth aspect, the chip provided in the fifth aspect, and the computer program product provided in the sixth aspect are all configured to execute any one of the possible implementations of the first aspect. Therefore, the beneficial effects that can be achieved by the method can refer to the beneficial effects of any one of the possible implementation manners of the first aspect, and are not described herein again.
Drawings
Fig. 1 is a schematic diagram of a NAT-based communication network according to an embodiment of the present application;
fig. 2 is a schematic view of a network selection method provided in an embodiment of the present application;
fig. 3 is a schematic flowchart of a network selection method according to an embodiment of the present application;
fig. 4a is an identification diagram of a communication network according to an embodiment of the present application;
fig. 4b is an identification schematic diagram of another communication network provided by the embodiment of the present application;
fig. 5 is a flowchart illustrating a network selection method according to an embodiment of the present application;
fig. 6 is a schematic hardware structure diagram of a network selection apparatus according to an embodiment of the present disclosure;
fig. 7 is a schematic hardware structure diagram of an electronic device according to an embodiment of the present application;
fig. 8 is a schematic diagram of a software structure of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Wherein in the description of the embodiments of the present application, "/" indicates an inclusive meaning, for example, a/B may indicate a or B; "and/or" in the text is only an association relationship describing an associated object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone.
In the description of the embodiments of the present application, "a plurality" means two or more than two. It should be understood that the terms "first," "second," and the like in the description and claims of this application and in the drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements but may alternatively include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the specification. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by a person skilled in the art that the embodiments described herein can be combined with other embodiments.
For ease of understanding, the following description will first refer to related terms related to embodiments of the present application.
(1) NAT table
With respect to Network Address Translation (NAT) technology, since the public IP Address is limited, a gateway can allow a part of users to share different ports of a public IP Address for communication. Illustratively, when the user uses the terminal to carry out communication, the intranet IP address of the gateway is used. After receiving the data packet of the user, the gateway allocates a public network IP address and a random port for the user, and then uses the public network IP address and the random port to communicate with the server. After the server processes the data, the server sends a new data packet to the public network IP address and the random port, namely to the gateway. And after receiving the new data packet, the gateway transmits the new data packet to the user. The NAT table means that the gateway stores the correspondence between the public network IP address and the random port to the user. The gateway includes an operator gateway or a router, etc.
Referring to fig. 1, fig. 1 is a schematic diagram of a NAT-based communication network according to an embodiment of the present application. The following is illustrated by specific examples:
assume that the server is at a fixed public network IP address B, the server provides the service at port 80, and the client requests the service at port 400. The IP address of the user in the intranet is a, and the IP address of the operator gateway in the public network is G.
The user knows the IP address and port number of the server and can send user data, i.e. packet a, to the IP address B of the server via port number 400.
After receiving the data packet a of the user, the operator gateway determines whether the path is the first transmission. If yes, a random port is distributed to the user for communication, and the corresponding relation between the port and the intranet IP of the user and the port is recorded. Assuming the first transmission by the user, the user is assigned a random temporary port 12345 and records the request of port 12345 corresponding to intranet IP address a, port 400. The operator gateway forwards the user data to the server through port 12345.
The server receives the data packet a, and records the corresponding relationship between the IP address G and the port 12345 in the data packet a and the user. The server can send information to the user as required according to the recorded corresponding relation. For example, the server sends the data packet B to the port 12345 of the IP address G, and after receiving the data packet, the operator gateway searches for the intranet IP and the port corresponding to the port 12345. In the found corresponding relationship, if the port corresponds to the intranet IP address a and the request of the port 400, the operator gateway forwards the data packet B to the port 400 of the IP address a, and the user can receive the data packet B.
(2) NAT timeout time
Because the port resources are limited, the gateway cannot store the corresponding relation in the NAT table for a long time. If there is no data transmission on the channel corresponding to a certain corresponding relation in the NAT table within a period of time, the corresponding relation is released, and the period of time is the NAT overtime time. After the correspondence relationship is released, the user side and the server side cannot communicate.
In the prior art, a terminal and a Push (Push) server need to maintain a connection state all the time, that is, a constant connection state. In order to avoid that the terminal cannot receive the push message of the push server due to NAT timeout, the push server and the client on the terminal need to transmit data periodically to ensure that the data transmission is always performed in the channel between the push server and the client, the periodically transmitted data is a heartbeat packet, and the interval for transmitting the heartbeat packet needs to be less than the NAT timeout time. However, if the NAT timeout is set to be small, the terminal may be woken up frequently to keep constant connection without interruption, which affects the standby time of the terminal.
In order to solve the foregoing technical problem, embodiments of the present application provide a network selection method, which can effectively reduce standby power consumption of an electronic device and improve standby duration of the electronic device.
In the embodiment of the present application, the method may be applied to other devices such as an electronic device, for example, the electronic device executes the network selection method, that is, the electronic device executes the network selection method about itself. For another example, the network selection method described above may be performed by another device, such as the network selection method performed by the electronic device a with respect to the electronic device B.
Further, the electronic device may be a smart phone, a smart television, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a Personal Digital Assistant (PDA), an Augmented Reality (AR) device, a Virtual Reality (VR) device, an Artificial Intelligence (AI) device, a wearable device, a vehicle-mounted smart device, a smart home device, and/or a city device, etc. The embodiment of the present application does not specifically limit the specific type of the electronic device.
Referring to fig. 2, fig. 2 is a schematic view of a scenario of a network selection method according to an embodiment of the present application. Exemplarily, in this embodiment, the electronic device takes the mobile phone 205 as an example, and it is assumed that the mobile phone 205 has two mobile phone communication cards, both of which are in an available state, a first mobile phone communication card corresponds to the first data network 203, and a second mobile phone communication card corresponds to the second data network 204; and the handset 205 is often connected to the router 202 using its WiFi network, the available networks of the handset 205 include a first data network 203, a second data network 204, and a WiFi network, through which the handset 205 can always connect to the push server 201.
By using the method of the embodiment of the present application, after it is determined that the mobile phone 205 is in the standby state, a network with a longer NAT timeout time can be automatically selected for standby. Specifically, assuming that the mobile phone 205 is in a standby state in the first data network 203, since the NAT timeout time of the WiFi network is X minutes, the NAT timeout time of the first data network 203 is Y minutes, the NAT timeout time of the second data network 204 is Z minutes, and X < Y < Z. When the standby network is automatically selected, the second data network 204 with the largest NAT timeout time is selected, and the standby network of the handset 205 is automatically switched from the first data network 202 to the second data network 204, so as to avoid the handset 205 from being frequently awakened due to constant connection with the push server 201, thereby reducing the standby power consumption of the handset 205 and prolonging the standby duration of the handset 205.
The network selection method is explained in detail below.
Referring to fig. 3, fig. 3 is a schematic flowchart of a network selection method according to an embodiment of the present application. The network selection method 300 includes step 301.
301. And determining that the electronic equipment is in a standby state and the current first standby network of the electronic equipment is different from the first network, and switching the standby network of the electronic equipment from the first standby network to the first network.
The first network is a network with the largest NAT timeout time in the network address translation among a plurality of available networks of the electronic equipment.
The standby state of the electronic device is exemplarily a state in which the electronic device is turned on but the user does not perform any operation. However, the definition of the standby state includes, but is not limited to, the case of the above-described example.
The above plural means two or more. The network refers to a communication network available and connectable to the electronic device, and includes at least one of a mobile communication network, a Wireless Local Area Network (WLAN) hotspot, and the like, where the mobile communication network may be a 2G mobile communication network, a 3G mobile communication network, a 4G mobile communication network, a 5G mobile communication network, and the like; and WLAN refers to the use of wireless communication technology to interconnect electronic devices so that they can communicate with each other and share resources. The WLAN hotspot may be at least one of a personal hotspot, wiFi (also known as a mobile hotspot), and the like.
Specifically, the standby network switching conditions are as follows: the electronic equipment is in a standby state, a current first standby network of the electronic equipment is different from the first network, and the number of the standby networks of the electronic equipment is more than one.
By the aid of the scheme, standby network with the largest NAT timeout time is selected for standby, standby power consumption of the electronic equipment can be effectively reduced, and standby time of the electronic equipment is prolonged. By the scheme, the electronic equipment can not only normally use the message push service, but also effectively reduce the standby power consumption of the electronic equipment.
In some possible implementations, in the network selection method, when it is determined that the electronic device is switched from the standby state to the operating state, the standby network of the electronic device is switched from the first network to the first standby network.
The operating state refers to a state in which a user operates the electronic device. There are many ways to determine that the electronic device is in the working state, including but not limited to at least one of the following:
the data flow of the electronic device is greater than the flow threshold, and the specific value of the flow threshold may be set according to an actual situation, which is not particularly limited. For example, the electronic device may have an application to download an update package or system update at night.
The electronic equipment exits the screen-off state and is in a screen-on state. For example, the user wakes up the electronic device for use, and may be a key (virtual key or physical key) operation wake-up, a voice wake-up, a face, fingerprint or iris recognition wake-up, a gesture wake-up, a lift-up wake-up, a slide wake-up, and the like.
The electronic device exits the quiescent state. For example, a user picking up the electronic device is detected.
In this scheme, when the standby network of the electronic device is the first network, if the electronic device is detected to be in the operating state, the standby network of the electronic device is switched from the first network back to the first standby network. The state change of the electronic equipment is responded, and the standby network switching can be carried out, so that the normal use of the electronic equipment by a user is not influenced, and the standby power consumption of the electronic equipment can be reduced.
In some possible implementations, the network selection method further includes:
during switching of the standby network of the electronic device from the first network to the first standby network, an identification of the first standby network is displayed on the electronic device.
In the scheme, the identification of the first standby network is displayed on the electronic equipment during the switching from the first network to the first standby network, so that the public opinion problem caused by the fact that a user finds the change of the network identification is avoided. In order to ensure that the user cannot find out the change of the network identifier, when the standby network is switched to the first network, the identifier of the first network is not displayed on the electronic equipment, but the identifier of the first standby network is continuously displayed on the electronic equipment. Further, in the whole process executed by the network selection method of the embodiment of the present application, the identifier of the first standby network selected by the user is continuously displayed on the electronic device, that is, the display of the network identifier is switched without following the change of the automatic standby network selection. For example, if the standby network currently selected by the user (for example, the user operates and selects a communication network corresponding to a mobile phone communication card for data transmission on the electronic device) is the first standby network, when the automatic standby network switching according to the embodiment of the present application occurs, the identifier of the first standby network is still displayed on the electronic device. When the standby network currently selected by the user is a second standby network (such as a WiFi network), the identifier of the second standby network is still displayed on the electronic device when the automatic standby network switching of the application embodiment occurs.
Further, the identifier of the standby network may be a text identifier, a pattern identifier, or the like. The text identifier may be composed of at least one of letters, numbers, special characters, and the like, for example, the identifier of the communication network corresponding to the mobile phone communication card may be "card 1", "card 2", "SIM1", "SIM2", and the like.
And the pattern identification is to identify different communication networks by using different patterns or a combination of the patterns and characters (such as at least one of letters, numbers, special characters and the like). Referring to fig. 4a, fig. 4a is a schematic identification diagram of a communication network provided in an embodiment of the present application, where the communication network corresponding to different SIM cards is identified in fig. 4a in a frame plus number form. "1" in fig. 4a represents a communication network corresponding to the SIM card 1, and "2" in fig. 4a represents a communication network corresponding to the SIM card 2. For another example, referring to fig. 4b, fig. 4b is an identification schematic diagram of another communication network provided in the embodiment of the present application; in fig. 4b three vertical lines of unequal length and text are used to identify the different communication networks. "4G" in fig. 4b denotes a 4G mobile communication network, and "5G" in fig. 4b denotes a 5G mobile communication network.
In some possible implementations, the determining that the electronic device is in the standby state includes:
the electronic equipment is in a screen-off state, and when the electronic equipment meets a first condition, the electronic equipment is determined to be in a standby state, wherein the first condition comprises at least one of the following conditions:
the electronic equipment is in a long standby state;
the current data flow of the electronic equipment is less than or equal to the flow threshold.
The long standby state refers to a long standby state, and the specific definition can be set according to the actual situation. Specifically, the method for determining that the electronic device is in the standby state includes the following cases:
in the first case, when the electronic device is in the screen-off state and the long standby state, it may be determined that the electronic device is in the standby state. According to the screen-off state, the fact that the user does not operate the electronic equipment can be confirmed; in the long-time standby scene, the benefits of reducing the standby power consumption of the electronic equipment are large, frequent standby network switching can be avoided, and the equipment use experience of a user is guaranteed.
In the second case, when the electronic device is in the screen-off state and the current data traffic of the electronic device is less than or equal to the traffic threshold, it may be determined that the electronic device is in the standby state. The data flow of the electronic equipment can reflect the operation amount of the electronic equipment, when the data flow is smaller than or equal to the flow threshold value, the operation amount of the electronic equipment can be judged to be small, and the standby network switching can not affect the normal use of the electronic equipment by a user. In addition, the standby network switching is carried out under the condition that the data traffic of the electronic equipment is less, so that the condition of traffic consumption caused by the standby network switching can be avoided.
The specific value of the flow threshold may be set according to actual conditions, and is not particularly limited. The flow rate threshold value may be the same as or different from the flow rate threshold value used for determining that the electronic device is in the operating state.
In a third case, when the electronic device is in the screen-off state and the long standby state, and the current data traffic of the electronic device is less than or equal to the traffic threshold, it may be determined that the electronic device is in the standby state. And under a low-flow long-standby scene, standby network switching is carried out, so that the standby power consumption can be reduced, the normal use of electronic equipment by a user is not influenced, and the flow consumption condition can be avoided.
Further, the first condition may further include a stationary state or the like. Accordingly, the first case at this time is: when the electronic device is in the screen-off state, the long standby state and the static state, it may be determined that the electronic device is in the standby state described above. The second case at this time is that the electronic device is in a screen-off state, the current data traffic of the electronic device is less than or equal to the traffic threshold, and when the electronic device is in a static state, it may be determined that the electronic device is in the standby state described above. The third case at this time is that the electronic device is in a screen-off state and a long standby state, the current data traffic of the electronic device is less than or equal to the traffic threshold, and when the electronic device is in a static state, it may be determined that the electronic device is in the standby state.
Further, the method for determining that the electronic device is in the stationary state includes, but is not limited to, detecting a motion velocity, a motion acceleration, or an angular velocity of the electronic device, and when the detected motion velocity, motion acceleration, or angular velocity is not zero, the electronic device may be determined to be in the stationary state.
For example, the above-mentioned primary condition for determining whether the electronic device is in the standby state is that the electronic device is in the screen-off state, that is, after determining that the electronic device is in the screen-off state, the subsequent determination is performed, and when the electronic device is in the screen-on state, the subsequent determination is not performed.
In some possible implementations, the method for determining that the electronic device is in the long standby state includes any one of the following first method and second method.
In the first method, the current position of the electronic device belongs to one of a preset position set, the preset position set is a set of at least one preset position, and the holding time of the electronic device in the standby state of the preset position is greater than or equal to a time threshold.
In this embodiment, the preset position is a position that satisfies the long standby state, and may be, for example, a position determined in advance according to history data of the electronic device. Therefore, when the location of the electronic device belongs to one of the preset location sets, the current state of the electronic device is the long standby state.
Further, the history data of the electronic device may include at least one of on-off screen time, traffic usage habits, network connection history, historical location, and the like of the electronic device, where the traffic usage habits include historical traffic of the whole electronic device, and the network connection history includes at least one of a WiFi name of a historical connection, a mobile base station of a historical access, and the like, and the network connection history may be used to assist in determining whether the electronic device is in a stationary state, and when there is a network connection, it may be determined that the electronic device is in a non-stationary state.
Furthermore, the traffic usage habit may further include historical traffic corresponding to each application of the electronic device, and the occurrence time of the large traffic operation of each application may be learned according to the historical traffic corresponding to each application, for example, when learning that the application a often downloads an update package for version update at night 2, when determining that the standby network switching is possible, it is determined whether the current time is the predicted occurrence time of the large traffic operation, and if so, the standby network switching is not performed. Or, judging whether a period of time (specific numerical value is set according to actual conditions) after the current time includes the predicted occurrence time of the large-flow operation, if so, not switching the standby network.
For example, the historical location may be determined by using the geographic location of the electronic device, the WiFi connected to the electronic device, or the communication base station accessed by the electronic device, that is, the IP address where the WiFi network is located or the geographic location or the IP address of the communication base station is used as the historical location of the electronic device, and the geographic location of the electronic device may be determined by using a positioning method such as GPS, base station positioning, and the like.
When the preset position is determined from the history data, the preset position may be determined by a clustering method, a deep learning method, or the like. The clustering method can determine the historical position which meets the long standby state and has the highest occurrence frequency according to the historical data in a period of time. Illustratively, the deep learning method is to use historical data in a period of time for information sorting, analysis and prediction to determine the historical position which satisfies the long standby state and has the highest occurrence frequency. Further, the specific value of the time threshold for determining whether the long standby state is satisfied may be set according to the actual situation, and is not particularly limited. Specifically, by using any of the above methods for determining whether the electronic device is in the standby state, whether the electronic device is in the standby state is determined according to the history data, the duration time, i.e., the holding time, of the standby state of the electronic device is recorded, and whether the electronic device satisfies the long standby state is determined according to the length of the holding time and the time threshold.
The determining whether the current location of the electronic device belongs to one of the preset location sets may include: the determination is carried out by means of geo-fencing, wiFi network matching, communication base station matching and the like. Specifically, when the preset position is the geographic position, the geo-fence is determined according to the preset position, and when the electronic device enters the geo-fence, the current position of the electronic device can be determined to belong to one of the preset position sets. And for the method of determining whether the WiFi network belongs to one of the preset position sets or not through WiFi network matching, at the moment, the preset position is the IP address where the WiFi network is located, and if the electronic equipment is supposed to have accessed a certain WiFi network in the preset position, the WiFi name or the IP address of the WiFi network is recorded. When the electronic device accesses the WiFi network again, matching is performed according to the WiFi name and/or the IP address, that is, whether the current location of the electronic device belongs to one of the preset location sets may be determined, and when the name and/or the IP address are matched, it may be determined that the current location of the electronic device belongs to one of the preset location sets. Similarly, when the preset location is the geographic location or the IP address of the communication base station, the method is similar to the WiFi network matching method, and details are not repeated here.
In the second method, the holding time of the current standby state of the electronic device is greater than or equal to the time threshold. By determining whether the electronic device is in the standby state (for example, by the above-mentioned method for determining whether the electronic device is in the standby state, or by other methods, without limitation), the duration of the electronic device in the standby state, that is, the duration, is recorded, and whether the electronic device satisfies the long standby state is determined according to the length of the duration.
The specific value of the time threshold may be set according to actual conditions, and is not particularly limited.
In some possible implementations, the determining that the electronic device is in a standby state and the current first standby network of the electronic device is different from the first network, switching the standby network of the electronic device from the first standby network to the first network includes:
after the electronic equipment is determined to be in the standby state, the number of available networks of the electronic equipment and the NAT timeout time are detected, when the number of the available networks is larger than one, the available network with the largest NAT timeout time is determined to be used as the first network from the two or more available networks, whether the current first standby network and the first network are the same or not is determined, and no operation is performed when the first standby network and the first network are the same. And when the first standby network is different from the first network, switching the standby network of the electronic device from the first standby network to the first network.
In some possible implementations, the determining that the electronic device is in a standby state and the current first standby network of the electronic device is different from the first network, switching the standby network of the electronic device from the first standby network to the first network includes:
and matching in a network database according to the current position of the electronic equipment, and determining N available networks corresponding to the current position and NAT overtime time corresponding to each available network in the N available networks. N is an integer greater than one. The network database comprises at least one available network at a preset position and the corresponding relation of the NAT timeout time of the available network at the preset position, and the holding time of the electronic equipment in the standby state at the preset position is larger than or equal to a time threshold. And determining the available network with the maximum NAT timeout time in the N available networks as the first network.
In the scheme, the available networks of the electronic equipment do not change greatly at the same position, so when the current position of the electronic equipment is matched with the position in the network database, the first network can be determined by using the N available networks corresponding to the matched position and the NAT overtime time of the N available networks, the step of obtaining the NAT overtime time is saved, and the first network can be quickly determined to perform standby network switching.
In some possible implementations, the network selection method further includes:
the method includes the steps that an available network of the electronic device at each preset position in a preset position set and NAT overtime time corresponding to the available network at the preset position are obtained. And establishing a network database according to the preset position, the available network at the preset position and the NAT timeout time corresponding to the available network at the preset position.
In the scheme, after the preset position is determined, the available network at the preset position and the NAT timeout time corresponding to the available network can be obtained, and then a network database can be established according to the corresponding relation of the preset position, the available network and the NAT timeout time so as to be used for subsequently determining the first network.
In some possible implementations, the network selection method further includes:
before the network selection scheme of the embodiment of the present application is executed, the network condition of the electronic device may be determined according to a certain period, and it is determined that the electronic device has multiple available networks. Specifically, it may be determined whether each data traffic network of the electronic device is unblocked by sending an Internet Packet finder (PING) request Packet or initiating a data access request with a small traffic. The request generally reduces the consumption of traffic and the request time as much as possible, and avoids unnecessary power consumption and traffic loss. If the electronic device is found to be not plugged in the mobile phone communication card or the network is not connected due to arrearages or poor communication networks when the request is made, so that the available networks of the electronic device are zero or one, the network selection scheme of the embodiment of the application is not executed.
In order to more clearly describe the network selection method in the embodiment of the present application, an example is given below in which the electronic device is a mobile phone:
referring to fig. 5, fig. 5 is a flowchart illustrating a network selection method according to an embodiment of the present application.
Firstly, during daily use, the preset positions in a long standby state can be learned at certain time intervals, the NAT timeout time of the available networks in the preset positions is detected, the preset positions, the available networks corresponding to the preset positions and the detected NAT timeout time are stored, and at least one learned preset position serves as a preset position set.
Illustratively, the specific value of the time interval may be set according to the actual situation, and is not particularly limited. For example, the preset positions in the long standby state are learned every month, and at least one preset position can be obtained by self-learning through historical data (such as screen-on time, screen-off time, network connection condition, historical positions and the like) of the mobile phone. And then, using the relative capability of the Link Turbo and the detection capability of the PUSH application program, identifying all available networks of the user at the position at the preset position, and caching the NAT timeout time, thereby avoiding the situation of repeatedly acquiring the NAT timeout time.
For example, link Turbo function may be used to try to connect all available networks (for example, a mobile phone has two mobile phone communication cards and multiple connectable WiFi networks) for a short time, and for each network, using the detection function of PUSH application to detect whether the network is available, and obtain and cache network parameters such as NAT timeout.
Then, in order to reduce unnecessary data processing procedures, the network condition of the user's handset can be judged according to a certain period. Before continuing to execute the scheme, whether the data traffic network of the user is smooth or not can be judged by sending a PING packet or initiating a data access request with small traffic. Such requests generally reduce traffic consumption and request time as much as possible, avoiding unnecessary power consumption and traffic loss. If the user does not insert a card or the network is not passed due to the reason that the mobile phone is arreared or the network is not good is found in the request, and the available networks of the mobile phone are determined to be one or zero, the scheme cannot be continuously executed. The specific value of the period may be set according to actual conditions, and is not particularly limited.
And then, judging whether the mobile phone is in a screen-off state, if so, continuing to execute the following scheme, otherwise, not doing any operation. And judging whether the current position of the user belongs to one of the preset position sets or not through modes such as geo-fencing, wiFi network matching and the like, if so, continuing to execute the following scheme, and otherwise, not doing any operation. The determining step is used for determining whether the user is in an environment where the mobile phone is not used for a long time (for example, the user sleeps at home at night or does not use the mobile phone for a long time in a company office) and the mobile phone of the user is in a static state.
And then, judging whether the current flow of the mobile phone is less than or equal to a flow threshold, if so, continuing to execute the following scheme, otherwise, not doing any operation. Judging whether the number of the current available networks of the mobile phone is more than 1, if so, selecting one available network with the largest NAT overtime time as a first network from the available networks with the number of the current available networks more than 1, and switching the standby network of the mobile phone to the first network if the standby network of the current mobile phone is different from the first network; otherwise, no operation is done.
The above-mentioned judging whether the current position of the user belongs to one of the preset position sets, judging whether the current flow of the mobile phone is less than or equal to the flow threshold, and judging whether the current available network of the mobile phone is greater than 1, the sequence of the three judging steps can be adjusted at will, and is not limited.
If the user has operations such as lifting hands, sliding, brightening the screen, bursting large flow scenes and the like during screen off, the user immediately exits the scheme and recovers the network connection before entering the scheme, thereby avoiding unexpected fee deduction or inconvenient use when the user uses the system. During the period from the screen-off to the time when the user turns on the screen to reconnect the original network, the icon on the user interaction interface is kept unchanged, and the public opinion problem caused by the fact that the network connection changes after the user turns on the screen is avoided.
The following describes an apparatus according to an embodiment of the present application.
Fig. 6 is a schematic hardware structure diagram of a network selection apparatus according to an embodiment of the present disclosure.
The network selection apparatus 600 includes a processing module 601. Specifically, the processing module 601 is configured to determine that the electronic device is in a standby state, and when a current first standby network of the electronic device is different from a first network, switch the standby network of the electronic device from the first standby network to the first network, where the first network is a network with the largest network address translation NAT timeout time among multiple available networks of the electronic device.
In some possible implementations, the processing module 601 is further configured to:
and when the electronic equipment is determined to be switched from the standby state to the working state, switching the standby network of the electronic equipment from the first network to the first standby network.
In some possible implementations, the network selection apparatus 600 further includes:
a display module 602, configured to display an identifier of a first standby network on an electronic device during switching of the standby network of the electronic device from the first network to the first standby network.
In some possible implementations, the processing module 601 is specifically configured to:
the electronic equipment is in a screen-off state, and when the electronic equipment meets a first condition, the electronic equipment is determined to be in a standby state, wherein the first condition comprises at least one of the following conditions: the electronic equipment is in a long standby state; the current data flow of the electronic equipment is less than or equal to the flow threshold.
In some possible implementations, the electronic device is in a long standby state, including:
the current position of the electronic equipment belongs to one of preset position sets, the preset position set is a set of at least one preset position, and the holding time of the electronic equipment in a standby state of the preset position is greater than or equal to a time threshold;
or,
the maintaining time of the current standby state of the electronic equipment is larger than or equal to the time threshold.
In some possible implementations, the processing module 601 is specifically configured to:
matching in a network database according to the current position of the electronic equipment, and determining N available networks corresponding to the current position and NAT timeout time corresponding to each available network in the N available networks, wherein N is an integer greater than one; the network database comprises at least one available network at a preset position and a corresponding relation of NAT overtime time of the available network at the preset position, and the maintenance time of the electronic equipment in a standby state at the preset position is greater than or equal to a time threshold;
and determining the available network with the maximum NAT timeout time in the N available networks as the first network.
In some possible implementations, the network switching apparatus 600 further includes:
an obtaining module 603, configured to obtain an available network at each preset position in a preset position set of the electronic device and NAT timeout time corresponding to the available network at the preset position, where the preset position set is a set of at least one preset position, and a holding time of the electronic device in a standby state at the preset position is greater than or equal to a time threshold.
The establishing module 604 is configured to establish a network database according to the preset location, the available network at the preset location, and the NAT timeout time corresponding to the available network at the preset location.
It should be noted that, for the specific implementation process and the corresponding beneficial effects of the network selection apparatus 600, reference may be made to the relevant description of the network selection method 300, and details are not repeated.
Fig. 7 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
The electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management Module 140, a power management Module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication Module 150, a wireless communication Module 160, an audio Module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor Module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identity Module (SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the illustrated structure of the embodiment of the present invention does not limit the electronic device. In other embodiments of the present application, an electronic device may include more or fewer components than shown in FIG. 7, or some components may be combined, some components may be split, or a different arrangement of components may be used. The components shown in fig. 7 may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: 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 memory, a video codec, a Digital Signal Processor (DSP), a baseband Processor, and/or a Neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors.
The controller can be a neural center and a command center of the electronic device. The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
In the embodiments provided in the present application, the electronic device may execute the network selection method according to any of the above embodiments through the processor 110.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In some embodiments, processor 110 may include one or more interfaces. The USB interface 130 is an interface conforming to the USB standard specification, and may be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device, and may also be used to transmit data between the electronic device and a peripheral device. And the earphone can also be used for connecting an earphone and playing audio through the earphone. The interface may also be used to connect other electronic devices, such as AR devices and the like.
The charging management module 140 is configured to receive charging input from a charger. The charging management module 140 may also supply power to the electronic device through the power management module 141 while charging the battery 142.
The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charging management module 140, and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like.
The wireless communication function of the electronic device may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, the baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in an electronic device may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas.
The mobile communication module 150 may provide a solution including 2G/3G/4G/5G wireless communication applied to the electronic device. The mobile communication module 150 may include at least one filter, a switch, a power Amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then passes the demodulated low frequency baseband signal to a baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194.
The Wireless Communication module 160 may provide solutions for Wireless Communication applied to electronic devices, including Wireless Local Area Networks (WLANs) (e.g., wireless Fidelity (Wi-Fi) Networks), bluetooth (BT), global Navigation Satellite System (GNSS), frequency Modulation (FM), near Field Communication (NFC), infrared (IR), and the like. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves through the antenna 2 to radiate the electromagnetic waves.
In some embodiments, antenna 1 of the electronic device is coupled to mobile communication module 150 and antenna 2 is coupled to wireless communication module 160 so that the electronic device can communicate with networks and other devices through wireless communication techniques.
The electronic device implements the display function through the GPU, the display screen 194, and the application processor, etc. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The Display panel may be a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), an Active Matrix Organic Light-Emitting Diode (Active-Matrix Organic Light-Emitting Diode, AMOLED), a flexible Light-Emitting Diode (FLED), a Mini LED, a Micro-OLED, a Quantum Dot Light-Emitting Diode (QLED), or the like. In some embodiments, the electronic device may include 1 or N display screens 194, N being a positive integer greater than 1.
The electronic device may implement the acquisition function via the ISP, camera 193, video codec, GPU, display screen 194, application processor, etc.
The ISP is used to process the data fed back by the camera 193. For example, when a user takes a picture, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, an optical signal is converted into an electric signal, and the camera photosensitive element transmits the electric signal to the ISP for processing and converting into an image or video visible to the naked eye. The ISP can also carry out algorithm optimization on the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a Complementary Metal-Oxide-Semiconductor (CMOS) phototransistor. The light sensing element converts the optical signal into an electrical signal, which is then transmitted to the ISP for conversion into a digital image or video signal. And the ISP outputs the digital image or video signal to the DSP for processing. The DSP converts the digital image or video signal into image or video signal in standard RGB, YUV and other formats.
In some embodiments, the electronic device may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process digital images or video signals and other digital signals. For example, when the electronic device selects a frequency point, the digital signal processor is used for performing fourier transform and the like on the frequency point energy.
Video codecs are used to compress or decompress digital video. The electronic device may support one or more video codecs. In this way, the electronic device can play or record video in a variety of encoding formats, such as: moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.
The NPU is a Neural-Network (NN) computing processor, which processes input information quickly by referring to a biological Neural Network structure, for example, by referring to a transfer mode between neurons of a human brain, and can also learn by itself continuously. The NPU can realize applications such as intelligent cognition of electronic equipment, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the memory capability of the electronic device. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music, video, etc. are saved in an external memory card.
The internal memory 121 may be used to store computer-executable program code, which includes instructions. The processor 110 executes various functional applications of the electronic device and data processing by executing instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. The storage program area may store an operating system, an application program (such as a sound playing function, an image and video playing function, etc.) required by at least one function, and the like. The data storage area can store data (such as audio data, phone book and the like) created in the using process of the electronic device.
The electronic device may implement audio functions via the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into analog audio signals for output, and also used to convert analog audio inputs into digital audio signals.
The speaker 170A, also called a "horn", is used to convert the audio electrical signal into an acoustic signal.
The receiver 170B, also called "earpiece", is used to convert the electrical audio signal into an acoustic signal.
The microphone 170C, also referred to as a "microphone," is used to convert sound signals into electrical signals. The electronic device may be provided with at least one microphone 170C.
The earphone interface 170D is used to connect a wired earphone.
The sensor module 180 may include 1 or more sensors, which may be of the same type or different types. It is understood that the sensor module 180 shown in fig. 7 is only an exemplary division, and other division is possible, which is not limited in this application.
The pressure sensor 180A is used for sensing a pressure signal, and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. When a touch operation is applied to the display screen 194, the electronic device detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device may also calculate the position of the touch from the detection signal of the pressure sensor 180A. In some embodiments, the touch operations that are applied to the same touch position but different touch operation intensities may correspond to different operation instructions.
The gyro sensor 180B may be used to determine the motion pose of the electronic device. In some embodiments, the angular velocity of the electronic device about three axes (i.e., x, y, and z axes) may be determined by the gyroscope sensor 180B. The gyro sensor 180B may be used for photographing anti-shake.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device calculates altitude, aiding in positioning and navigation, from barometric pressure values measured by barometric pressure sensor 180C.
The magnetic sensor 180D includes a hall sensor. The electronic device may detect the opening and closing of the flip holster using the magnetic sensor 180D.
The acceleration sensor 180E can detect the magnitude of acceleration of the electronic device in various directions (typically three axes). When the electronic device is stationary, the magnitude and direction of gravity can be detected. The method can also be used for recognizing the posture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and other applications.
A distance sensor 180F for measuring a distance. The electronic device may measure distance by infrared or laser. In some embodiments, taking a picture of a scene, the electronic device may utilize the distance sensor 180F to range to achieve fast focus.
The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device emits infrared light to the outside through the light emitting diode. The electronic device uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device. When insufficient reflected light is detected, the electronic device may determine that there are no objects near the electronic device.
The ambient light sensor 180L is used to sense the ambient light level. The electronic device may adaptively adjust the brightness of the display screen 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust the white balance when taking a picture. The ambient light sensor 180L may also cooperate with the proximity light sensor 180G to detect whether the electronic device is in a pocket to prevent accidental touches.
In some embodiments of the present application, an ambient light sensor 180L in the electronic device may be used to acquire and communicate ambient brightness to a corresponding processing module (e.g., processor 110, etc.).
The fingerprint sensor 180H is used to acquire a fingerprint.
The temperature sensor 180J is used to detect temperature.
The touch sensor 180K is also referred to as a "touch panel". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is used to detect a touch operation applied thereto or nearby. The touch sensor can communicate the detected touch operation to the application processor to determine the touch event type. Visual output associated with the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor 180K may be disposed on the surface of the electronic device at a different position than the display screen 194.
The bone conduction sensor 180M may acquire a vibration signal.
The keys 190 include a power-on key, a volume key, and the like. The keys 190 may be mechanical keys. Or may be touch keys. The electronic device may receive a key input, and generate a key signal input related to user settings and function control of the electronic device.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration cues, as well as for touch vibration feedback. For example, touch operations applied to different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also respond to different vibration feedback effects for touch operations applied to different areas of the display screen 194. Different application scenes (such as time reminding, receiving information, alarm clock, game and the like) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
Indicator 192 may be an indicator light that may be used to indicate a state of charge, a change in charge, or a message, missed call, notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card can be attached to and detached from the electronic device by being inserted into the SIM card interface 195 or being pulled out of the SIM card interface 195. The electronic equipment can support 1 or N SIM card interfaces, and N is a positive integer greater than 1. The electronic equipment realizes functions of conversation, data communication and the like through the interaction of the SIM card and the network. In some embodiments, the electronic device employs esims, namely: an embedded SIM card. The eSIM card can be embedded in the electronic device and cannot be separated from the electronic device.
Fig. 8 is a schematic diagram of a software structure of an electronic device according to an embodiment of the present application.
As shown in fig. 8, a software framework of an electronic device according to the present application may include an application Framework (FWK) layer, an application layer, and a hardware layer.
The Application framework layer provides an Application Programming Interface (API) and a Programming framework for an Application program of the Application layer. The application framework layer includes a number of predefined functions.
As shown in fig. 8, the application framework layer may include a Link Turbo function, a scene recognition function, and a real-time data acquisition function, where the Link Turbo function is used to acquire all available networks of the electronic device and transmit available network information to the application layer for use. And the function of the scene identification function is used for acquiring the use scene, namely identifying whether the electronic equipment is in a long standby state or not, and transmitting the state information to the application program layer for use. And the function of the fact data acquisition function is used for counting the network speed of the electronic equipment in real time and transmitting the network speed information to the application program layer for use.
The application layer may include a series of application packages, such as PUSH, power saving sprites, etc., and may also include applications (also referred to as applications) such as camera, gallery, calendar, phone call, map, navigation, WLAN, bluetooth, music, video, short message, etc. Wherein the camera is used for acquiring images and videos. For other applications of the application layer, reference may be made to descriptions and illustrations in the conventional art, which are not provided herein. In this application, the application on the electronic device may be a native application (for example, an application installed in the electronic device when the operating system is installed before the electronic device leaves a factory), or may be a third-party application (for example, an application installed by a user through an application store), and the embodiment of the present application is not limited.
And the PUSH is used for acquiring the NAT timeout time of the available network and transmitting the NAT timeout time information to the power saving sprite when the power saving sprite is needed. And the power-saving sprite is used for information integration, and whether to perform standby network switching is determined according to the network selection method of the embodiment of the application.
The hardware layer comprises various hardware of the electronic equipment, such as a WiFi communication module and a Modem (Modem), the power-saving puck selects a standby network according to the network selection method of the embodiment of the application, when the standby network switching is determined to be needed, a control signal is sent to the hardware layer, and the hardware layer responds to the control signal to perform the standby network switching.
It should be noted that the software structure diagram of the electronic device shown in fig. 8 provided in the present application is only an example, and does not constitute a specific limitation to the electronic device.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the network selection method of the present application may be embodied in the form of a computer program product, which is stored in a storage medium and includes several instructions for causing an electronic device to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The embodiment of the present application further provides a chip, where the chip is applied to an electronic device, and the chip includes one or more processors, and the processor is configured to invoke a computer instruction to enable the electronic device to execute the network selection method according to any of the above embodiments.
Embodiments of the present application further provide a computer program product including instructions, which, when run on an electronic device, causes the electronic device to execute the network selection method according to any of the above embodiments.
It will be appreciated that the computer storage medium, the chip, and the computer program product provided above are all adapted to perform the network selection method of any of the above embodiments. Therefore, the beneficial effects that can be achieved by the method for selecting a network according to any of the embodiments can be referred to, and details are not repeated herein.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (14)

1. A method of network selection, the method comprising:
determining that electronic equipment is in a standby state, and when a current first standby network of the electronic equipment is different from a first network, switching the standby network of the electronic equipment from the first standby network to the first network, wherein the first network is a network with the largest Network Address Translation (NAT) timeout time in a plurality of available networks of the electronic equipment.
2. The method of claim 1, wherein the method further comprises:
and switching the standby network of the electronic equipment from the first network to the first standby network when the electronic equipment is determined to be switched from the standby state to the working state.
3. The method of claim 2, further comprising:
displaying, on the electronic device, an identification of the first standby network during switching of the standby network of the electronic device from the first network to the first standby network.
4. The method according to any one of claims 1 to 3, wherein the determining that the electronic device is in a standby state comprises:
the electronic equipment is in a screen-off state, and when the electronic equipment meets a first condition, it is determined that the electronic equipment is in a standby state, where the first condition includes at least one of:
the electronic equipment is in a long standby state;
the current data flow of the electronic equipment is smaller than or equal to a flow threshold value.
5. The method of claim 4, wherein the electronic device is in a long standby state comprising:
the current position of the electronic equipment belongs to one of preset position sets, the preset position set is a set of at least one preset position, and the holding time of the electronic equipment in a standby state of the preset position is greater than or equal to a time threshold;
or,
the maintaining time of the current standby state of the electronic equipment is larger than or equal to a time threshold.
6. The method of any of claims 1 to 5, wherein the determining that the electronic device is in a standby state and the current first standby network and the first network of the electronic device are different, switching the standby network of the electronic device from the first standby network to the first network comprises:
matching in a network database according to the current position of the electronic equipment, and determining N available networks corresponding to the current position and NAT timeout time corresponding to each available network in the N available networks, wherein N is an integer greater than one; the network database comprises at least one available network at a preset position and a corresponding relation of NAT timeout time of the available network at the preset position, and the maintenance time of the electronic equipment in a standby state at the preset position is greater than or equal to a time threshold;
and determining the available network with the maximum NAT timeout time in the N available networks as the first network.
7. A network selection apparatus, the apparatus comprising:
the processing module is configured to determine that the electronic device is in a standby state, and when a current first standby network of the electronic device is different from a first network, switch the standby network of the electronic device from the first standby network to the first network, where the first network is a network with the largest network address translation NAT timeout time among a plurality of available networks of the electronic device.
8. The apparatus of claim 7, wherein the processing module is further configured to:
and switching the standby network of the electronic equipment from the first network to the first standby network when the electronic equipment is determined to be switched from the standby state to the working state.
9. The apparatus of claim 8, wherein the apparatus further comprises:
the display module is used for displaying the identification of the first standby network on the electronic equipment during the period of switching the standby network of the electronic equipment from the first network to the first standby network.
10. The apparatus according to any one of claims 7 to 9, wherein the processing module is specifically configured to:
the electronic equipment is in a screen-off state, and when the electronic equipment meets a first condition, it is determined that the electronic equipment is in a standby state, where the first condition includes at least one of:
the electronic equipment is in a long standby state;
the current data flow of the electronic equipment is smaller than or equal to a flow threshold value.
11. The apparatus of claim 10, wherein the electronic device is in a long standby state comprising:
the current position of the electronic equipment belongs to one of preset position sets, the preset position set is a set of at least one preset position, and the holding time of the electronic equipment in a standby state of the preset position is greater than or equal to a time threshold;
or,
the maintaining time of the current standby state of the electronic equipment is larger than or equal to a time threshold.
12. The apparatus according to any one of claims 7 to 11, wherein the processing module is specifically configured to:
matching in a network database according to the current position of the electronic equipment, and determining N available networks corresponding to the current position and NAT timeout time corresponding to each available network in the N available networks, wherein N is an integer greater than one; the network database comprises at least one available network at a preset position and a corresponding relation of NAT overtime time of the available network at the preset position, and the maintaining time of the electronic equipment in the standby state at the preset position is greater than or equal to a time threshold;
and determining the available network with the maximum NAT timeout time in the N available networks as the first network.
13. An electronic device comprising a display screen, a memory, and one or more processors, wherein the memory is configured to store a computer program; the processor is configured to invoke the computer program to cause the electronic device to perform the network selection method of any of claims 1-6.
14. A computer storage medium, comprising: computer instructions; the computer instructions, when executed on an electronic device, cause the electronic device to perform the network selection method of any of claims 1-6.
CN202210728301.0A 2022-06-25 2022-06-25 Network selection method and related equipment Active CN115278804B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210728301.0A CN115278804B (en) 2022-06-25 2022-06-25 Network selection method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210728301.0A CN115278804B (en) 2022-06-25 2022-06-25 Network selection method and related equipment

Publications (2)

Publication Number Publication Date
CN115278804A true CN115278804A (en) 2022-11-01
CN115278804B CN115278804B (en) 2023-07-11

Family

ID=83761521

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210728301.0A Active CN115278804B (en) 2022-06-25 2022-06-25 Network selection method and related equipment

Country Status (1)

Country Link
CN (1) CN115278804B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102143536A (en) * 2010-12-17 2011-08-03 华为终端有限公司 Method and device for automatically switching networks, wireless access equipment and intermediate equipment
CN102209365A (en) * 2010-03-31 2011-10-05 华为终端有限公司 Network selection method, equipment and system
US20140073355A1 (en) * 2012-09-11 2014-03-13 Cellco Partnership D/B/A Verizon Wireless Trusted mode location service for mobile device access to private network based applications
US20140115150A1 (en) * 2012-10-24 2014-04-24 Research In Motion Limited System and Method for Controlling Connection Timeout in a Communication Network
WO2017202183A1 (en) * 2016-05-25 2017-11-30 努比亚技术有限公司 Method and terminal for reducing power consumption, and computer storage medium
US20190028429A1 (en) * 2016-03-28 2019-01-24 Huawei Technologies Co., Ltd. Method and apparatus for keeping network address translation mapping alive
CN111031598A (en) * 2020-01-08 2020-04-17 Oppo广东移动通信有限公司 Network communication control method, device, communication equipment and storage medium
CN111294881A (en) * 2020-02-07 2020-06-16 北京小米移动软件有限公司 Network link switching method and device, client and computer readable storage medium
CN112492655A (en) * 2020-11-17 2021-03-12 珠海格力电器股份有限公司 Hotspot bearer network switching method, device, equipment and medium
CN112637940A (en) * 2020-12-31 2021-04-09 南京佑川网络技术有限公司 Low-power-consumption equipment dormancy keep-alive system and method
CN112954749A (en) * 2019-12-11 2021-06-11 华为技术有限公司 Network switching method and electronic equipment
CN114449686A (en) * 2020-11-03 2022-05-06 华为技术有限公司 Wireless network access method and device

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102209365A (en) * 2010-03-31 2011-10-05 华为终端有限公司 Network selection method, equipment and system
CN102143536A (en) * 2010-12-17 2011-08-03 华为终端有限公司 Method and device for automatically switching networks, wireless access equipment and intermediate equipment
US20140073355A1 (en) * 2012-09-11 2014-03-13 Cellco Partnership D/B/A Verizon Wireless Trusted mode location service for mobile device access to private network based applications
US20140115150A1 (en) * 2012-10-24 2014-04-24 Research In Motion Limited System and Method for Controlling Connection Timeout in a Communication Network
US20190028429A1 (en) * 2016-03-28 2019-01-24 Huawei Technologies Co., Ltd. Method and apparatus for keeping network address translation mapping alive
WO2017202183A1 (en) * 2016-05-25 2017-11-30 努比亚技术有限公司 Method and terminal for reducing power consumption, and computer storage medium
CN112954749A (en) * 2019-12-11 2021-06-11 华为技术有限公司 Network switching method and electronic equipment
CN111031598A (en) * 2020-01-08 2020-04-17 Oppo广东移动通信有限公司 Network communication control method, device, communication equipment and storage medium
CN111294881A (en) * 2020-02-07 2020-06-16 北京小米移动软件有限公司 Network link switching method and device, client and computer readable storage medium
CN114449686A (en) * 2020-11-03 2022-05-06 华为技术有限公司 Wireless network access method and device
CN112492655A (en) * 2020-11-17 2021-03-12 珠海格力电器股份有限公司 Hotspot bearer network switching method, device, equipment and medium
CN112637940A (en) * 2020-12-31 2021-04-09 南京佑川网络技术有限公司 Low-power-consumption equipment dormancy keep-alive system and method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
HUAWEI: "S2-086815 \"Support of multi-session transfers with SR-VCC\"", 3GPP TSG_SA\\WG2_ARCH *

Also Published As

Publication number Publication date
CN115278804B (en) 2023-07-11

Similar Documents

Publication Publication Date Title
CN110191442B (en) Bluetooth connection method, equipment and system
US12067974B2 (en) Speech recognition method, wearable device, and electronic device
US11825539B2 (en) Bluetooth connection method and electronic device
WO2021043045A1 (en) Method and device for configuring network configuration information
WO2021052245A1 (en) Data transceiving method, electronic device, and computer-readable storage medium
WO2020216098A1 (en) Method for providing forwarding service across electronic apparatuses, apparatus, and system
WO2021023046A1 (en) Electronic device control method and electronic device
CN112312366B (en) Method, electronic equipment and system for realizing functions through NFC (near field communication) tag
US20240089822A1 (en) Channel switching method, electronic device, and storage medium
WO2023000772A1 (en) Mode switching method and apparatus, electronic device and chip system
CN112860428A (en) High-energy-efficiency display processing method and equipment
EP4106238A1 (en) Wireless communication system and method
CN113676339B (en) Multicast method, device, terminal equipment and computer readable storage medium
CN114339698A (en) Method for establishing wireless connection through equipment touch, electronic equipment and chip
CN113676902A (en) System and method for providing wireless internet access and electronic equipment
CN114554012A (en) Incoming call answering method, electronic equipment and storage medium
CN113467747B (en) Volume adjusting method, electronic device and storage medium
CN115134404B (en) Method for managing push connection and electronic equipment
CN115278804B (en) Network selection method and related equipment
US11977946B2 (en) Method for automatically activating NFC application and terminal
CN115016629A (en) Method and device for preventing false touch
CN114116610A (en) Method, device, electronic equipment and medium for acquiring storage information
CN112929870A (en) Event subscription method and electronic equipment
CN113630823B (en) Network measurement method, device, terminal equipment and computer readable storage medium
CN116055612B (en) Incoming call circulation method and terminal equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant