CN118034869A - Network resource allocation method and device, electronic equipment and storage medium - Google Patents

Network resource allocation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN118034869A
CN118034869A CN202211422326.4A CN202211422326A CN118034869A CN 118034869 A CN118034869 A CN 118034869A CN 202211422326 A CN202211422326 A CN 202211422326A CN 118034869 A CN118034869 A CN 118034869A
Authority
CN
China
Prior art keywords
application
network resource
priorities
application program
application programs
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.)
Pending
Application number
CN202211422326.4A
Other languages
Chinese (zh)
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 CN202211422326.4A priority Critical patent/CN118034869A/en
Publication of CN118034869A publication Critical patent/CN118034869A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application is suitable for the technical field of communication and provides a network resource allocation method, a network resource allocation device, electronic equipment and a storage medium. The method comprises the following steps: if at least two first application programs need to use network resources at the current moment, determining the priorities of at least two first application programs based on a network resource priority list, wherein the network resource priority list comprises the priorities of at least one second application program running in the foreground in a preset time period, the priorities are determined by the running parameters of the corresponding second application programs, and the ending moment of the preset time period is earlier than the current moment; network resources are allocated to at least two of the first applications based on the priorities of the at least two first applications. The application can realize the allocation of the network resources of the application program.

Description

Network resource allocation method and device, electronic equipment and storage medium
Technical Field
The present application belongs to the field of communications technologies, and in particular, to a network resource allocation method, a device, an electronic device, and a storage medium.
Background
With the popularization of electronic devices such as mobile phones and tablet computers, more and more applications are installed on the electronic devices. The electronic device may run one application or run more applications at the same time, and when more applications are run at the same time, there may be a case where at least two applications need to use network resources, and at this time, network resources need to be allocated to each application.
Disclosure of Invention
The embodiment of the application provides a network resource allocation method, a network resource allocation device, electronic equipment and a storage medium, so as to realize allocation of network resources of an application program.
In a first aspect, an embodiment of the present application provides a network resource allocation method, where the method includes:
If at least two first application programs need to use network resources at the current moment, determining the priorities of at least two first application programs based on a network resource priority list, wherein the network resource priority list comprises the priorities of at least one second application program running in the foreground in a preset time period, the priorities are determined by the running parameters of the corresponding second application programs, and the ending moment of the preset time period is earlier than the current moment;
network resources are allocated to at least two of the first applications based on the priorities of the at least two first applications.
In the embodiment of the application, the network resource priority list comprises the priority of at least one second application program running in the foreground within a preset time period, the priority is determined by the running parameters of the corresponding second application program, and the running parameters of the second application program can reflect the preference degree of the user to the second application program, so that the priority of at least two first application programs is determined based on the network resource priority list, and network resources are allocated to at least two first application programs based on the priority of at least two first application programs, so that the allocation of the network resources can be thousands of people, and the reasonable allocation of the network resources of the application programs can be really realized according to the preference of the user.
In a second aspect, an embodiment of the present application provides a network resource allocation apparatus, where the apparatus includes:
A priority determining module, configured to determine, if there are at least two first applications that need to use network resources at a current time, priorities of at least two first applications based on a network resource priority list, where the network resource priority list includes priorities of at least one second application that runs in a foreground within a preset time period, the priorities are determined by running parameters of the corresponding second applications, and an end time of the preset time period is earlier than the current time;
And the resource allocation module is used for allocating network resources for at least two first application programs based on the priorities of the at least two first application programs.
In a third aspect, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the method according to the first aspect described above when the computer program is executed by the processor.
In a fourth aspect, an embodiment of the present application provides a chip comprising a processor for reading and executing a computer program stored in a memory to perform the steps of the method as described in the first aspect above.
Optionally, the memory is connected to the processor through a circuit or a wire.
In a fifth aspect, embodiments of the present application provide a computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of the method as described in the first aspect above.
In a sixth aspect, embodiments of the present application provide a computer program product for, when run on an electronic device, causing the electronic device to perform the steps of the method as described in the first aspect above.
It will be appreciated that the second, third, fourth, fifth and sixth aspects provided above are all used to perform the corresponding methods provided above, and therefore the advantages achieved by the above are referred to as advantages in the corresponding methods provided above, and are not described here again.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed 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 a schematic flow chart of an implementation of a network resource allocation method according to an embodiment of the present application;
fig. 2 is a schematic flow chart of an implementation of a network resource allocation method according to another embodiment of the present application;
Fig. 3 is a schematic structural diagram of a network resource allocation device according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in the present description and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
Furthermore, the terms "first," "second," "third," and the like in the description of the present specification and in the appended claims, are used for distinguishing between descriptions and not necessarily for indicating or implying a relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
The network resource allocation method provided by the embodiment of the application can be applied to electronic equipment such as mobile phones, tablet computers, wearable equipment, vehicle-mounted equipment, augmented reality (augmented reality, AR)/Virtual Reality (VR) equipment, notebook computers, ultra-mobile personal computer (UMPC), netbooks, personal digital assistants (personal DIGITAL ASSISTANT, PDA) and the like, and the embodiment of the application does not limit the specific types of the electronic equipment.
It should be understood that, the sequence number of each step in this embodiment does not mean the execution sequence, and the execution sequence of each process should be determined by its function and internal logic, and should not limit the implementation process of the embodiment of the present application in any way.
In order to illustrate the technical scheme of the application, the following description is made by specific examples.
Referring to fig. 1, a flowchart of an implementation of a network resource allocation method according to an embodiment of the present application is shown, where the network resource allocation method is applied to an electronic device. As shown in fig. 1, the network resource allocation method may include the steps of:
step 101, if there are at least two first application programs that need to use network resources at the current moment, determining priorities of the at least two first application programs based on the network resource priority list.
The first application may refer to an application that needs to use network resources at the current moment. Alternatively, the first application may run in the foreground or in the background, which is not limited herein. For example, there are three applications running in the background that need to use network resources at the current time, or there are one application running in the foreground and two applications running in the background that need to use network resources at the current time, or there are three applications running in the foreground that need to use network resources at the current time.
It should be noted that, when there is a first application program at the current time that needs to use the network resource, the network resource available at the current time may be allocated to the first application program.
The network resources may refer to network bandwidth, including but not limited to upstream bandwidth, downstream bandwidth, and the like. For example, if an application program needs to download data from a server after running, determining that the application program needs to use downlink bandwidth; if an application program needs to upload data to a server after running, it is determined that the application program needs to use the upstream bandwidth.
The network resource priority list comprises priorities of at least one second application program running in the foreground in a preset time period, the priorities are determined by running parameters of the corresponding second application program, and the ending time of the preset time period is earlier than the current time.
The preset time period may be a preset time period. For example, the preset time period may be 00:00 to 24:00 of the day immediately before the current time. Optionally, the user may modify the preset time period according to the actual requirement, for example, a preset time period option is set in the setting of the electronic device, where there are multiple time periods under the preset time period option, and the user may select one time period or at least two time periods from the multiple time periods as the preset time period.
The second application program is an application program running in the foreground in a preset time period, and the ending time of the preset time period is earlier than the current time. The most recently used application by the user is the most interesting and favorite application for the user, and the user will usually run in the foreground for the favorite application to interact with the favorite application. The operation parameter of the second application program may be at least one of a total operation time length, an average operation time length, an operation number, an operation frequency and the like of the second application program in a preset time period.
When the operation parameters of the second application program in the preset time period are counted, the foreground operation starting time (namely the starting time) of the second application program can be recorded when the second application program is started each time; recording the foreground operation ending moment of the second application program when the second application program is returned to the background or stops operating; based on the foreground operation ending time and the foreground operation starting time, calculating a time interval from entering the foreground to exiting the background or stopping operation of the corresponding second application program, wherein the time interval is the operation duration of the second application program in the current starting, and the operation times of the second application program are increased by 1; accumulating all the running time of the second application program in a preset time period to obtain the total running time of the second application program; dividing the total operation time of the second application program by the operation times to obtain the average operation time of the second application program; dividing the running times of the second application program by the total duration of the preset time period to obtain the running frequency of the second application program; after the operation parameters of the second application program are obtained, a mapping relationship between the identification of the second application program and the operation parameters of the second application program can be established, and the mapping relationship is stored in a database. When the electronic device determines the network resource priority list, the operating parameter of the second application program in the network resource priority list can be obtained from the database.
The parameters of the total operation time, the average operation time, the operation times, the operation frequency and the like of the second application program in the preset time period can reflect the preference degree of the user to the second application program. Therefore, the priority of the second application program is determined based on the operation parameters of the second application program, and the network resource allocation is carried out on the first application program based on the priority of the second application program, so that the reasonable allocation of the network resource of the first application program can be truly realized according to the preference of the user.
It should be noted that the number of the second applications may be one or at least two.
When the number of the second application programs is one and the running parameters of the second application programs are any one of the total running time length, the average running time length, the running times, the running frequency and the like, if the running parameters of the second application programs are larger than the corresponding parameter threshold values, the identifiers of the second application programs are stored in the network resource priority list, and the priorities of the second application programs are set to be higher than the priorities of the application programs which are not stored in the network resource priority list. Wherein the parameter threshold is greater than or equal to zero.
When the number of the second application programs is one and the operation parameters of the second application programs are at least two of the total operation time length, the average operation time length, the operation times, the operation frequency and the like, comprehensive evaluation can be performed on the preference degree of the second application programs by the user based on the at least two operation parameters to obtain a comprehensive evaluation value, if the comprehensive evaluation value of the second application programs is greater than the evaluation value threshold, the identification of the second application programs is stored in the network resource priority list, and the priority of the second application programs is set to be higher than the priority of the application programs which are not stored in the network resource priority list. Wherein the evaluation value threshold is greater than or equal to zero.
When the number of the second application programs is at least two, the at least two second application programs can be subjected to priority ranking based on the operation parameters of the at least two second application programs, so that a priority ranking result is obtained; and storing the prioritized results to a network resource priority list.
Wherein, the identifier of the second application program can be stored in the network resource priority list, and the identifier is used for representing the corresponding second application program. The higher the identification ranking is in the prioritization result, the higher the priority of the corresponding second application program is; the more recently identified ranks in the prioritization results, the lower the priority of the corresponding second application.
When the number of the second application programs is at least two and the operation parameters of the second application programs are any one of the total operation time length, the average operation time length, the operation times, the operation frequency and the like, the priority of the second application programs is in direct proportion to the operation parameters of the second application programs, and the higher the operation parameters are, the higher the priority of the second application programs is, the lower the priority of the second application programs is.
When the number of the second application programs is at least two and the operation parameters of the second application programs are at least two of the total operation time length, the average operation time length, the operation times, the operation frequency and the like, the preference degree of the second application programs can be comprehensively evaluated by the user based on the at least two operation parameters, so that the comprehensive evaluation value is obtained. The comprehensive evaluation value of the second application program is proportional to the priority of the second application program, and the higher the comprehensive evaluation value is, the higher the priority of the second application program is; the lower the comprehensive evaluation value is, the lower the priority is for the second application program.
When the comprehensive evaluation value of the second application program is calculated based on at least two operation parameters, each operation parameter can be normalized to obtain a normalized value of the corresponding operation parameter, and the normalized values of the at least two operation parameters are weighted and summed to obtain the comprehensive evaluation value. It should be noted that the normalization algorithm is not limited by the present application. For example, the normalization of the operating parameters may be achieved by calculating the ratio of each motion parameter of each second application to the sum of the operating parameters (i.e. the sum of the operating parameters of all second applications).
Step 102, allocating network resources for at least two first applications based on the priorities of the at least two first applications.
In order to preferentially meet the network resource requirements of the application programs favored by the user, the priority is proportional to the network resources, and the application programs with higher priority allocate more network resources, the application programs with lower priority allocate less network resources.
In an alternative embodiment, determining the priorities of the at least two first applications based on the network resource priority list includes:
for each first application program, if the first application program is found from the network resource priority list, determining the priority of the first application program from the network resource priority list;
For each first application, if the first application is not found from the network resource priority list, determining that the priority of the first application is lower than the lowest priority in the network resource priority list.
The first application program can be searched from the network resource priority list based on the identification of the first application program; if the identifier of the first application program exists in the network resource priority list, determining that the first application program is found from the network resource priority list; if the identification of the first application program does not exist in the network resource priority list, determining that the first application program is not found in the network resource priority list.
The second application programs in the network resource priority list are application programs favored by the user, if a certain first application program is not found in the network resource priority list, the preference degree of the user for the first application program can be determined to be lower than the preference degree of all the second application programs in the network resource priority list, so that the priority of the first application program can be set to be lower than the lowest priority in the network resource priority list (namely, lower than the priority of all the second application programs in the network resource priority list).
Taking three first applications as an example, the three first applications are respectively an application a, an application B and an application C, if the application a and the application B are found from the network resource priority list, the application C is not found, and the priority of the application a is higher than the priority of the application B in the network resource priority list, it may be determined that the priorities of the three first applications are respectively the application a, the application B and the application C from high to low.
In an alternative embodiment, in the case that the number of first application programs that are not found is at least two, the priorities of the at least two first application programs that are not found are determined based on starting moments of the at least two first application programs that are not found.
The user prefers a certain application program, the starting time of the application program is usually earlier, so when the number of first application programs which are not found is at least two, the starting time of each first application program which are not found can be determined from the log of the electronic equipment, the starting time of all first application programs which are not found is compared with the priority, the starting time is in direct proportion to the priority, the earlier the starting time of the first application program which is not found is, the higher the priority corresponding to the first application program is, the later the starting time of the first application program which is not found is, and the lower the priority corresponding to the first application program which is not found is.
In an alternative embodiment, the first application not found is inserted into the tail of the network resource priority list.
For the first application program which is not searched, the priority of the first application program is lower than the priority of all the second application programs in the network resource priority list, so that the first application program which is not searched can be inserted into the tail part of the network resource priority list, thereby realizing the updating of the network resource priority list.
In an alternative embodiment, allocating network resources for at least two first applications based on priorities of the at least two first applications includes:
determining network resource allocation proportions of at least two first application programs based on the priorities of the at least two first application programs;
and allocating network resources for the at least two first application programs based on the network resource allocation proportion of the at least two first application programs.
The network resource allocation proportion of the first application program can be understood as the ratio of the network resources allocated to the first application program in the available network resources.
In order to preferentially meet the network resource demands of application programs favored by users, the priority is in direct proportion to the network resource allocation proportion, and the application programs with higher priority have higher network resource allocation proportion, the application programs with lower priority have lower network resource allocation proportion and lower network resource allocation proportion.
It should be noted that, the method for calculating the network resource allocation ratio is not limited in the present application. For example, the network resource allocation proportion of each first application program can be calculated by combining with the 8-2 allocation principle, and the network resource allocation proportion of the first application program with the highest priority is 80%; when the number of the first application programs is two, the network resource allocation proportion of the first application program with the priority order is 20%; when the number of first applications is at least three, the network resource allocation ratio of the first application having the priority between the highest priority and the lowest priority is 1 minus the product of the obtained difference of the network resource allocation ratios of all the first applications arranged before the first application and 80%, and the network resource allocation ratio of the first application having the lowest priority is 1 minus the obtained difference of the network resource allocation ratios of all the first applications arranged before the first application having the lowest priority. That is, when the number of first applications is N and N is an integer greater than 2, the network resource allocation ratio x 1 =80% of the first application with the highest priority among the N first applications; x i=(1-x2-…-xi-1) is 80% when i has a value of 2 to N-1 and the higher i is, the lower the corresponding priority is; the network resource allocation proportion of the first application program with the lowest priority among the N first application programs is x N=1-x2-…-xN-1.
In the embodiment of the application, the network resource priority list comprises the priority of at least one second application program running in the foreground within a preset time period, the priority is determined by the running parameters of the corresponding second application program, and the running parameters of the second application program can reflect the preference degree of the user to the second application program, so that the priority of at least two first application programs is determined based on the network resource priority list, and network resources are allocated to at least two first application programs based on the priority of at least two first application programs, so that the allocation of the network resources can be thousands of people, and the reasonable allocation of the network resources of the application programs can be really realized according to the preference of the user.
Referring to fig. 2, a flowchart of an implementation of a network resource allocation method according to another embodiment of the present application is shown, where the network resource allocation method is applied to an electronic device. As shown in fig. 2, the network resource allocation method may include the steps of:
In step 201, if there are at least two first applications that need to use network resources at the current moment, the priorities of the at least two first applications are determined based on the network resource priority list, where the first applications are applications that run in the background.
The step is partially the same as step 101, and the same parts can be specifically referred to the related description of step 101, which is not repeated here.
In step 202, if there is a third application running in the foreground at the current time and the third application needs to use the network resource, the network resource that the third application needs to use is obtained.
The third application may refer to an application running in the foreground at the current moment.
The third application program runs in the foreground, which shows that the user prefers the third application program, if the third application program needs to use the network resource, the network resource of the third application program can be preferentially ensured so as to meet the network resource requirement of the third application program and ensure the smooth data communication of the third application program.
Optionally, the network resources required to be used by the third application may be preset, or the network resources required to be used by the third application may be actually measured, which is not limited herein.
And 203, calculating the difference between the total network resources and the network resources required to be used by the third application program to obtain the remaining network resources.
The remaining network resources may be understood as the available network resources in the previous embodiment, i.e. the network resources that can be allocated by the first application. The total network resource may be understood as the maximum value of network resources that the electronic device can use.
Step 204, allocating network resources for the at least two first applications based on the remaining network resources and the priorities of the at least two first applications.
The priority is proportional to the network resources, the higher priority application can allocate more network resources from the remaining network resources, and the lower priority application can allocate less network resources from the remaining network resources.
Specifically, the priority is proportional to the network resource allocation ratio, and the higher the priority is, the higher the ratio of the application in the remaining network resources is, the more network resources are allocated, and the lower the priority is, the lower the ratio of the application in the remaining network resources is, and the less network resources are allocated.
In the embodiment of the application, when the application program running in the foreground exists at the current moment and the application program needs to use the network resource, the network resource required to be used by the application program can be preferentially allocated to the application program, and then the network resource is allocated to the application program running in the background based on the residual network resource and the priority of the application program running in the background, so that the allocation of the network resource is thousands of people and thousands of people on the basis of ensuring smooth data communication of the application program running in the foreground, and the network resource allocation of the application program running in the background is realized according to the preference of a user.
Referring to fig. 3, a schematic structural diagram of a network resource allocation device according to an embodiment of the present application is shown, for convenience of explanation, only a portion related to the embodiment of the present application is shown.
The device comprises:
A priority determining module 31, configured to determine, if there are at least two first applications that need to use network resources at a current time, priorities of at least two first applications based on a network resource priority list, where the network resource priority list includes priorities of at least one second application that runs in a foreground within a preset time period, the priorities are determined by running parameters of the corresponding second applications, and an end time of the preset time period is earlier than the current time;
a resource allocation module 32, configured to allocate network resources for at least two first applications based on priorities of the at least two first applications.
Optionally, the resource allocation module 32 is specifically configured to:
Determining network resource allocation proportions of at least two first application programs based on the priorities of the at least two first application programs;
And allocating network resources for at least two first application programs based on the network resource allocation proportion of at least two first application programs.
Optionally, the priority determining module 31 is specifically configured to:
For each first application program, if the first application program is found from the network resource priority list, determining the priority of the first application program from the network resource priority list;
and for each first application program, if the first application program is not found from the network resource priority list, determining that the priority of the first application program is lower than the lowest priority in the network resource priority list.
Optionally, the priority determining module 31 is specifically configured to:
And under the condition that the number of the first application programs which are not found is at least two, determining the priority of the at least two first application programs which are not found based on the starting time of the at least two first application programs which are not found.
Optionally, the apparatus further includes:
and the application processing module is used for inserting the first application program which is not found into the tail part of the network resource priority list.
Optionally, the first application is an application running in the background, and the resource allocation module 42 is specifically configured to:
If a third application program running in the foreground exists at the current moment and the third application program needs to use network resources, acquiring the network resources needed to be used by the third application program;
calculating the difference value between the total network resource and the network resource required to be used by the third application program to obtain the residual network resource;
And allocating network resources to at least two first application programs based on the remaining network resources and the priorities of the at least two first application programs.
Optionally, in the case that the number of the second application programs is at least two, the apparatus further includes:
the priority ranking module is used for ranking the priorities of the at least two second application programs based on the operation parameters of the at least two second application programs to obtain a priority ranking result;
and the priority storage module is used for storing the priority ordering result to the network resource priority list.
The network resource allocation device provided in the embodiment of the present application may be applied to the foregoing method embodiment, and details refer to the description of the foregoing method embodiment, which is not repeated herein.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 4, the electronic apparatus 4 of this embodiment includes: one or more processors 40 (only one shown), a memory 41, and a computer program 42 stored in the memory 41 and executable on the at least one processor 40. The steps of the various network resource allocation method embodiments described above are implemented by the processor 40 when executing the computer program 42.
The electronic device may include, but is not limited to, a processor 40, a memory 41. It will be appreciated by those skilled in the art that fig. 4 is merely an example of the electronic device 4 and is not meant to be limiting of the electronic device 4, and may include more or fewer components than shown, or may combine certain components, or different components, e.g., the electronic device may further include an input-output device, a network access device, a bus, etc.
The Processor 40 may be a central processing unit (Central Processing Unit, CPU), which may also be other general purpose processors, digital signal processors (DIGITAL SIGNAL Processor, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), off-the-shelf Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 41 may be an internal storage unit of the electronic device 4, such as a hard disk or a memory of the electronic device 4. The memory 41 may also be an external storage device of the electronic device 4, such as a plug-in hard disk, a smart memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD) or the like, which are provided on the electronic device 4. Further, the memory 41 may also include both an internal storage unit and an external storage device of the electronic device 4. The memory 41 is used for storing the computer program and other programs and data required by the electronic device. The memory 41 may also be used for temporarily storing data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units and modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above device may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
The embodiments of the present application also provide a computer readable storage medium storing a computer program, which when executed by a processor implements steps of the above-described respective method embodiments.
Embodiments of the present application also provide a computer program product which, when run on an electronic device, causes the electronic device to perform steps that may be performed in the various method embodiments described above.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/electronic device and method may be implemented in other manners. For example, the apparatus/electronic device embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical function division, and there may be additional divisions in actual implementation, e.g., multiple units 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 may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
The integrated modules/units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the computer readable medium contains content that can be appropriately scaled according to the requirements of jurisdictions in which such content is subject to legislation and patent practice, such as in certain jurisdictions in which such content is subject to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (10)

