CN112616177B - Network control method, device, storage medium and terminal - Google Patents

Network control method, device, storage medium and terminal Download PDF

Info

Publication number
CN112616177B
CN112616177B CN202011573324.6A CN202011573324A CN112616177B CN 112616177 B CN112616177 B CN 112616177B CN 202011573324 A CN202011573324 A CN 202011573324A CN 112616177 B CN112616177 B CN 112616177B
Authority
CN
China
Prior art keywords
network access
application program
target
target application
preset
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.)
Active
Application number
CN202011573324.6A
Other languages
Chinese (zh)
Other versions
CN112616177A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202011573324.6A priority Critical patent/CN112616177B/en
Publication of CN112616177A publication Critical patent/CN112616177A/en
Application granted granted Critical
Publication of CN112616177B publication Critical patent/CN112616177B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/0209Power saving arrangements in terminal devices
    • H04W52/0261Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level
    • H04W52/0264Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level by selectively disabling software applications
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

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

Abstract

The application discloses a network control method, a device, a storage medium and a terminal, and relates to the technical field of network control. Firstly, receiving a network access request of a target application program, wherein the network access request carries identification information corresponding to the target application program; then determining a target network access strategy corresponding to the target application program according to a preset network access strategy set and the identification information; and finally, processing the network access request according to the target network access strategy. When the target application program needs to access the network, the corresponding target network access strategy can be acquired according to the network access request, and finally the network access request is processed according to the target network access strategy so as to limit the relevant network of the target application program, thereby avoiding frequent network access of various application programs in the terminal, reducing the power consumption of the terminal caused by network access and improving the endurance time of the terminal.

Description

