Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The 5G network has the characteristics of high speed, short delay and large allowed access amount, but for the terminal equipment, the network connection requirement of high speed and low delay is not available at any time. Under the NSA architecture, a 5G network, i.e. 4G and 5G dual connectivity, is laid out by the endec technology. The terminal equipment is required to be connected with the 4G network firstly, the 4G assigns the configured 5G adjacent cell to the terminal equipment, the terminal equipment measures and sends a measurement report to the 4G cell, and after the 4G base station finishes the negotiation with the 5G base station, the 4G cell configures the 5G cell to the terminal equipment through RRC message. The terminal acquires the 5G service. Therefore, it is necessary for the terminal device to register in the 4G network first, and the 5G cell is added after the 4G network is registered, so as to increase the data rate and reduce the data transmission delay. Under the NSA architecture, the terminal device maintains dual connectivity for 4G and 5G network services. For the terminal device, the power consumption is higher due to maintaining the dual connection of 4G and 5G.
In view of the above drawbacks and deficiencies of the prior art, the exemplary embodiment provides a network connection method, which can be applied to a terminal device such as a mobile phone, a tablet computer, and a notebook computer, which can access a 5G network. Referring to fig. 1, the network connection method described above may include the steps of:
s11, acquiring the application program currently running by the terminal equipment, and identifying the preset application network type corresponding to the application program;
and S12, when the preset application network category corresponding to the application program is identified to include a first network, generating a first network connection instruction for the terminal device to connect to the first network.
In the network connection method provided by the present exemplary embodiment, the application program currently running in the terminal device is read by means, and the preset application network category corresponding to each application program is identified. Only when the preset application network category corresponding to the application program is identified to comprise a first network, generating a first network connection instruction, and enabling the terminal equipment to be connected to the first network according to the first network connection instruction; the first network connection instruction is used for instructing the terminal device to connect to the first network. On one hand, the method can realize the purpose of determining whether to connect to the first network according to the actual network requirement of the application program currently running by the terminal equipment; on the other hand, the terminal equipment can be prevented from constantly keeping a double-connection state, and the power consumption of the terminal equipment is effectively reduced.
Hereinafter, each step of the network connection method in the present exemplary embodiment will be described in more detail with reference to the drawings and examples.
Step S10, responding to a network allocation command, and allocating corresponding preset application network categories for the application programs and/or for different usage states corresponding to the application programs according to the network allocation command.
In this exemplary embodiment, referring to fig. 2, for a terminal device, a user may configure a corresponding preset application network category for each application program in each terminal device according to actual requirements. The application program and the corresponding preset application network category can be stored in a list form, so that later-stage query and call are facilitated. In particular, the preset application network category may be a 4G network or a 5G network. For example, the preset application network application category corresponding to the application program with lower network requirement may be configured to be a 4G network, for example: a notebook, a calculator, office software or a pedometer, etc. For an application program which needs to be frequently used in a networking mode or has a high network requirement, the corresponding preset application network type can be configured to be a 5G network, for example: instant messaging software, shopping software, application stores, and the like.
In this exemplary embodiment, it is also possible for an application to be configured to use different networks in different use states. Specifically, the type of the preset application network corresponding to the application program in the first state may be configured as a first network, and the type of the preset application network corresponding to the application program in the second use state may be configured as a second network; the first state may be a use state in which the application program has a higher requirement on the network, for example, a use state in which the requirement delay is small or the data traffic is large; the second state may be a use state in which the application has a low requirement on the network, for example, a use state in which there is no network delay requirement, and data transmission traffic is low. For example, for map software, the application state when the map software uses an offline map may be configured to be the second state, and the corresponding second network may be a 4G network; the state of the network map, the online map navigation or the downloaded map can be configured to be the first state, and the corresponding first network can be a 5G network. Or, for the social software, the social software may be configured to be in a second state when browsing multimedia information or receiving and sending text messages, and the corresponding second network is a 4G network; the application state of the instant voice call or video call can be configured to be a first state, and the corresponding first network is a 5G network.
Of course, in other embodiments of the present disclosure, a user may also modify each application program at any time during the use process, and the preset application network category corresponding to different use states of the application program, which is not particularly limited in the present disclosure.
Step S11, acquiring the application program currently running by the terminal equipment, and identifying the preset application network type corresponding to the application program.
In this example embodiment, it is possible for the terminal device to identify an application currently running on the terminal device. For example, an application may correspond to one or more services, or one or more processes. Therefore, the existing data interface can be set through the intelligent terminal device to pull the running service list, the corresponding currently running application program is obtained through the running service in the service list, only the foreground application program can be displayed in the service list, and the background application program is displayed in the other service list.
Or, the currently running process list may be read through an existing data interface of the intelligent terminal device, so that the corresponding running application program is acquired through the running process in the process list. In the above process list, only the process corresponding to the foreground application may be shown, and the process corresponding to the background application may be shown in another process list.
After the application program currently running in the terminal device is obtained, the preset application network category corresponding to each application program can be extracted.
Step S12, when it is identified that the preset application network category corresponding to the application program includes a first network, generating a first network connection instruction for the terminal device to connect to the first network.
In this exemplary embodiment, after the application program currently running in the terminal device is obtained, the preset application network category corresponding to each application program may be queried. If only one application program or a preset application network type corresponding to a plurality of application programs in the running application programs is the first network, a first network connection instruction can be generated, so that the terminal equipment can start a first network model according to the first network connection instruction and is connected to the first network. For example, when the first network is a 5G network and the second network is a 4G network, if the terminal device is not currently connected to the network or is only connected to the 4G network, the 5G modem may be turned on to connect to the 5G network, so as to ensure that each application program normally uses the network.
Based on the above, in other example embodiments of the present disclosure, for the terminal device, when it is recognized that the preset application network category corresponding to the current application program is the first network, the specific use state of the terminal device may also be read and analyzed. Specifically, when it is identified that the preset application network category corresponding to the application program includes the first network, the step S12 may further include:
acquiring the current use state of the application program, and generating a first network connection instruction when the current use state is a first state; or when the current use state is the second state, generating a second network connection instruction to enable the terminal device to be connected to the second network.
In this exemplary embodiment, when the preset application network category corresponding to the current application program is identified as the first network, the use state corresponding to the application program may be identified. The first state may be a preset usage state requiring the use of the 5G network, and the second state may be a preset usage state using the 4G network. For example, the corresponding use state may be determined by a process name or a service name corresponding to the application program, or may be determined by a specific function currently being used by the application program. When the using state is the first state, a first network connection instruction can be generated, so that the terminal equipment starts the 5G modem and is connected to the 5G network. And if the use state corresponding to the application program is the second state, generating a second network connection instruction to enable the terminal equipment to close the 5G modem and keep the 4G network connection. Therefore, whether the 5G network is connected or not can be evaluated according to the specific network requirements of the application program, and the power consumption is reduced.
Step S13, when it is recognized that the preset application network category corresponding to the application program does not include the first network, generating a second network connection instruction for the terminal device to connect to the second network.
In this exemplary embodiment, referring to fig. 2, if the preset application network types corresponding to the application programs in the running application programs are all the second networks, a second network connection instruction may be generated, so that the terminal device may only connect to the second network according to the second network instruction. For example, the 5G modem may be turned off according to the second network instruction, so that the terminal device is connected to the 4G network only, thereby reducing power consumption.
In an exemplary embodiment of the present disclosure, the terminal device may also determine whether to use the first network according to the current total data flow. Specifically, as shown with reference to fig. 3, the following steps may be included:
step S21, acquiring the current data stream of the terminal equipment, and extracting the target parameters corresponding to the data stream;
step S22, if the target parameter corresponding to the current data stream meets a first indicator, generating the first network connection instruction for the terminal device to connect to the first network; or
Step S23, if the target parameter corresponding to the current data stream meets a second criterion, generating the second network connection instruction for the terminal device to connect to the second network.
In this exemplary embodiment, for the terminal device, the total data stream in the terminal device may be read, and a traffic threshold of the terminal device may also be configured in advance. Specifically, the data transmission of the terminal device may include an upload traffic and a download traffic, which are used as target parameters of the data stream, so as to determine whether to use the first network or the second network according to the current data volume uploaded and downloaded by the terminal device. In addition, the first indicator and the second indicator may be preset threshold values of data traffic. For example, the data stream may be determined by using the size of the current data stream transmission buffer (buffer) of the terminal device.
If the current data stream transmission cache of the terminal device is greater than or equal to the preset flow threshold value, it indicates that the terminal device currently has more data to transmit normally or wait for transmission, for example, when downloading a larger file or uploading data is larger, in order to ensure the data transmission rate, a first network connection instruction may be generated, so that the terminal device is connected to the first network. For example, when the first network is a 5G network and the second network is a 4G network, if the terminal device is not currently connected to the network or connected to the 4G network, or is using a WiFi network, the 5G modem may be turned on to connect to the 5G network, so as to ensure that each application program normally uses the network.
In addition, if the current data stream transmission cache of the terminal device is smaller than the preset flow threshold value, it indicates that the current transmission data of the terminal device is not much. A second network connection instruction can be generated, the 5G modem can be turned off according to the instruction, the current network requirement of the terminal device can be met only by keeping the 4G network connection, and the power consumption can be effectively reduced.
In another exemplary embodiment of the present disclosure, the terminal device may also consider network requirements corresponding to each application program and a current data flow of the terminal device to evaluate whether the 5G network needs to be opened. Specifically, as shown with reference to fig. 4, the following steps may be included:
step S31, acquiring a foreground application program currently running by the terminal equipment, and identifying the preset application network category corresponding to the foreground application program;
step S32, when recognizing that the preset application network category corresponding to the foreground application program does not include the first network, acquiring the current data stream of the terminal equipment, and extracting the target parameter corresponding to the current data stream;
step S33, if the target parameter corresponding to the current data stream meets a second criterion, acquiring the background application currently running by the terminal device, and identifying the preset application network category corresponding to the background application;
step S34, when it is identified that the preset application network category corresponding to the background application program includes the first network, generating the first network connection instruction for the terminal device to connect to the first network; or
Step S35, when it is recognized that the preset application network category corresponding to the background application program includes a second network, generating a second network connection instruction for the terminal device to connect to the second network.
In this exemplary embodiment, the first network may be a 5G network, and the second network may be a 4G network. Specifically, the terminal device may first identify the currently running foreground application, and may identify and determine the current total data stream of the terminal device when the preset application network categories corresponding to the currently running foreground application are all 4G networks. And when the data flow is smaller than the preset threshold value, identifying and judging the application program running in the background. And if the preset application network types corresponding to the background application program are all the second networks, the terminal equipment can be kept connected with the 4G network only, and the 5G network is disconnected, so that the power consumption is reduced.
Or, when foreground applications are identified, if one or more preset application network types corresponding to the foreground applications are 5G networks, the 5G modem may be turned on and connected to the 5G network. Or, when the data flow is evaluated, if the data flow is greater than or equal to a preset threshold value, the 5G modem can be turned on and connected to the 5G network. Or when the background application programs are identified, if one or more preset application network types corresponding to the background application programs are 5G networks, the 5G modem can be started and connected to the 5G network.
Based on the above, for the terminal device, the above-mentioned instruction for generating the first network connection instruction and turning on the 5G module or the 5G modem may be generated by the 4G modem and control the switch of the 5G modem, or the control layer may directly generate the first network connection instruction and control the switch of the 5G modem. The specific control mode can be completed by adopting conventional technical means, and the details are not repeated in the disclosure.
For example, considering the difference of the application program in the data flow rate and delay requirements, the application program is classified: the first category, which has low requirements for rate and delay, does not require 5G to be turned on, for example: application notepads without network requirements, cameras, and applications such as electronic books, social software, music players and the like with network speed requirements which can be met by a 4G network; the second category is applications with high requirements on speed and time delay, such as: real-time competitive games, application stores download installation packages, and the like. For each application program, statistics and analysis of data and flow can be performed, and each application program is classified by default according to the analysis result. Alternatively, the classification may be performed according to user customization.
Referring to fig. 5, when the category of the application currently activated by the terminal device is identified without the need to open the 5G network, it is considered that some applications may have high requirements for data links, such as large data package downloads, for example, game packages or movies, and therefore it is considered whether the whole terminal device needs to open the 5G network. At this time, the size of the buffer for data transmission and downloading of the whole machine can be used as a judgment basis, that is, the size of the data volume currently uploaded and downloaded by the whole machine. And if the threshold value is exceeded, the 5G module is started.
And if the data flow of the whole terminal equipment is smaller than a preset threshold value, identifying the background application program. There may be some background applications that have high delay requirements, and it must be ultra-short delay to ensure normal operation, such as automatic driving. Although background applications, it is necessary to ensure low latency. Therefore, in the case that the 5G is not started in the previous step, the determination of whether the background application program has the 5G application program start requirement is added.
The method provided by the embodiment of the disclosure presets the preset application network categories corresponding to the application programs in the terminal equipment and the preset application network categories corresponding to the application programs in different use states; and setting a data flow threshold value to enable the terminal equipment to correspondingly use different network types under different data flow requirements. And in the evaluation, foreground application, background application and total data stream requirements are considered, so that the 5G network can be selected to be opened or closed in real time according to the actual network requirements of the terminal equipment. For example, when the user is watching an electronic book before, the 5G module is turned off, and now the user wants to play a sports game, the active application is switched from the low-speed requirement of the second type to the high-speed requirement of the first type, and at this time, the 5G module is turned on by sending an instruction through the terminal. On the contrary, when the application program with high speed and low time delay requirements is switched to the application program with low speed and low time delay requirements, the 5G module can be controlled to be closed. Therefore, the user experience of the current activated application can be guaranteed, the requirement of the whole machine on the data throughput can be guaranteed, and the 5G network can be switched on and off according to the condition of the requirement of the foreground and background applications of the whole machine on the time delay. The power consumption of the terminal is effectively reduced.
It is to be noted that the above-mentioned figures are only schematic illustrations of the processes involved in the method according to an exemplary embodiment of the invention, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
Further, referring to fig. 6, in the present exemplary embodiment, anetwork connection device 60 is further provided, which includes: anapplication identification module 601 and a network connectioninstruction generation module 602. Wherein:
the applicationprogram identification module 601 may be configured to obtain an application program currently running by the terminal device, and identify a preset application network category corresponding to the application program.
The network connectioninstruction generating module 602 may be configured to generate a first network connection instruction for the terminal device to connect to a first network when it is identified that the preset application network category corresponding to the application program includes the first network.
In an example of the present disclosure, the network connectioninstruction generation module 602 may include: a first state identification module and a second state identification module (not shown in the figure). Wherein,
the first state identification module may be configured to obtain a current usage state of the application program, and generate a first network connection instruction when the current usage state is a first state.
The second state identification module may be configured to generate a second network connection instruction for the terminal device to connect to a second network when the current usage state is the second state.
In one example of the present disclosure, the apparatus further comprises: a second network connection module (not shown).
The second network connection module may be configured to generate a second network connection instruction for the terminal device to connect to a second network when it is identified that the preset application network category corresponding to the application program does not include the first network.
In one example of the present disclosure, the apparatus may further include: the system comprises a data stream reading module, a first index evaluation module and a second index evaluation module (not shown in the figure). Wherein,
the data stream reading module may be configured to obtain a current data stream of the terminal device, and extract a target parameter corresponding to the current data stream.
The first index evaluation module may be configured to generate the first network connection instruction for the terminal device to connect to the first network when the target parameter corresponding to the current data flow satisfies a first index.
The second index evaluation module may be configured to generate the second network connection instruction for the terminal device to connect to the second network when the target parameter corresponding to the current data stream satisfies a second index.
In an example of the present disclosure, the currently running application described above includes: foreground applications and background applications.
In an example of the present disclosure, the apparatus described above may include: the system comprises a foreground application identification module, a data flow analysis module, an index analysis module, a background application identification module, a first network connection module and a second network connection module. Wherein,
the foreground application identification module may be configured to obtain a foreground application currently running on the terminal device, and identify the preset application network category corresponding to the foreground application.
The data flow analysis module may be configured to, when it is identified that the preset application network category corresponding to the foreground application does not include the first network, obtain a current data flow of the terminal device, and extract a target parameter corresponding to the current data flow.
The background application identification module may be configured to, when the target parameter corresponding to the current data stream meets a second criterion, acquire the background application currently running by the terminal device, and identify the preset application network category corresponding to the background application.
The first network connection module may be configured to generate the first network connection instruction for the terminal device to connect to the first network when it is identified that the preset application network category corresponding to the background application program includes the first network.
The second network connection module may be configured to generate a second network connection instruction for the terminal device to connect to a second network when it is identified that the preset application network category corresponding to the background application program includes the second network.
In one example of the present disclosure, the apparatus may further include: a network class configuration module (not shown).
The network type configuration module may be configured to respond to a network allocation instruction, and allocate corresponding preset application network types to the application program and/or to different usage states corresponding to the application program according to the network allocation instruction.
The specific details of each module in the network connection device are already described in detail in the corresponding network connection method, and therefore, the details are not described herein again.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Fig. 7 illustrates a schematic block diagram of a computer system suitable for use with a wireless communication device to implement an embodiment of the present invention.
It should be noted that thecomputer system 700 of the electronic device shown in fig. 7 is only an example, and should not bring any limitation to the function and the scope of the application of the embodiment of the present invention.
As shown in fig. 7, thecomputer system 700 includes a Central Processing Unit (CPU)701, which can perform various appropriate actions and processes according to a program stored in a Read-Only Memory (ROM) 702 or a program loaded from astorage section 708 into a Random Access Memory (RAM) 703. In theRAM 703, various programs and data necessary for system operation are also stored. TheCPU 701, theROM 702, and theRAM 703 are connected to each other via abus 704. An Input/Output (I/O)interface 705 is also connected to thebus 704.
The following components are connected to the I/O interface 705: aninput portion 706 including a keyboard, a mouse, and the like; anoutput section 707 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; astorage section 708 including a hard disk and the like; and acommunication section 709 including a Network interface card such as a LAN (Local Area Network) card, a modem, or the like. Thecommunication section 709 performs communication processing via a network such as the internet. Adrive 710 is also connected to the I/O interface 705 as needed. Aremovable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on thedrive 710 as necessary, so that a computer program read out therefrom is mounted into thestorage section 708 as necessary.
In particular, according to an embodiment of the present invention, the processes described below with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the invention include a computer program product comprising a computer program embodied on a computer-readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through thecommunication section 709, and/or installed from theremovable medium 711. The computer program executes various functions defined in the system of the present application when executed by a Central Processing Unit (CPU) 701.
It should be noted that the computer readable medium shown in the embodiment of the present invention may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), a flash Memory, an optical fiber, a portable Compact Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present invention may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by an electronic device, cause the electronic device to implement the method as described in the embodiments below. For example, the electronic device may implement the steps shown in fig. 1.
Furthermore, the above-described figures are merely schematic illustrations of processes involved in methods according to exemplary embodiments of the invention, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is to be limited only by the terms of the appended claims.