1. A method for allocating network resources, the method comprising:
If at least two first application programs need to use network resources at the current moment, determining the priorities of at least two first application programs based on a network resource priority list, wherein the network resource priority list comprises the priorities of at least one second application program running in the foreground in a preset time period, the priorities are determined by the running parameters of the corresponding second application programs, and the ending moment of the preset time period is earlier than the current moment;
network resources are allocated to at least two of the first applications based on the priorities of the at least two first applications.
2. The method of claim 1, wherein the allocating network resources for at least two of the first applications based on the priorities of the at least two first applications comprises:
Determining network resource allocation proportions of at least two first application programs based on the priorities of the at least two first application programs;
And allocating network resources for at least two first application programs based on the network resource allocation proportion of at least two first application programs.
3. The method of claim 1, wherein determining the priorities of at least two of the first applications based on a network resource priority list comprises:
For each first application program, if the first application program is found from the network resource priority list, determining the priority of the first application program from the network resource priority list;
and for each first application program, if the first application program is not found from the network resource priority list, determining that the priority of the first application program is lower than the lowest priority in the network resource priority list.
4. A method according to claim 3, wherein in case the number of first applications not found is at least two, the method further comprises:
and determining the priority of at least two first application programs which are not found based on the starting time of the at least two first application programs which are not found.
5. A method according to claim 3, characterized in that the method further comprises:
and inserting the first application program which is not found into the tail part of the network resource priority list.
6. The method of claim 1, wherein the first application is an application running in the background, wherein the allocating network resources for at least two of the first applications based on priorities of the at least two first applications comprises:
If a third application program running in the foreground exists at the current moment and the third application program needs to use network resources, acquiring the network resources needed to be used by the third application program;
calculating the difference value between the total network resource and the network resource required to be used by the third application program to obtain the residual network resource;
And allocating network resources to at least two first application programs based on the remaining network resources and the priorities of the at least two first application programs.
7. The method according to any one of claims 1 to 6, wherein in case the number of the second application programs is at least two, the method further comprises:
based on the operation parameters of at least two second application programs, sequencing the priorities of the at least two second application programs to obtain a priority sequencing result;
And storing the prioritized results to the network resource priority list.
8. A network resource allocation apparatus, the apparatus comprising:
A priority determining module, configured to determine, if there are at least two first applications that need to use network resources at a current time, priorities of at least two first applications based on a network resource priority list, where the network resource priority list includes priorities of at least one second application that runs in a foreground within a preset time period, the priorities are determined by running parameters of the corresponding second applications, and an end time of the preset time period is earlier than the current time;
And the resource allocation module is used for allocating network resources for at least two first application programs based on the priorities of the at least two first application programs.
9. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method according to any one of claims 1 to 7.
CN202211422326.4A 2022-11-14 2022-11-14 Network resource allocation method and device, electronic equipment and storage medium Pending CN118034869A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211422326.4A CN118034869A (en) 2022-11-14 2022-11-14 Network resource allocation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211422326.4A CN118034869A (en) 2022-11-14 2022-11-14 Network resource allocation method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN118034869A true CN118034869A (en) 2024-05-14