Network control method, device, storage medium and terminal
Technical Field
The present disclosure relates to the field of network control technologies, and in particular, to a network control method, a device, a storage medium, and a terminal.
Background
With the development of science and technology, various terminals are being presented in people's daily life, and people can use the terminals to perform entertainment, learning and work through a network, so that the industry costs one of the key points of research for those skilled in the art about network control methods in the terminals.
In the related art, various applications in the terminal frequently access the network under the condition that the data network is not closed, so that higher power consumption still occurs when the terminal is in a non-working state such as screen extinction.
Disclosure of Invention
The application provides a network control method, a device, a storage medium and a terminal, which can solve the technical problem that in the related art, various application programs in the terminal can access the network frequently under the condition that a data network is not closed, so that the terminal generates higher power consumption.
In a first aspect, an embodiment of the present application provides a network control method, where the method includes:
receiving a network access request of a target application program, wherein the network access request carries identification information corresponding to the target application program;
determining a target network access strategy corresponding to the target application program according to a preset network access strategy set and the identification information;
And processing the network access request according to the target network access strategy.
In a second aspect, an embodiment of the present application provides a network control device, including:
the request receiving module is used for receiving a network access request of a target application program, wherein the network access request carries identification information corresponding to the target application program;
the policy determining module is used for determining a target network access policy corresponding to the target application program according to a preset network access policy set and the identification information;
and the request processing module is used for processing the network access request according to the target network access strategy.
In a third aspect, embodiments of the present application provide a computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform steps implementing the method described above.
In a fourth aspect, embodiments of the present application provide a terminal including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method described above when the program is executed.
The technical scheme provided by some embodiments of the present application has the beneficial effects that at least includes:
The application provides a network control method, firstly, a network access request of a target application program is received, wherein the network access request carries identification information corresponding to the target application program; then determining a target network access strategy corresponding to the target application program according to a preset network access strategy set and the identification information; and finally, processing the network access request according to the target network access strategy. Because the network access policy set can be preset according to the needs of the user, when the target application program needs to access the network, the identification information corresponding to the target application program can be obtained according to the network access request, the target network access policy corresponding to the target application program in the network access policy set can be determined according to the identification information, and finally the network access request is processed according to the target network access policy so as to carry out related network restriction on the target application program, thereby avoiding frequent network access of various application programs in the terminal, reducing the power consumption generated by the network access of the terminal and improving the endurance time of the terminal.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is an exemplary system architecture diagram of a network control method according to an embodiment of the present application;
fig. 2 is a system interaction diagram of a network control method according to an embodiment of the present application;
fig. 3 is a flow chart of a network control method according to another embodiment of the present application;
fig. 4 is a flow chart of a network control method according to another embodiment of the present application;
fig. 5 is a flow chart of a network control method according to another embodiment of the present application;
fig. 6 is an exemplary schematic diagram of a network access policy set input method according to another embodiment of the present application;
fig. 7 is a flow chart of a network control method according to another embodiment of the present application;
fig. 8 is a schematic structural diagram of a network control device according to another embodiment of the present application;
fig. 9 is a schematic structural diagram of a network control device according to another embodiment of the present application;
fig. 10 is a schematic structural diagram of a network control device according to another embodiment of the present application;
fig. 11 is a schematic structural diagram of a network control device according to another embodiment of the present application;
fig. 12 is a schematic structural diagram of a terminal according to an embodiment of the present application.
Detailed Description
In order to make the features and advantages of the present application more comprehensible, the following description will be given in detail with reference to the accompanying drawings in which embodiments of the present application are shown, and it is apparent that the described embodiments are merely some but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
Fig. 1 is an exemplary system architecture diagram of a network control method according to an embodiment of the present application.
As shown in fig. 1, the system architecture may include at least one target application 110, a processor 120, a network device 130, and a communication link 140, the communication link 140 being a medium for providing a communication link between the processor 120 and the network device 130. Communication link 140 may include various types of wired or wireless communication links, such as: the wired communication link may comprise an optical fiber, twisted pair or coaxial cable, and the wireless communication link may comprise a Bluetooth communication link, a near field communication link, a Wi-Fi communication link, a microwave communication link, or the like.
The target application 110, the processor 120, are disposed in a terminal, which may be a variety of electronic devices including, but not limited to, a wearable device, a smart phone, a tablet computer, a laptop portable computer, a desktop computer, and the like.
The network device 130 may be an AP or a base station.
The AP, i.e. the wireless access point, is a wireless switch for a wireless network, and is a core of the wireless network. An AP is an access point for end users to enter a wired network, such as may be used in broadband homes, buildings, and parks, which may cover tens to hundreds of meters in the related art. The AP is a bridge for communication between a wireless network and a wired network, and is a core device for constructing a wireless local area network, and in this embodiment of the present application, the AP may be a device including a simple wireless access point (wireless AP), and may also be a device including a wireless router (including a wireless gateway and a wireless bridge).
The base station may be an interface device for accessing the internet by the terminal, and is a form of a radio station, which refers to a radio transceiver station that performs information transfer with the terminal through a mobile communication switching center in a certain radio coverage area.
It should be appreciated that the number of target applications, processors, network devices, and communication links in fig. 1 are merely illustrative, and that any number of target applications, processors, network devices, and communication links may be used, as desired for implementation.
It should be noted that, the execution body of the embodiment of the present application may be, for example, a processor or other integrated circuit chip in a terminal in hardware, and may be, for example, a related service of a network control method in the terminal in software, which is not limited. For convenience of description, the following description will take an execution body as an example of a processor.
Referring to fig. 2, fig. 2 is a system interaction diagram of a network control method according to an embodiment of the present application, and a system interaction process in the network control method will be described with reference to fig. 1 and fig. 2.
As shown in fig. 2, the system interaction process includes:
s201, the processor receives a network access request of a target application program, wherein the network access request carries identification information corresponding to the target application program.
S202, the processor determines a target network access strategy corresponding to the target application program according to a preset network access strategy set and the identification information.
Optionally, before receiving the network access request of the application program, the method further includes: receiving an input network access policy set, wherein the network access policy set at least comprises a sleep policy and a working policy, and the sleep policy is used for limiting network access requests of first-class application programs when the terminal is monitored to be in a screen-off state; the working strategy is to limit the network access request of the second type of application program when the terminal is monitored to be in the bright screen state.
Alternatively, the application types in the terminal may include at least a resident application, a foreground application, and a background application; the first type of application is a foreground application and a background application, and the second type of application is a background application.
Optionally, the identification information includes an application identity, and determining, according to a preset network access policy set and the identification information, a target network access policy corresponding to the target application includes: acquiring the current screen state of the terminal; determining a target application type of the target application according to the application identification; and determining a target network access strategy corresponding to the target application program in the network access strategy set according to the screen state and the target application program type.
Optionally, determining, according to the screen state and the target application type, a target network access policy corresponding to the target application in the network access policy set includes: when the screen state is determined to be in a screen off state and the type of the target application program is a foreground application program or a background application program, determining that a target network access strategy corresponding to the target application program in the network access strategy set is a sleep strategy; and when the screen state is determined to be in a bright screen state and the type of the target application program is a background application program, determining that a target network access strategy corresponding to the target application program in the network access strategy set is a working strategy.
Optionally, before receiving the network access request of the target application program, the method further includes: and receiving an input network access policy set, wherein the network access policy set at least comprises a first preset network access policy for a first preset application program, and the first preset network access policy is a network access request for limiting the first preset application program.
Optionally, the identification information includes a packet name, and determining, according to a preset network access policy set and the identification information, a target network access policy corresponding to the target application program includes: determining whether the target application program is a first preset application program according to the packet name corresponding to the target application program; when the target application program is determined to be the first preset application program, determining that the target network access strategy corresponding to the target application program in the network access strategy set is the first preset network access strategy.
Optionally, before receiving the network access request of the target application program, the method further includes: and receiving an input network access policy set, wherein the network access policy set at least comprises a second preset network access policy for one preset network device, and the second preset network access policy is used for limiting a network access request of a second preset application program when the terminal is connected to the preset network device.
Optionally, the identification information includes a packet name, and determining, according to a preset network access policy set and the identification information, a target network access policy corresponding to the target application program includes: acquiring current network equipment connected with a terminal; determining whether the target application program is a second preset application program according to the packet name corresponding to the target application program; when the current network equipment connected with the terminal is determined to be preset network equipment and the target application program is a second preset application program, determining that the corresponding target network access strategy of the target application program in the network access strategy set is the second preset network access strategy.
S203, the processor processes the network access request according to the target network access strategy.
Wherein the network access request is a mobile data access request or a Wi-Fi data access request.
Optionally, the processor is further configured to receive a policy removal instruction for the network access policy set, and remove a part or all of the network access policies from the network access policy set according to the policy removal instruction.
In the embodiment of the application, firstly, a network access request of a target application program is received, wherein the network access request carries identification information corresponding to the target application program; then determining a target network access strategy corresponding to the target application program according to a preset network access strategy set and the identification information; and finally, processing the network access request according to the target network access strategy. Because the network access policy set can be preset according to the needs of the user, when the target application program needs to access the network, the identification information corresponding to the target application program can be obtained according to the network access request, the target network access policy corresponding to the target application program in the network access policy set can be determined according to the identification information, and finally the network access request is processed according to the target network access policy so as to carry out related network restriction on the target application program, thereby avoiding frequent network access of various application programs in the terminal, reducing the power consumption generated by the network access of the terminal and improving the endurance time of the terminal.
Referring to fig. 3, fig. 3 is a flow chart of a network control method according to another embodiment of the present application.
As shown in fig. 3, the network control method includes:
s301, receiving a network access request of a target application program, wherein the network access request carries identification information corresponding to the target application program.
In this embodiment of the present application, the network control method may be applied to a terminal, where the terminal may be various electronic devices, including but not limited to a wearable device, a smart phone, a tablet computer, a laptop portable computer, a desktop computer, etc., one or more applications are installed in the terminal, each application may perform network connection and access to implement a preset function, and an application type in the terminal may at least include a resident application, a foreground application, and a background application, where the resident application refers to an application that has been loaded by an operating system after the terminal is started, such as a driver, and some system applications are resident applications, where the resident application may be considered as an application that ensures that the terminal operates most basically; the foreground application may be considered as an application that the user is currently using in the terminal; a background application may be considered an application that is temporarily unused and not closed by a user after being opened in a terminal.
When a target application program in the terminal needs to be accessed to the network, a network access request needs to be sent to the processor, so that the processor can control the networking of the target application program according to the network access request. The target application program can be any application program in the terminal, for example, can be an application program built in a terminal system, and can also be a third party application program installed through an application program mall. Further, the network access request may carry identification information corresponding to the target application program, where the identification information may at least include an application program identification (UID, user Identification) and a Package Name (Package Name), where the application program identification is used to represent attribute information of the application program, and the application programs with the same attribute or the same type may share one application program identification, that is, multiple application programs in the terminal may correspond to the same application program identification, and an application program corresponding to the same application program identification may be the same type of application program, so that an application program type corresponding to the application program may be determined through the application program identification corresponding to the application program; the package name is used as a unique identification of the application, i.e. the package name must be unique, one package name represents one application, and two different applications will not use the same package name, so the package name can be used to identify a specific application.
Further, the network access request may be a mobile data access request or a Wi-Fi data access request, where the mobile data access request, that is, the target application program, needs to perform network access on mobile data provided by a network device such as a base station, and the Wi-Fi data access request, that is, the target application program needs to perform network access on Wi-Fi data provided by an AP, so after the target application program sends the network access request, the processor may receive the network access request of the target application program, so as to facilitate subsequent network processing.
S302, determining a target network access strategy corresponding to the target application program according to a preset network access strategy set and the identification information.
In this embodiment of the present application, one or more network access policies input by a user or a developer may be received, where the network access policies may include limiting a network access request of a preset application program, and prohibiting a network connection corresponding to the network access request of the preset application program, and a network access policy set may be formed according to each network access policy. The network access policy set may include network access policies for some types of preset application programs when the terminal is in an off-screen or off-screen state, may include network access policies for each one or more preset application programs in the terminal according to user needs or developer needs, and may further include network access policies for preset application programs when the terminal is connected to some network devices, so the network access policy set may be a set of network access policies set according to needs of users or developers, or according to different dimensions of the terminal.
Because the network access policy set defines network access corresponding to one application program, a plurality of application programs, one type of application program or a plurality of types of application programs, after receiving a network access request of a target application program, the type identification or the specific identity identification of the target application program can be performed according to the identification information corresponding to the target application program carried in the network access request, then, based on the type or the specific identity corresponding to the target application program, whether the network access policy set has the network access policy for the target application program or not is judged, if the network access policy for the target application program does not exist in the network access policy set, the network access request of the target application program can be directly executed, namely, the network access request of the target application program is connected with the network; if the network access policy of the target application program exists in the network access policy set, the target network access policy corresponding to the target application program can be obtained from the network access policy set according to the identification information corresponding to the target application program.
S303, processing the network access request according to the target network access strategy.
In the above steps, if the network access policy of the target application program exists in the network access policy set, the target network access policy corresponding to the target application program may be obtained from the network access policy set according to the identification information corresponding to the target application program, and then the network access request may be processed according to the target network access policy, for example, the network access request of the target application program may be limited, that is, the network connection to the network access request of the target application program may be prohibited. After limiting the network access request of the target application program, the frequent network access of the target application program can be reduced, the electric energy consumed by the target application program on network access is reduced, and the network access request of part of the application programs can be limited under the condition of not influencing the terminal use by setting the network access strategy set in advance, so that the terminal use experience of a user is ensured.
In the embodiment of the application, firstly, a network access request of a target application program is received, wherein the network access request carries identification information corresponding to the target application program; then determining a target network access strategy corresponding to the target application program according to a preset network access strategy set and the identification information; and finally, processing the network access request according to the target network access strategy. Because the network access policy set can be preset according to the needs of the user, when the target application program needs to access the network, the identification information corresponding to the target application program can be obtained according to the network access request, the target network access policy corresponding to the target application program in the network access policy set can be determined according to the identification information, and finally the network access request is processed according to the target network access policy so as to carry out related network restriction on the target application program, thereby avoiding frequent network access of various application programs in the terminal, reducing the power consumption generated by the network access of the terminal and improving the endurance time of the terminal.
In the above embodiments, the network access policy set may include a network access policy for some types of preset application programs when the terminal is in an off-screen or off-screen state, may include a network access policy for each or more preset application programs in the terminal according to user needs or developer needs, and may further include a network access policy for a preset application program when the terminal is connected to some network devices, so the network access policy set may be a set of network access policies set according to needs of a user or a developer, or according to different dimensions of the terminal, and a specific implementation procedure of a corresponding network control method will be specifically described when the network access policy set includes different network access policies.
Referring to fig. 4, fig. 4 is a flow chart of a network control method according to another embodiment of the present application.
As shown in fig. 4, the network control method includes:
s401, receiving an input network access policy set, wherein the network access policy set at least comprises a sleep policy and a work policy.
In this embodiment of the present application, a network access policy set may be preset, where a method for setting the network access policy set may be to receive one or more network access policies input by a user or a developer, and combine each network access policy into a network access policy set, where the network access policy set may include at least a sleep policy and a working policy.
The sleep policy and the working policy represent that, when the terminal is in different situations, after receiving the network access request of the target application Chen Xiaoxu, the corresponding network access policy is executed, where the sleep policy is to limit the network access request of the first type of application when the terminal is monitored to be in the off-screen state. In the embodiment of the application, a screen can be arranged in the terminal, and the screen can be used as an intermediary for interaction between the terminal and a user after the screen is lightened. When the terminal is in the off-screen state, that is, the screen in the terminal is in the off-screen state, the user can consider that the terminal is not required to be used, and the terminal can be in the sleep state.
In the embodiment of the present application, the application types in the terminal may at least include a resident application, a foreground application and a background application, where in the above embodiment, the resident application may be considered as the most basic application for ensuring that the terminal operates; the foreground application may be considered as an application that the user is currently using in the terminal; a background application may be considered an application that is temporarily unused and not closed by a user after being opened in a terminal. Therefore, when the terminal is in the sleep state, the terminal can be only guaranteed to be in the most basic operation state, namely, only resident application programs are reserved in the terminal to normally access the network, and because a user does not need to use the terminal, the foreground application programs and the background application programs can be limited to access the network, namely, when the terminal is monitored to be in the screen-off state, network access requests of first-class application programs are limited, wherein the first-class application programs are the foreground application programs and the background application programs, so that the basic operation of the terminal can be guaranteed not to be influenced when the terminal is in the sleep state, and the electric energy consumption caused by the access of the foreground application programs and the background application programs to the network can be reduced.
Further, the operating policy is to limit network access requests of the second class of applications when the terminal is monitored to be in the lit state. When the terminal is in the bright screen state, the terminal can be in a working state when the terminal is used by a representative user, the terminal is used by the user, the foreground application program which is currently operated by the terminal is generally used by the user, and the resident application program is required to be used for ensuring the most basic operation of the terminal, so that when the terminal is in the working state, the resident application program and the foreground application program can be reserved only for ensuring the normal use of the terminal by the user to normally access a network, and the background application program can be regarded as the application program which is not used by the user temporarily, so that the background application program can be restricted from accessing the network, namely, when the terminal is monitored to be in the bright screen state, the network access request of the second application program is restricted, wherein the second application program is the background application program.
It may be understood that, in the embodiments of the present application, the types of the first type of application and the second type of application, which specifically include application types or specific application programs, may be set according to needs of users or developers, where the setting of the first type of application program as a foreground application program and a background application program, and the setting of the second type of application program as a background application program is only a possible case, which is not to be construed as limiting the first type of application program and the second type of application program for better describing the embodiments of the present application.
S402, receiving a network access request of a target application program, wherein the network access request carries identification information corresponding to the target application program.
For step S402, reference may be made to the detailed description in step S301, and the detailed description is omitted here.
S403, acquiring the current screen state of the terminal.
In the embodiment of the present application, the current screen state of the terminal may be obtained after the network access request of the target application is received, where the current screen state of the terminal is obtained, and the current screen state of the terminal may be obtained through a screen brightness sensor or a signal for detecting the screen.
S404, determining the type of the target application program according to the application program identification.
Because the sleep policy and the working policy define the network access requests of the first type of application program and the second type of application program, before judging whether to limit the network access request of the target application program, the type of the target application program corresponding to the target application program needs to be determined. The feasible manner of determining the type of the target application program corresponding to the target application program is to determine the type of the target application program corresponding to the target application program according to the identification information corresponding to the target application program carried in the network access request, specifically, because multiple application programs in the terminal can correspond to the same application program identity, the application programs corresponding to the same application program identity can be the same type of application program, in this embodiment of the present application, the identification information includes the application program identity, and a correspondence table between each application program type and the application program identity in the terminal can also be pre-established, for example, the correspondence table includes: the first application program and the second application program are first-class application programs, and the first application programs corresponding to the first-class application programs are identified; the third application program and the fourth application program are second-class application programs, and the second application program identity corresponding to the second-class application programs, so that after the application program identity corresponding to the target application program is obtained, whether the application program identity corresponding to the target application program exists or not can be inquired in the corresponding relation table, and if so, the application program identity corresponding to the target application program can be obtained, and the type of the target application program corresponding to the target application program is determined.
S405, determining a target network access policy corresponding to the target application program in the network access policy set according to the screen state and the target application program type.
After the screen state and the target application type corresponding to the target application are acquired, determining a target network access policy corresponding to the target application in the network access policy set according to the screen state and the target application type.
The method comprises the following steps: because the sleep policy is to limit the network access request of the first type of application program when the terminal is monitored to be in the off-screen state, wherein the first type of application program is a foreground application program and a background application program, when the screen state is determined to be in the off-screen state and the target application program type is the foreground application program or the background application program, then the target network access policy corresponding to the target application program in the network access policy set can be determined to be the sleep policy.
When the screen state is determined to be in the off-screen state and the target application program type is neither a foreground application program nor a background application program, then it can be determined that the target application program does not have a corresponding target network access policy in the network access policy set, and then the network access request of the target application program can be directly executed, that is, the target application program is allowed to perform network access.
The working strategy is to limit the network access request of the second type of application program when the terminal is in the bright screen state, and the second type of application program is the background application program, so that when the screen state is determined to be in the bright screen state and the target application program type is the background application program, the corresponding target network access strategy of the target application program in the network access strategy set is determined to be the working strategy.
When the screen state is determined to be in a bright screen state and the target application program type is not a background application program, it is determined that the target application program does not have a corresponding target network access policy in the network access policy set, then the network access request of the target application program can be directly executed, that is, the target application program is allowed to perform network access.
S406, processing the network access request according to the target network access strategy.
When the target network access policy corresponding to the target application program in the network access policy set is determined to be the sleep policy, then the network access request corresponding to the target application program can be limited according to the sleep policy, that is, the target application program is prohibited from performing network access. When the target network access policy corresponding to the target application program in the network access policy set is determined to be the working policy, then the network access request corresponding to the target application program can be limited according to the working policy, that is, the target application program is prohibited from performing network access.
In the embodiment of the application, under the condition that the modem data is connected to enter standby mode through setting the sleep strategy, the power consumption is reduced, the battery service efficiency can be better achieved, the terminal is enabled to enter the sleep state quickly, equipment cannot be awakened due to the fact that an application program accesses a network, the endurance time of the terminal is prolonged, and the service life of a battery and the service life of the terminal are prolonged.
Referring to fig. 5, fig. 5 is a flowchart of a network control method according to another embodiment of the present application.
As shown in fig. 5, the network control method includes:
s501, receiving an input network access policy set, wherein the network access policy set at least comprises a first preset network access policy for a first preset application program.
In this embodiment of the present application, the access network of one or more first preset application programs may be directly limited according to the needs of the user or the developer, for example, the first preset application program may be an application program that wakes up the network periodically, or some application programs (may be downloading application programs) that require more network traffic, so the processor may receive a set of network access policies input by the user or the developer, where the set of network access policies includes at least a first preset network access policy for one first preset application program, that is, the set of network access policies may also include a plurality of first preset network access policies for a plurality of first preset application programs, where the first preset network access policy is to limit a network access request of the first preset application program, that is, after the processor receives a network access request of a target application program, directly limit a network access request of the first preset application program.
Referring to fig. 6, fig. 6 is an exemplary schematic diagram of a network access policy set input method according to another embodiment of the present application.
As shown in fig. 6, for example, in the setting interface 610 of the terminal 600, in the network access policy option 620, an option button 630 corresponding to any one application program may be opened, which represents that the application program is determined as a first preset application program, and also represents that a first preset network access policy is set for the application program.
S502, receiving a network access request of a target application program, wherein the network access request carries identification information corresponding to the target application program.
For step S502, the detailed description in step S301 may be referred to, and will not be repeated here.
S503, determining whether the target application program is a first preset application program according to the packet name corresponding to the target application program.
Because the network access request of the first preset application program is limited in the first preset network access policy, before judging whether to limit the network access request of the target application program, it is also necessary to determine whether the target application program is the first preset application program. The method for determining whether the target application program is the first preset application program is feasible, namely, whether the target application program is the first preset application program is determined according to the identification information corresponding to the target application program carried in the network access request, specifically, because the package name is used as the unique identification of the application program, namely, the package name is required to be unique, one package name represents one application program, and two different application programs cannot use the same package name, in the embodiment of the application, the identification information comprises the package name, after the package name corresponding to the target application program carried in the network access request is acquired, the corresponding specific application program identity information can be determined according to the package name corresponding to the target application program, and then whether the specific application program identity information determines whether the target application program is the first preset application program is determined.
And S504, when the target application program is determined to be the first preset application program, determining that the target network access strategy corresponding to the target application program in the network access strategy set is the first preset network access strategy.
When the target application program is determined to be the first preset application program, that is, the target application program meets the application program corresponding to the target network access policy corresponding to the network access policy set, it may be determined that the target network access policy corresponding to the target application program in the network access policy set is the first preset network access policy.
When the target application program is determined not to be the first preset application program, it can be determined that the target application program does not have a corresponding target network access policy in the network access policy set, and then the network access request of the target application program can be directly executed, that is, the target application program is allowed to perform network access.
S505, processing the network access request according to the target network access strategy.
When the target network access policy corresponding to the target application program in the network access policy set is the first preset network access policy, the network access request corresponding to the target application program can be limited according to the first preset network access policy, that is, the target application program is prohibited from performing network access. The method can avoid frequent network access of the target application program in the terminal, reduce power consumption of the terminal caused by network access, and improve the endurance time of the terminal.
Referring to fig. 7, fig. 7 is a flowchart of a network control method according to another embodiment of the present application.
As shown in fig. 7, the network control method includes:
s701, receiving an input network access policy set, wherein the network access policy set at least comprises a second preset network access policy for one preset network device, and the second preset network access policy is to limit a network access request of a second preset application program when the terminal is connected to the preset network device.
In this embodiment of the present application, the network access request of some preset application program after the terminal is connected to some network device may be directly limited according to the requirement of the user or the developer, so the processor may receive a set of network access policies input by the user or the developer, where the set of network access policies includes at least a second preset network access policy for one preset network device, that is, the set of network access policies may further include a second preset network access policy for a plurality of preset network devices, where the second preset network access policy is to limit the network access request of the second preset application program when the terminal is connected to the preset network device.
S702, receiving a network access request of a target application program, wherein the network access request carries identification information corresponding to the target application program.
For step S702, the detailed description in step S301 may be referred to, and will not be repeated here.
S703, acquiring the current connection network equipment of the terminal.
In this embodiment of the present application, it is mainly determined whether to limit a network access request of a second preset application according to a network device connected to a terminal, so that related information of a network device currently connected to the terminal needs to be acquired first, where the network device may be an AP or a base station, and the AP is a wireless access point, and a wireless switch used in a wireless network is a core of the wireless network. An AP is an access point for end users to enter a wired network, such as may be used in broadband homes, buildings, and parks, which may cover tens to hundreds of meters in the related art. The AP is a bridge for communication between a wireless network and a wired network, and is a core device for constructing a wireless local area network, and in this embodiment of the present application, the AP may be a device including a simple wireless access point (wireless AP), a wireless hotspot, and a wireless router (including a wireless gateway and a wireless bridge). The base station may be an interface device for accessing the internet by the terminal, and is a form of a radio station, which refers to a radio transceiver station that performs information transfer with the terminal through a mobile communication switching center in a certain radio coverage area.
S704, determining whether the target application program is a second preset application program according to the packet name corresponding to the target application program.
Because the network access request of the second preset application program is limited in the second preset network access policy, before judging whether to limit the network access request of the target application program, it is also required to determine whether the target application program is the second preset application program. The method for determining whether the target application program is the second preset application program is feasible, namely, whether the target application program is the second preset application program is determined according to the identification information corresponding to the target application program carried in the network access request, specifically, because the package name is used as the unique identification of the application program, namely, the package name must be unique, one package name represents one application program, and two different application programs cannot use the same package name, in the embodiment of the application, the identification information comprises the package name, after the package name corresponding to the target application program carried in the network access request is obtained, the corresponding specific application program identity information can be determined according to the package name corresponding to the target application program, and then whether the specific application program identity information determines whether the target application program is the second preset application program is determined.
And S705, when the current connection network equipment of the terminal is determined to be the preset network equipment and the target application program is the second preset application program, determining that the corresponding target network access strategy of the target application program in the network access strategy set is the second preset network access strategy.
Since the second preset network access policy is to limit the network access request of the second preset application program when the terminal is connected to the preset network device, when the terminal is determined to be currently connected to the network device as the preset network device and the target application program is the second preset application program, it may be determined that the target network access policy corresponding to the target application program in the network access policy set is the second preset network access policy.
When the current network equipment connected with the terminal is determined not to be the preset network equipment or the target application program is determined not to be the second preset application program, it can be determined that the target application program does not have the corresponding target network access policy in the network access policy set, and then the network access request of the target application program can be directly executed, namely, the target application program is allowed to perform network access.
S706, processing the network access request according to the target network access strategy.
After determining that the target network access policy corresponding to the target application program in the network access policy set is the second preset network access policy, the network access request corresponding to the target application program can be limited according to the second preset network access policy, that is, the target application program is prohibited from performing network access.
In the embodiment of the application, the second preset network access strategy is set, so that the periodic messages generated by connecting certain routers, base stations or wireless hot spots are shielded, the terminal is enabled to enter sleep quickly, the terminal really enters a low-power-consumption standby state, the situation that a target application program in the terminal frequently accesses a network can be avoided, the power consumption of the terminal due to network access is reduced, and the endurance time of the terminal is prolonged.
In the above embodiments, a policy removal instruction for the network access policy set may also be received, and a part of or all of the network access policies are removed from the network access policy set according to the policy removal instruction, that is, when the content specifically indicated by the policy removal instruction is to remove a preset network access policy in the network access policy set, the preset network access policy is removed; when the content specifically indicated by the policy removal instruction is to remove all network access policies in the network access policy set, all network access policies are removed so as to remove the limitation on the network access request of the target application program, so that the network access request of the target application program can be executed.
In the above embodiment, it is introduced that the network access policy set may include a network access policy for some types of preset application programs when the terminal is in the off-screen or off-screen state, may include a network access policy for each or a plurality of preset application programs in the terminal according to a user requirement or a developer requirement, and may further include a network access policy for a preset application program when the terminal is connected to some network devices. In practical application, the above-mentioned processes can be implemented by a code program, and a feasible code program mainly includes the following six core parts: 1. the application calls a network service interface; 2. adding an interface function in the network service; 3. adding a corresponding aidl file function statement in the network service; 4. increasing the response of Firewall cmd to excute_cmd in netd; 5. modifying the control of the firewall by the firewall controller; 6. the definition of the header file is increased.
Specifically, 1, an application calls a network service interface to:
/>
2. adding interface functions in network services is as follows:
3. adding a corresponding aidl file function declaration in the network service is:
frameworks/base/core/java/android/os/INetworkManagementService.aidl
void oppoExcuteFirewallCmd(String chain,String cmd);
void setFirewallUidChainRule(int uid,int networkType,boolean allow);
void clearFirewallChain(String chain);
4. Increasing the response of Firewall cmd to excute_cmd in netd
/>
5. Modifying the control of the firewall by the firewall is:
/>
6. the definition of adding header files is as follows:
system/netd/server/FirewallController.h
int oppoExcuteCmd(const char*chain,const char*commands);
int FirewallController::setUidFwRule(int uid,const char*chain,FirewallRule rule);
int FirewallController::clearFwChain(const char*chain)。
referring to fig. 8, fig. 8 is a schematic structural diagram of a network control device according to another embodiment of the present application.
As shown in fig. 8, the network control device 800 includes:
the request receiving module 810 is configured to receive a network access request of a target application program, where the network access request carries identification information corresponding to the target application program.
The policy determining module 820 is configured to determine a target network access policy corresponding to the target application according to the preset network access policy set and the identification information.
The request processing module 830 is configured to process the network access request according to the target network access policy.
Referring to fig. 9, fig. 9 is a schematic structural diagram of a network control device according to another embodiment of the present application.
As shown in fig. 9, the network control device 900 includes:
the first set receiving module 910 is configured to receive an input set of network access policies, where the set of network access policies includes at least a sleep policy and a work policy.
The first request receiving module 920 is configured to receive a network access request of a target application, where the network access request carries identification information corresponding to the target application.
The screen state obtaining module 930 is configured to obtain a current screen state of the terminal.
The application type determining module 940 is configured to determine a target application type of the target application according to the application identification.
The first policy determining module 950 is configured to determine, according to the screen state and the type of the target application, a target network access policy corresponding to the target application in the network access policy set.
The first request processing module 960 is configured to process the network access request according to the target network access policy.
Referring to fig. 10, fig. 10 is a schematic structural diagram of a network control device according to another embodiment of the present application.
As shown in fig. 10, the network control device 1000 includes:
the second set receiving module 1010 is configured to receive an input set of network access policies, where the set of network access policies includes at least a first preset network access policy for a first preset application.
The second request receiving module 1020 is configured to receive a network access request of the target application program, where the network access request carries identification information corresponding to the target application program.
The first preset application determining module 1030 is configured to determine whether the target application is the first preset application according to the packet name corresponding to the target application.
The second policy determining module 1040 is configured to determine, when determining that the target application is the first preset application, that a target network access policy corresponding to the target application in the network access policy set is the first preset network access policy.
The second request processing module 1050 is configured to process the network access request according to the target network access policy.
Referring to fig. 11, fig. 11 is a schematic structural diagram of a network control device according to another embodiment of the present application.
As shown in fig. 11, the network control apparatus 1100 includes:
the third set receiving module 1110 is configured to receive an input set of network access policies, where the set of network access policies includes at least a second preset network access policy for one preset network device, and the second preset network access policy is to limit a network access request of a second preset application program when the terminal is connected to the preset network device.
The third request receiving module 1120 is configured to receive a network access request of the target application, where the network access request carries identification information corresponding to the target application.
The network device acquiring module 1130 is configured to acquire that the terminal is currently connected to the network device.
The second preset application determining module 1140 is configured to determine whether the target application is a second preset application according to the package name corresponding to the target application.
The third policy determining module 1150 is configured to determine, when it is determined that the terminal is currently connected to the network device as the preset network device and the target application is the second preset application, that the target network access policy corresponding to the target application in the network access policy set is the second preset network access policy.
And a third request processing module 1160, configured to process the network access request according to the target network access policy.
In an embodiment of the present application, a network control device includes: the request receiving module is used for receiving a network access request of the target application program, wherein the network access request carries identification information corresponding to the target application program; the policy determining module is used for determining a target network access policy corresponding to the target application program according to the preset network access policy set and the identification information; and the request processing module is used for processing the network access request according to the target network access strategy. Because the network access policy set can be preset according to the needs of the user, when the target application program needs to access the network, the identification information corresponding to the target application program can be obtained according to the network access request, the target network access policy corresponding to the target application program in the network access policy set can be determined according to the identification information, and finally the network access request is processed according to the target network access policy so as to carry out related network restriction on the target application program, thereby avoiding frequent network access of various application programs in the terminal, reducing the power consumption generated by the network access of the terminal and improving the endurance time of the terminal.
Embodiments of the present application also provide a computer storage medium having stored thereon a plurality of instructions adapted to be loaded by a processor and to perform the steps of the method of any of the embodiments described above.
Referring to fig. 12, fig. 12 is a schematic structural diagram of a terminal according to an embodiment of the present application. As shown in fig. 12, the terminal 1200 may include: at least one processor 1201, at least one network interface 1204, a user interface 1203, a memory 1205, at least one communication bus 1202.
Wherein a communication bus 1202 is used to enable connected communications between these components.
The user interface 1203 may include a Display screen (Display) and a Camera (Camera), and the optional user interface 1203 may further include a standard wired interface and a standard wireless interface.
The network interface 1204 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others.
Wherein the processor 1201 may include one or more processing cores. The processor 1201 connects various parts within the overall terminal 1200 using various interfaces and lines, and performs various functions of the terminal 1200 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 1205, and invoking data stored in the memory 1205. Alternatively, the processor 1201 may be implemented in hardware in at least one of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 1201 may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), and a modem, etc. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the processor 1201 and may be implemented by a single chip.
The Memory 1205 may include a random access Memory (Random Access Memory, RAM) or a Read-Only Memory (ROM). Optionally, the memory 1205 includes a non-transitory computer readable medium (non-transitory computer-readable storage medium). The memory 1205 may be used to store instructions, programs, code sets, or instruction sets. The memory 1205 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the above-described various method embodiments, etc.; the storage data area may store data or the like referred to in the above respective method embodiments. The memory 1205 may also optionally be at least one storage device located remotely from the processor 1201. As shown in fig. 12, an operating system, a network communication module, a user interface module, and a network control program may be included in the memory 1205 as one type of computer storage medium.
In the terminal 1200 shown in fig. 12, the user interface 1203 is mainly used for providing an input interface for a user, and acquiring data input by the user; and the processor 1201 may be configured to invoke the network control program stored in the memory 1205 and to specifically perform the following operations:
Receiving a network access request of a target application program, wherein the network access request carries identification information corresponding to the target application program; determining a target network access strategy corresponding to a target application program according to a preset network access strategy set and identification information; and processing the network access request according to the target network access strategy.
In one embodiment, the processor 1201, prior to executing the network access request to receive the application, further specifically performs the steps of: receiving an input network access policy set, wherein the network access policy set at least comprises a sleep policy and a work policy; the sleep strategy is to limit the network access request of the first type of application program when the terminal is monitored to be in the off-screen state; the working strategy is to limit the network access request of the second type of application program when the terminal is monitored to be in the bright screen state. The application program types in the terminal at least comprise a resident application program, a foreground application program and a background application program; the first type of application is a foreground application and a background application, and the second type of application is a background application.
In one embodiment, the identification information includes an application identity, and the processor 12012 further specifically performs the following steps when determining, according to the preset network access policy set and the identification information, a target network access policy corresponding to the target application: acquiring the current screen state of the terminal; determining a target application type of the target application according to the application identification; and determining a target network access strategy corresponding to the target application program in the network access strategy set according to the screen state and the target application program type.
In one embodiment, the processor 1201, when executing the determination of the target network access policy corresponding to the target application program in the network access policy set according to the screen status and the target application program type, further specifically executes the following steps: when the screen state is determined to be in a screen off state and the type of the target application program is a foreground application program or a background application program, determining that a target network access strategy corresponding to the target application program in the network access strategy set is a sleep strategy; and when the screen state is determined to be in a bright screen state and the type of the target application program is a background application program, determining that a target network access strategy corresponding to the target application program in the network access strategy set is a working strategy.
In one embodiment, the processor 1201, prior to executing the network access request to receive the target application, further specifically performs the steps of: and receiving an input network access policy set, wherein the network access policy set at least comprises a first preset network access policy for a first preset application program, and the first preset network access policy is a network access request for limiting the first preset application program.
In one embodiment, the identification information includes a packet name, and the processor 1201 further specifically performs the following steps when determining the target network access policy corresponding to the target application program according to the preset network access policy set and the identification information: determining whether the target application program is a first preset application program according to the packet name corresponding to the target application program; when the target application program is determined to be the first preset application program, determining that the target network access strategy corresponding to the target application program in the network access strategy set is the first preset network access strategy.
In one embodiment, the processor 1201, prior to executing the network access request to receive the target application, further specifically performs the steps of: and receiving an input network access policy set, wherein the network access policy set at least comprises a second preset network access policy for one preset network device, and the second preset network access policy is used for limiting a network access request of a second preset application program when the terminal is connected to the preset network device.
In one embodiment, the identification information includes a packet name, and the processor 1201 further specifically performs the following steps when determining the target network access policy corresponding to the target application program according to the preset network access policy set and the identification information: acquiring current network equipment connected with a terminal; determining whether the target application program is a second preset application program according to the packet name corresponding to the target application program; when the current network equipment connected with the terminal is determined to be preset network equipment and the target application program is a second preset application program, determining that the corresponding target network access strategy of the target application program in the network access strategy set is the second preset network access strategy.
In one embodiment, the network access request is a mobile data access request or a Wi-Fi data access request.
In one embodiment, the processor 1201 is further configured to execute the policy cleaning instruction for receiving the set of network access policies, and to clean up a part or all of the network access policies from the set of network access policies according to the policy cleaning instruction.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of modules is merely a logical function division, and there may be additional divisions of actual implementation, e.g., multiple modules or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or modules, which may be in electrical, mechanical, or other forms.
The modules illustrated as separate components may or may not be physically separate, and components shown as modules may or may not be physical modules, i.e., may be located in one place, or may be distributed over a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module. The integrated modules may be implemented in hardware or in software functional modules.
The integrated modules, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk, etc.
It should be noted that, for the sake of simplicity of description, the foregoing method embodiments are all expressed as a series of combinations of actions, but it should be understood by those skilled in the art that the present application is not limited by the order of actions described, as some steps may be performed in other order or simultaneously in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily all necessary for the present application.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to the related descriptions of other embodiments.
The foregoing describes a network control method, apparatus, storage medium, and terminal provided in the present application, and those skilled in the art, based on the ideas of the embodiments of the present application, may change the specific implementation and application scope, so that the content of the present application should not be construed as limiting the present application.

Claims (13)

1. A method of network control, the method comprising:
receiving an input network access policy set, wherein the network access policy set at least comprises a sleep policy and a work policy; the sleep strategy is to limit the network access request of the first type of application program when the terminal is monitored to be in the screen-off state; the working strategy is to limit the network access request of the second type of application program when the terminal is monitored to be in the bright screen state;
Receiving a network access request of a target application program, wherein the network access request carries identification information corresponding to the target application program;
determining a target network access strategy corresponding to the target application program according to a preset network access strategy set and the identification information;
and processing the network access request according to the target network access strategy.
2. The method according to claim 1, wherein the application types in the terminal may include at least a resident application, a foreground application, and a background application;
the first type of application program is a foreground application program and a background application program, and the second type of application program is a background application program.
3. The method according to claim 2, wherein the identification information includes an application identity, and the determining, according to a preset network access policy set and the identification information, a target network access policy corresponding to the target application includes:
acquiring the current screen state of the terminal;
determining a target application type of the target application according to the application identification;
And determining a target network access strategy corresponding to the target application program in the network access strategy set according to the screen state and the target application program type.
4. The method of claim 3, wherein the determining, according to the screen status and the target application type, a target network access policy corresponding to the target application in the set of network access policies comprises:
when the screen state is determined to be in a screen off state and the target application program type is a foreground application program or a background application program, determining that a target network access policy corresponding to the target application program in the network access policy set is the sleep policy;
and when the screen state is determined to be a bright screen state and the target application program type is a background application program, determining that a target network access strategy corresponding to the target application program in the network access strategy set is the working strategy.
5. The method of claim 1, wherein prior to receiving the network access request of the target application, further comprising:
and receiving an input network access policy set, wherein the network access policy set at least comprises a first preset network access policy for a first preset application program, and the first preset network access policy is a network access request for limiting the first preset application program.
6. The method of claim 5, wherein the identification information includes a packet name, and determining, according to a preset network access policy set and the identification information, a target network access policy corresponding to the target application program includes:
determining whether the target application program is the first preset application program according to the packet name corresponding to the target application program;
and when the target application program is determined to be the first preset application program, determining that a target network access strategy corresponding to the target application program in the network access strategy set is the first preset network access strategy.
7. The method of claim 1, wherein prior to receiving the network access request of the target application, further comprising:
and receiving an input network access policy set, wherein the network access policy set at least comprises a second preset network access policy for one preset network device, and the second preset network access policy is used for limiting a network access request of a second preset application program when the terminal is connected to the preset network device.
8. The method of claim 7, wherein the identification information includes a packet name, and determining, according to a preset network access policy set and the identification information, a target network access policy corresponding to the target application program includes:
Acquiring the current connection network equipment of the terminal;
determining whether the target application program is the second preset application program according to the packet name corresponding to the target application program;
and when the current network equipment connected with the terminal is determined to be the preset network equipment and the target application program is the second preset application program, determining that the target network access strategy corresponding to the target application program in the network access strategy set is the second preset network access strategy.
9. The method of claim 1, wherein the network access request is a mobile data access request or a Wi-Fi data access request.
10. The method according to claim 1, wherein the method further comprises:
and receiving a policy clearing instruction aiming at the network access policy set, and clearing part or all of the network access policies from the network access policy set according to the policy clearing instruction.
11. A network control device, the device comprising:
the first set receiving module is used for receiving an input network access policy set, wherein the network access policy set at least comprises a sleep policy and a working policy; the sleep strategy is to limit the network access request of the first type of application program when the terminal is monitored to be in the screen-off state; the working strategy is to limit the network access request of the second type of application program when the terminal is monitored to be in the bright screen state;
The request receiving module is used for receiving a network access request of a target application program, wherein the network access request carries identification information corresponding to the target application program;
the policy determining module is used for determining a target network access policy corresponding to the target application program according to a preset network access policy set and the identification information;
and the request processing module is used for processing the network access request according to the target network access strategy.
12. A computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the steps of the method according to any one of claims 1 to 10.
13. A terminal comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method of any of claims 1 to 10 when the program is executed.
CN202011573324.6A 2020-12-25 2020-12-25 Network control method, device, storage medium and terminal Active CN112616177B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011573324.6A CN112616177B (en) 2020-12-25 2020-12-25 Network control method, device, storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011573324.6A CN112616177B (en) 2020-12-25 2020-12-25 Network control method, device, storage medium and terminal