Family

ID=91000964

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211422326.4A Pending CN118034869A (en) 2022-11-14 2022-11-14 Network resource allocation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN118034869A (en)

Similar Documents

Publication Publication Date Title
CN111597040B (en) Resource allocation method, device, storage medium and electronic equipment
CN111488135A (en) Current limiting method and device for high-concurrency system, storage medium and equipment
CN113747241A (en) Video clip intelligent editing method, device and terminal based on bullet screen statistics
CN111310834B (en) Data processing method and device, processor, electronic equipment and storage medium
CN114816738A (en) Method, device and equipment for determining calculation force node and computer readable storage medium
CN109933610A (en) Data processing method, device, computer equipment and storage medium
CN112650449B (en) Method and system for releasing cache space, electronic device and storage medium
CN112817428A (en) Task running method and device, mobile terminal and storage medium
CN118034869A (en) Network resource allocation method and device, electronic equipment and storage medium
CN111858542B (en) Data processing method, device, equipment and computer readable storage medium
CN112231090A (en) Application process management method and device and terminal equipment
CN111475488B (en) Data processing method, device, terminal equipment and readable storage medium
CN113504995A (en) Batch data processing method and device, computer equipment and storage medium
CN113468442A (en) Resource bit flow distribution method, computing device and computer storage medium
CN113656046A (en) Application deployment method and device
CN114218175A (en) Resource cross-platform sharing method and device, terminal equipment and storage medium
CN111625358A (en) Resource allocation method and device, electronic equipment and storage medium
CN117135756B (en) Heterogeneous wireless network resource allocation method and device and terminal equipment
CN116204201B (en) Service processing method and device
CN113220555B (en) Method, apparatus, device, medium, and article for processing data
CN110717826A (en) Asset filtering method and device
CN111290850B (en) Data storage method, device and equipment
CN112559856B (en) Application ordering method and device
CN116978031A (en) Image data processing method and device and related products
CN115311006A (en) Method and device for identifying service index ascending trend and readable storage medium

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