Publications (2)

Publication Number Publication Date
CN112616177A CN112616177A (en) 2021-04-06
CN112616177B true CN112616177B (en) 2023-07-21

Family

ID=75249328

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011573324.6A Active CN112616177B (en) 2020-12-25 2020-12-25 Network control method, device, storage medium and terminal

Country Status (1)

Country Link
CN (1) CN112616177B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103902391A (en) * 2014-04-15 2014-07-02 宇龙计算机通信科技(深圳)有限公司 Application program management device and method
FR3016108A1 (en) * 2013-12-30 2015-07-03 Wi Lan Labs Inc
CN107426168A (en) * 2017-05-23 2017-12-01 国网山东省电力公司电力科学研究院 A kind of Secure Network Assecc processing method and processing device
WO2018106060A1 (en) * 2016-12-09 2018-06-14 삼성전자 주식회사 Information providing method and electronic device supporting same
CN110830495A (en) * 2019-11-14 2020-02-21 Oppo广东移动通信有限公司 Network access management method and related equipment
CN111193698A (en) * 2019-08-22 2020-05-22 腾讯科技(深圳)有限公司 Data processing method, device, terminal and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR3016108A1 (en) * 2013-12-30 2015-07-03 Wi Lan Labs Inc
CN103902391A (en) * 2014-04-15 2014-07-02 宇龙计算机通信科技(深圳)有限公司 Application program management device and method
WO2018106060A1 (en) * 2016-12-09 2018-06-14 삼성전자 주식회사 Information providing method and electronic device supporting same
CN107426168A (en) * 2017-05-23 2017-12-01 国网山东省电力公司电力科学研究院 A kind of Secure Network Assecc processing method and processing device
CN111193698A (en) * 2019-08-22 2020-05-22 腾讯科技(深圳)有限公司 Data processing method, device, terminal and storage medium
CN110830495A (en) * 2019-11-14 2020-02-21 Oppo广东移动通信有限公司 Network access management method and related equipment

Also Published As

Publication number Publication date
CN112616177A (en) 2021-04-06

Similar Documents

Publication Publication Date Title
US10715381B2 (en) Intelligent role selection for dual-role devices
US10500505B2 (en) Techniques to interact with an application via messaging
CN110198275A (en) A kind of flow control methods, system, server and storage medium
US20160357616A1 (en) Application management method and application management apparatus
WO2019042294A1 (en) Resource allocation method and related product
CN111355723B (en) Single sign-on method, device, equipment and readable storage medium
KR20210135929A (en) Method to dynamically change the minimum candidate resources ratio in mode 2 resource selection procedure of nr v2x
CN113014452A (en) Network flow testing method, device, testing end and storage medium
CN112169310A (en) Game resource loading method and device, computer equipment and storage medium
CN110762773A (en) Upgrading method of air conditioner and air conditioner
WO2019042172A1 (en) Resource allocation method and product related thereto
CN112616177B (en) Network control method, device, storage medium and terminal
CN113225738A (en) Flow control method and device of vehicle-mounted terminal
CN107463395B (en) Component calling method and device
Meneses-Viveros et al. Energy saving strategies in the design of mobile device applications
CN116244231A (en) Data transmission method, device and system, electronic equipment and storage medium
CN110933758A (en) Interference coordination method and device, and base station
CN112910910B (en) Method, device, equipment and storage medium for processing OPCDA protocol message
CN114816744A (en) Memory control method and device, storage medium and electronic equipment
CN112380411B (en) Sensitive word processing method, device, electronic equipment, system and storage medium
TW201909595A (en) Device management technology
CN111131473B (en) Network parameter transmission method and device
CN111163533B (en) Network connection method and related product
CN110381487B (en) Bluetooth connection method and device
US9639137B2 (en) Control method and electronic device

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