CN112783636A - Resource allocation method, device and storage medium - Google Patents

Resource allocation method, device and storage medium Download PDF

Info

Publication number
CN112783636A
CN112783636A CN201911080466.6A CN201911080466A CN112783636A CN 112783636 A CN112783636 A CN 112783636A CN 201911080466 A CN201911080466 A CN 201911080466A CN 112783636 A CN112783636 A CN 112783636A
Authority
CN
China
Prior art keywords
function
functions
resources
application program
resource
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
CN201911080466.6A
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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201911080466.6A priority Critical patent/CN112783636A/en
Publication of CN112783636A publication Critical patent/CN112783636A/en
Pending legal-status Critical Current

Links

Images

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/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
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04886Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures by partitioning the display area of the touch-screen or the surface of the digitising tablet into independently controllable areas, e.g. virtual keyboards or menus

Abstract

The present disclosure relates to a resource allocation method, device and storage medium, the method comprising: acquiring behavior habit information of a user; analyzing the function in the application program according to the behavior habit information to determine a first function; the first function is a function of which the number of times of use exceeds a first preset value; before the first function is started, allocating target resources for one or more functions in the first function. The resource allocation method provided by the disclosure can improve the starting speed of the functions in the application program and improve the use experience of a user.

Description

Resource allocation method, device and storage medium
Technical Field
The present disclosure relates to the field of terminal technologies, and in particular, to a resource allocation method, apparatus, and storage medium.
Background
At present, people have higher and higher requirements on applications and services in application programs, and how to start the applications and services more quickly when a user uses the application programs is very important.
In the related technology, a user can quickly search for a commonly used application program, the commonly used application program can be displayed in a touch area of the use habit of the user according to the use habit of the user, and then the user can quickly enter the commonly used application program to perform required application and service.
Disclosure of Invention
In order to overcome the problems in the related art, the present disclosure provides a resource allocation method, which can improve the starting speed of the functions in the application program and improve the user experience.
According to a first aspect of the embodiments of the present disclosure, there is provided a resource allocation method, including:
acquiring behavior habit information of a user;
analyzing the function in the application program according to the behavior habit information to determine a first function; the first function is a function of using times within a preset time period exceeding a first preset value;
before the first function is started, allocating target resources to one or more functions in the first function, wherein the target resources are resources required for realizing the first function.
Optionally, the allocating target resources to one or more of the first functions includes:
detecting whether an application program corresponding to the first function is in a use state;
and if the application program corresponding to the first function is in a use state, allocating the target resource to a second function in the first function before the first function is started, wherein the second function refers to a function of which the corresponding application program is in the use state.
Optionally, the allocating target resources to one or more of the first functions includes:
determining a third function to be used by the user from the first function according to the behavior habit information;
allocating the target resource for the third function.
Optionally, if the first function includes a plurality of fourth functions, the allocating target resources to one or more of the first functions includes:
acquiring the use times of the fourth functions respectively, and sequencing the use times from large to small;
allocating target resources for the first M fourth functions, wherein M is a positive integer and is less than or equal to the total number of the fourth functions.
Optionally, before allocating the target resource to one or more of the first functions, the method further includes:
and determining the target resource.
Optionally, the method further includes:
if the target resource is larger than a preset storage space, determining a fifth function according to the behavior habit information; the fifth function is a function that the number of times of use is less than a second preset value; and clearing the resources occupied by the fifth function.
Optionally, the determining the target resource includes:
determining a category of the first function;
and determining the resources corresponding to the categories as the target resources according to the corresponding relation between the categories and the resources.
Optionally, the method further includes:
determining a sixth function periodically according to the behavior habit information; the sixth function is a function in which the number of times of use is less than a third preset value;
and clearing the resources occupied by the sixth function.
According to a second aspect of the embodiments of the present disclosure, there is provided a resource allocation apparatus, including:
the acquisition module is configured to acquire behavior habit information of a user;
the first determining module is configured to analyze functions in the application program according to the behavior habit information acquired by the acquiring module and determine a first function; the first function is a function of using times within a preset time period exceeding a first preset value;
the first allocation module is configured to allocate target resources to one or more functions in the first function before the first function is started, wherein the target resources are resources required for realizing the first function.
Optionally, the first distribution module includes:
the first detection submodule is configured to detect whether an application program corresponding to the first function is in a use state;
and the first allocating submodule is configured to allocate the target resource to a second function in the first functions before the first functions are started when the first detecting submodule detects that the application program corresponding to the first functions is in a use state, wherein the second function refers to a function of which the application program corresponding to the second function is in a use state.
Optionally, the first distribution module includes:
the first determining submodule is configured to determine a third function to be used by the user from the first function according to the behavior habit information;
a second allocation submodule configured to allocate the target resource for the third function.
Optionally, if the first function includes a plurality of fourth functions; the first distribution module comprises:
the obtaining sub-module is configured to obtain the use times of each of the fourth functions, and sort the use times in an order from large to small;
a third allocating submodule configured to allocate the target resource for the first M fourth functions, where M is a positive integer and is less than or equal to the total number of the fourth functions.
Optionally, the apparatus further comprises:
a second determination module configured to determine the target resource.
Optionally, the apparatus further comprises:
the third determining module is configured to determine a fifth function according to the behavior habit information if the target resource is larger than a preset storage space; the fifth function is a function that the number of times of use is less than a second preset value; and clearing the resources occupied by the fifth function.
Optionally, the second determining module includes:
a second determination submodule configured to determine a category of the first function;
and the third determining submodule is configured to determine the resource corresponding to the category as the target resource according to the corresponding relation between the category and the resource.
Optionally, the apparatus further comprises:
the fourth determining module is configured to periodically determine a sixth function according to the behavior habit information; the sixth function is a function in which the number of times of use is less than a third preset value;
a clearing module configured to clear the resource occupied by the sixth function.
According to a third aspect of the embodiments of the present disclosure, there is provided a terminal device, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
acquiring behavior habit information of a user;
analyzing the function in the application program according to the behavior habit information to determine a first function; the first function is a function of using times within a preset time period exceeding a first preset value;
before the first function is started, allocating target resources to one or more functions in the first function, wherein the target resources are resources required for realizing the first function.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program, characterized in that the program, when executed by a processor, implements the steps of the method of the first aspect of embodiments of the present disclosure.
The resource allocation method, the resource allocation device and the storage medium provided by the embodiment of the disclosure acquire behavior habit information of a user; analyzing the functions in the application program according to the acquired behavior habit information to determine a first function; the first function is a function that the number of times of use within a preset time period exceeds a first preset value; and then before the first function is started, allocating target resources to one or more functions in the first function, wherein the target resources are resources required for realizing the first function. Because the first function in the common application program and the application program of the user can be known by acquiring the behavior habit of the user, and then the resource allocation can be carried out on the first function in advance, therefore, when the user needs to use the first function in the application program, the first function can be quickly started, and the use experience of the user is further improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
Fig. 1 is a flow chart illustrating a method of resource allocation in accordance with an example embodiment.
Fig. 2 is a flow chart illustrating a method of resource allocation according to another exemplary embodiment.
Fig. 3 is a flow chart illustrating a method of resource allocation according to yet another exemplary embodiment.
Fig. 4 is a block diagram illustrating a resource allocation apparatus according to an example embodiment.
Fig. 5 is a block diagram illustrating a resource allocation apparatus according to another exemplary embodiment.
Fig. 6 is a block diagram illustrating a resource allocation apparatus according to yet another exemplary embodiment.
Fig. 7 is a block diagram illustrating a resource allocation apparatus according to still another exemplary embodiment.
Fig. 8 is a block diagram illustrating a resource allocation apparatus according to another exemplary embodiment.
Fig. 9 is a block diagram illustrating a resource allocation apparatus according to yet another exemplary embodiment.
Fig. 10 is a block diagram illustrating a resource allocation apparatus according to still another exemplary embodiment.
FIG. 11 is a block diagram illustrating an apparatus in accordance with an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
The resource allocation method provided by the embodiment of the disclosure can be applied to terminal equipment, for example, equipment such as a mobile phone, a computer or an iPad with machine learning capability. In the related art, when a user logs out from some system applications or services, the background of the terminal device will release all the related memories, which include memories of all application functions in the application program, for example: the instant messaging application program has the advantages that the chat function, the payment function, the photographing function, the video function and the like in the instant messaging application program, so that when a user starts a certain function in the application program again, the starting speed may be relatively slow, or the function cannot be used by the user due to reasons such as insufficient memory and the like, and the user experience is poor.
The present disclosure considers the problems in the related art, and provides a resource allocation method by obtaining behavior habit information of a user; analyzing the functions in the application program according to the acquired behavior habit information to determine a first function; wherein the first function is a function of which the number of times of use exceeds a first preset value; and then before the first function is started, allocating resources for the first function, wherein the target resources are resources required for realizing the first function. Because the first function in the common application program and the application program of the user can be known by acquiring the behavior habit of the user, and then the resource allocation can be carried out on the first function in advance, therefore, when the user needs to use the first function in the application program, the first function can be quickly started, and the use experience of the user is further improved.
Fig. 1 is a flowchart illustrating a resource allocation method according to an exemplary embodiment, which is used in a terminal, as shown in fig. 1, and includes the following steps.
Step 101: and acquiring the behavior habit information of the user.
In this step, the behavior habits of the user may include: the usage times, the usage duration and the usage time point are, where the usage times is the total times of a certain function in a certain application used by a user within a certain time period, the usage duration is the total times of a certain function in a certain application used by a user within a certain time period, and the usage time point is the time point of a certain function in a certain application used by a user within a certain time period, for example, a behavior habit of a user using a beauty function in a camera application on a terminal device within a week is as follows: the number of usage times in a week is 20, the duration of usage in a week is 6 hours, and the time points of usage in a week are 12 am and 6 pm every day, etc., although the behavior habits of the user may also include other information, which is not limited in this disclosure.
In this step, the terminal device can obtain the application program and the function of the application program commonly used by the user by obtaining the usage behavior habit of the user, and can provide a basis for the resource allocation mode of the terminal device according to the obtained information.
Step 102: analyzing the functions in the application program according to the behavior habit information to determine a first function; the first function is a function in which the number of times of use within a preset time period exceeds a first preset value.
In this step, the application program is an application program in the user terminal device, and in the user terminal device, the application program may be one or multiple application programs, and further, the application program further includes one or more functions. The terminal equipment analyzes one or more functions of the application programs in the terminal equipment according to the acquired use behavior habits of the user, and determines a first function, wherein the first function is a function frequently used in one or more application programs, namely the first function is a function of which the use times exceed a first preset value. The first preset value may be 10 times or 20 times, and may be set according to specific situations, the first preset value is not limited in any way in the present disclosure, and in addition, the first function may be one or more functions in one application program, and may also be multiple functions in different application programs.
For example: determining that the common application programs of the user A are an instant messaging application program and a payment application program according to the acquired behavior habits of the user A within a week, wherein the acquired behavior habits of the user A within a week can also be known: the number of times that the user a uses the chatting function in the instant messenger application is 100 times and the photographing function is 60 times, the number of times that the user a uses the transfer function in the payment application is 30 times and the payment function is 80 times, and if the first preset value is 30 times, the chatting function and the photographing function in the instant messenger application, and the transfer function and the payment function in the payment application are the first functions.
In the step, the functions in the application program are analyzed according to the acquired user behavior habit information and the user behavior habit information, so that a first function with the use times exceeding a first preset value is determined, and a basis is provided for reasonable distribution of terminal resources.
Step 103: before the first function is started, target resources are allocated to one or more functions in the first function, and the target resources are resources required for realizing the first function.
In this step, before the first function is started, it means that the user has not started the first function, and in addition, the target resource may include a memory resource, a computing resource, a processing resource, and the like, and the target resource is used for implementing the first function.
In an optional manner, before allocating target resources to one or more functions in the first function, the target resources may be determined first, and determining the target resources may determine a category of the first function first, and determine, according to a correspondence between the category and the resources, that the resources corresponding to the category are the target resources.
Before the category of the first function is determined, the functions in the application program are classified, the specific classification mode is not limited at all, different levels can be classified according to the use duration, and different categories can also be classified according to the resource types required by the functions. After the category of the first function is determined, further, according to a preset corresponding relationship between the function category and the resource, determining that the resource corresponding to the first function category is the target resource.
By distributing the required target resources for the first function before the first function is started, the user can start the first function quickly when using the first function in the application program, and the user cannot normally open the first function due to insufficient memory or failure in resource distribution, so that the user experience is poor.
According to the resource allocation method provided by the embodiment of the disclosure, behavior habit information of a user is acquired; analyzing the functions in the application program according to the acquired behavior habit information to determine a first function; the first function is a function of which the number of times of use exceeds a first preset value; and then before the first function is started, allocating target resources for one or more functions in the first function, wherein the target resources are resources required for realizing the first function. Because the first function in the common application program and the application program of the user can be known by acquiring the behavior habit of the user, and then the target resource allocation can be carried out on the first function in advance, therefore, when the user needs to use the first function in the application program, the first function can be quickly started, and the use experience of the user is further improved.
Fig. 2 is a flowchart illustrating a resource allocation method according to another exemplary embodiment, and on the basis of fig. 1, a process of how to allocate target resources for one or more functions in a first function is explained in detail, and as shown in fig. 2, the method includes the following steps.
Step 201: and acquiring the behavior habit information of the user.
Step 202: analyzing the functions in the application program according to the behavior habit information to determine a first function; the first function is a function in which the number of times of use within a preset time period exceeds a first preset value.
Step 201-step 202 are similar to step 101-step 102, and are not described herein again.
Step 203: whether the application program corresponding to the first function is in a use state is detected.
In this step, according to the determined first function, an application program corresponding to the first function is determined, and whether the application program corresponding to the first function is in a use state is detected.
Step 204: and if the application program corresponding to the first function is in the use state, allocating target resources for a second function in the first function, wherein the second function is the function of which the corresponding application program is in the use state.
In this step, if the first function includes one function, that is, if the number of the first functions is 1, the function is also the second function, and when it is detected that the user is using the application corresponding to the first function, the target resource is allocated to the second function in the first function before the first function is started.
Specifically, examples are as follows: if the first function beauty function is determined according to the behavior habit information, the application program camera corresponding to the beauty function is detected, and if the camera is detected to be in the use function state, target resources are allocated to the first function, namely the beauty function in advance before the beauty function is started, so that a user can start immediately when using the beauty function, and the user experience is improved.
Optionally, if the first function includes multiple functions; allocating a target resource for a second function of the first functions, comprising: respectively detecting the use states of the application programs corresponding to the functions to obtain a first application program, wherein the first application program is the application program in the use state, and the function corresponding to the first application program is a second function; a target resource is allocated for a second function in the first application.
Illustratively, when it is determined that the first function includes a plurality of functions, such as a beauty function, a face slimming function, a chat function, the payment function and the friend adding function are based on the assumption that an application program corresponding to the beauty function and the face slimming function is a camera, an application program corresponding to the chat function and the friend adding function is instant messaging, an application program corresponding to the payment function is a payment application program, at the moment, the use states of the application programs corresponding to the functions need to be detected respectively, namely the use states of the camera application program, the instant messaging application program and the payment application program are detected, the application program in the use state is determined, the assumption that the instant messaging application program is in the use function state is determined, at the moment, target resources are allocated to a second function in the instant messaging application program, namely, the target resources are allocated to the chat function and the friend adding function in the instant messaging application program.
In this embodiment, by detecting the usage state of the application corresponding to the determined first function, the application in the usage state can be determined, and further, the target resource allocation is performed on the first function in the application in the usage state.
Optionally, allocating target resources for one or more functions in the first function, further includes: determining a third function to be used by the user from the first function according to the behavior habit information; and allocating resources for the third function to be used by the user.
The first function may include one third function, or may include a plurality of third functions.
Specific examples are as follows: assuming that the determined first function is a beauty function, a jigsaw function and a video recording function, at this time, according to the behavior habit of the user, the function to be used by the user is determined from the beauty function, the jigsaw function and the video recording function, wherein the mode for determining the function to be used by the user may be: according to the number of times of use, the duration of use and/or the time point of use, it may be determined specifically according to the actual situation, and after determining a first function to be used, the determined function is allocated with the target resource, that is, the user is allocated with the target resource for the function to be used. If the function to be used by the user is determined to be the beautifying function, the terminal equipment can allocate the target resource for the beautifying function.
Optionally, if the first function includes a plurality of fourth functions; allocating target resources for one or more of the first functions, comprising: acquiring the use times of the fourth functions respectively, and sequencing the use times from large to small; allocating target resources for the first M fourth functions, wherein M is a positive integer and is less than or equal to the total number of the fourth functions.
Specific examples are as follows: assuming that the first function in the instant messaging application includes a plurality of fourth functions, where the fourth functions are a chat function, a photo function, a red packet generation function, a pan function, and a scan function, and the total number of the fourth functions is 5, if the behavior habits of the user are obtained, it can be known that the fourth functions are arranged in order of the number of usage times, at this time, target resource allocation can be performed for the first three fourth functions, that is, target resource allocation can be performed for the chat function, the photo function, and the red packet generation function.
In this embodiment, the first function to be used by the user may be allocated with resources according to the usage state information obtained in advance, and the speed of the user may be faster when the user uses the first function by allocating the resources in advance.
Fig. 3 is a flowchart illustrating a resource allocation method according to another exemplary embodiment, and the process before allocating target resources for one or more functions in the first function is explained in detail on the basis of fig. 1, and the method includes the following steps, as shown in fig. 3.
Step 301: and acquiring the behavior habit information of the user.
Step 302: analyzing the functions in the application program according to the behavior habit information to determine a first function; the first function is a function in which the number of times of use within a preset time period exceeds a first preset value.
Steps 301 to 302 are similar to steps 101 to 102 and are not described herein again.
Step 303: a target resource is determined.
In this step, the target resource may include a memory resource, a computing resource, a processing resource, and the like, and the target resource is used to implement the first function. The determining of the target resource may first determine a category of the first function, and determine, according to a correspondence between the category and the resource, the resource corresponding to the category as the target resource.
Before the category of the first function is determined, the function in the application program is classified, and a specific classification rule is not limited at all, and different levels can be classified according to the use duration, and different categories can also be classified according to the type of resources required by the function. After the category of the first function is determined, further, according to a preset corresponding relationship between the function category and the resource, determining that the resource corresponding to the first function category is the target resource.
In this step, the preset storage space in the terminal device is determined at the same time as the determined size of the target resource required by the first function, where the target resource required by the first function is a memory resource, a processing resource and a computing resource of the terminal device occupied by the first function. And the preset storage space of the terminal equipment is the available memory space of the terminal equipment.
Optionally, if the target resource required by the first function is larger than the preset storage space, determining a fifth function according to the behavior habit information; the fifth function is a function in which the number of times of use is less than the second preset value.
In this step, if it is determined that the target resource required by the first function is greater than the preset storage space, that is, the storage resource occupied by the first function is greater than the available memory space in the terminal device, a fifth function is further determined according to the behavior habit of the user, where the fifth function is a function whose number of times of use is less than a second preset value, where the second preset value is less than the first preset value, that is, the number of times of using the fifth function by the user is less than the number of times of using the first function by the user. And clearing the resources occupied by the fifth function.
In this step, after the fifth function is determined, the resource previously allocated to the fifth function, that is, the resource occupied by the fifth function, is to be removed, specifically, it is assumed that the determined first function in the instant messaging application is a chat function, and the resource required by the chat function is greater than the preset storage space, at this time, the fifth function whose number of times of using the function is less than the second preset value is determined according to the behavior habit of the user, and it is assumed that the fifth function is a setting function, at this time, the resource previously allocated to the fifth function, that is, the resource previously allocated to the setting function is to be removed, so as to satisfy the resource required by the chat, and further, the user can start the first function more quickly when using the first function.
Optionally, periodically determining a sixth function according to the behavior habit information; the sixth function is a function in which the number of times of use is smaller than the third preset value. And clearing the resources occupied by the sixth function.
Specifically, the sixth function may be determined periodically according to the behavior habit of the user, where the sixth function is a function whose number of times of use is less than a third preset value, and the resource occupied by the sixth function is cleared, where the third preset value may be equal to or less than the second preset value, so that the resource required to be allocated for the first function or the fifth function is satisfied by releasing the resource of the sixth function.
Step 304: before the first function is started, target resources are allocated to one or more functions in the first function.
Step 304 is similar to step 103 and will not be described herein.
In this embodiment, whether the storage space of the terminal device meets the requirement of the target resource of the first function is determined by determining the target resource of the first function and according to the preset storage space, and the requirement of the resource of the first function is met by clearing the resource occupied by the fifth function, so that better service experience can be provided for the user.
Fig. 4 is a block diagram illustrating a resource allocation apparatus according to an example embodiment. Referring to fig. 4, the apparatus includes an acquisition module 11, a first determination module 12 and a first distribution module 13.
An obtaining module 11 configured to obtain behavior habit information of a user;
the first determining module 12 is configured to analyze the function in the application program according to the behavior habit information acquired by the acquiring module to determine a first function; the first function is a function that the number of times of use within a preset time period exceeds a first preset value;
a first allocating module 13 configured to allocate target resources to one or more functions in the first function before the first function is started, where the target resources are resources required for implementing the first function.
In the resource allocation method provided by the embodiment of the present disclosure, the obtaining module 11 obtains behavior habit information of a user; the first determining module 12 analyzes the functions in the application program according to the acquired behavior habit information to determine a first function; the first function is a function of which the number of times of use exceeds a first preset value; and the first allocation module 13 allocates target resources to one or more functions in the first function before the first function is started, where the target resources are resources required for implementing the first function. Because the first function in the common application program and the application program of the user can be known by acquiring the behavior habit of the user, and then the target resource allocation can be carried out on the first function in advance, therefore, when the user needs to use the first function in the application program, the first function can be quickly started, and the use experience of the user is further improved.
Fig. 5 is a block diagram illustrating a resource allocation apparatus according to another exemplary embodiment. Referring to fig. 5, the first distribution module 13 includes:
the first detection submodule 131 is configured to detect whether an application program corresponding to the first function is in a use state;
the first allocating submodule 132 is configured to, when the first detecting submodule detects that the application program corresponding to the first function is in a use state, allocate a target resource to a second function in the first function before the first function is started, where the second function is a function whose corresponding application program is in a use state.
Optionally, the first distribution module 13 includes: a first determination submodule 133 and a third determination submodule 134, as shown in fig. 6, wherein,
a first determining submodule 133 configured to determine, according to the behavior habit information, a third function to be used by the user from the first functions;
a second allocating submodule 134 configured to allocate the target resource for the third function.
Optionally, if the first function includes a plurality of fourth functions, the first distribution module 13 includes: an acquisition submodule 135 and a fourth submodule 136, as shown in fig. 7, wherein,
an obtaining sub-module 135 configured to obtain the number of times of use of each of the plurality of fourth functions, and sort the obtained number of times of use in an order from a large number to a small number;
a fourth sub-module 136 configured to allocate the target resource for the first M fourth functions, wherein M is a positive integer and is less than or equal to the total number of the fourth functions.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 8 is a block diagram illustrating a resource allocation apparatus according to yet another exemplary embodiment. Referring to fig. 8, the apparatus further includes: a second determination module 14 and a third determination module 15, wherein,
a second determination module 14 configured to determine the target resource.
Optionally, the third determining module 15 is configured to determine a fifth function according to the behavior habit information if the target resource is greater than the preset storage space; the fifth function is a function that the number of times of use is less than a second preset value; and clearing the resources occupied by the fifth function.
Optionally, the second determining module 14 includes: the second determination submodule 141 and the third determination submodule 142 are, as shown in fig. 9, wherein,
a second determination submodule 141 configured to determine a category of the first function;
the third determining sub-module 142 is configured to determine, according to the correspondence between the category and the resource, that the resource corresponding to the category is the target resource.
Optionally, the apparatus further comprises a fourth determination module 16 and a purge module 17, as shown in fig. 10, wherein,
a fourth determining module 16 configured to periodically determine a sixth function according to the behavior habit information; the sixth function is a function in which the number of times of use is less than a third preset value;
a clearing module 17 configured to clear the resource occupied by the sixth function.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 11 is a block diagram illustrating an apparatus 800 for a resource allocation method in accordance with an example embodiment. For example, the apparatus 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 11, the apparatus 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814, and a communication component 816.
The processing component 802 generally controls overall operation of the device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operation at the device 800. Examples of such data include instructions for any application or method operating on device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power component 806 provides power to the various components of device 800. The power components 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device 800.
The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the apparatus 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the device 800. For example, the sensor assembly 814 may detect the open/closed state of the device 800, the relative positioning of the components, such as a display and keypad of the apparatus 800, the sensor assembly 814 may also detect a change in position of the apparatus 800 or a component of the apparatus 800, the presence or absence of user contact with the apparatus 800, orientation or acceleration/deceleration of the apparatus 800, and a change in temperature of the apparatus 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communications between the apparatus 800 and other devices in a wired or wireless manner. The device 800 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, communications component 816 further includes a Near Field Communications (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described resource allocation methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the device 800 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (18)

1. A method for resource allocation, comprising:
acquiring behavior habit information of a user;
analyzing the function in the application program according to the behavior habit information to determine a first function; the first function is a function of using times within a preset time period exceeding a first preset value;
before the first function is started, allocating target resources to one or more functions in the first function, wherein the target resources are resources required for realizing the first function.
2. The method of claim 1, wherein the allocating target resources for one or more of the first functions comprises:
detecting whether an application program corresponding to the first function is in a use state;
and if the application program corresponding to the first function is in a use state, allocating the target resource to a second function in the first function before the first function is started, wherein the second function refers to a function of which the corresponding application program is in the use state.
3. The method of claim 1, wherein the allocating target resources for one or more of the first functions comprises:
determining a third function to be used by the user from the first function according to the behavior habit information;
allocating the target resource for the third function.
4. The method of claim 1, wherein if the first function includes a plurality of fourth functions,
the allocating target resources for one or more of the first functions comprises:
acquiring the use times of the fourth functions respectively, and sequencing the use times from large to small;
allocating the target resource for the first M fourth functions, wherein M is a positive integer and is less than or equal to the total number of the fourth functions.
5. The method of claim 1, wherein prior to said allocating target resources for one or more of said first functions, the method further comprises:
and determining the target resource.
6. The method of claim 5, further comprising:
if the target resource is larger than a preset storage space, determining a fifth function according to the behavior habit information; the fifth function is a function that the number of times of use is less than a second preset value; and clearing the resources occupied by the fifth function.
7. The method of claim 5 or 6, wherein the determining the target resource comprises:
determining a category of the first function;
and determining the resources corresponding to the categories as the target resources according to the corresponding relation between the categories and the resources.
8. The method of claim 1, further comprising:
determining a sixth function periodically according to the behavior habit information; the sixth function is a function in which the number of times of use is less than a third preset value;
and clearing the resources occupied by the sixth function.
9. A resource allocation apparatus, comprising:
the acquisition module is configured to acquire behavior habit information of a user;
the first determining module is configured to analyze functions in the application program according to the behavior habit information acquired by the acquiring module and determine a first function; the first function is a function of using times within a preset time period exceeding a first preset value;
the first allocation module is configured to allocate target resources to one or more functions in the first function before the first function is started, wherein the target resources are resources required for realizing the first function.
10. The apparatus of claim 9, wherein the first distribution module comprises:
the first detection submodule is configured to detect whether an application program corresponding to the first function is in a use state;
and the first allocating submodule is configured to allocate the target resource to a second function in the first functions before the first functions are started when the first detecting submodule detects that the application program corresponding to the first functions is in a use state, wherein the second function refers to a function of which the application program corresponding to the second function is in a use state.
11. The apparatus of claim 9, wherein the first distribution module comprises:
the first determining submodule is configured to determine a third function to be used by the user from the first function according to the behavior habit information;
a second allocation submodule configured to allocate the target resource for the third function.
12. The apparatus of claim 9, wherein if the first function comprises a plurality of fourth functions; the first distribution module comprises:
the obtaining sub-module is configured to obtain the use times of each of the fourth functions, and sort the use times in an order from large to small;
a third allocating submodule configured to allocate the target resource for the first M fourth functions, where M is a positive integer and is less than or equal to the total number of the fourth functions.
13. The apparatus of claim 9, further comprising:
a second determination module configured to determine the target resource.
14. The apparatus of claim 13, further comprising:
the third determining module is configured to determine a fifth function according to the behavior habit information if the target resource is larger than a preset storage space; the fifth function is a function that the number of times of use is less than a second preset value; and clearing the resources occupied by the fifth function.
15. The apparatus of claim 13 or 14, wherein the second determining module comprises:
a second determination submodule configured to determine a category of the first function;
and the third determining submodule is configured to determine the resource corresponding to the category as the target resource according to the corresponding relation between the category and the resource.
16. The apparatus of claim 9, further comprising:
the fourth determining module is configured to periodically determine a sixth function according to the behavior habit information; the sixth function is a function in which the number of times of use is less than a third preset value;
a clearing module configured to clear the resource occupied by the sixth function.
17. A terminal device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
acquiring behavior habit information of a user;
analyzing the function in the application program according to the behavior habit information to determine a first function; the first function is a function of using times within a preset time period exceeding a first preset value;
before the first function is started, allocating target resources to one or more functions in the first function, wherein the target resources are resources required for realizing the first function.
18. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 8.
CN201911080466.6A 2019-11-07 2019-11-07 Resource allocation method, device and storage medium Pending CN112783636A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911080466.6A CN112783636A (en) 2019-11-07 2019-11-07 Resource allocation method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911080466.6A CN112783636A (en) 2019-11-07 2019-11-07 Resource allocation method, device and storage medium

Publications (1)

Publication Number Publication Date
CN112783636A true CN112783636A (en) 2021-05-11

Family

ID=75747766

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911080466.6A Pending CN112783636A (en) 2019-11-07 2019-11-07 Resource allocation method, device and storage medium

Country Status (1)

Country Link
CN (1) CN112783636A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103631661A (en) * 2013-11-27 2014-03-12 青岛海信电器股份有限公司 Internal storage management method and device
CN106406966A (en) * 2016-10-31 2017-02-15 维沃移动通信有限公司 Preloading method for application and mobile terminal
CN106528290A (en) * 2016-09-17 2017-03-22 上海摩软通讯技术有限公司 Resource scheduling method for mobile terminal and mobile terminal
CN108920202A (en) * 2018-05-15 2018-11-30 Oppo广东移动通信有限公司 Using preloading management method, device, storage medium and intelligent terminal
US20190188007A1 (en) * 2017-12-20 2019-06-20 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method for Preloading Application, Storage Medium, and Terminal Device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103631661A (en) * 2013-11-27 2014-03-12 青岛海信电器股份有限公司 Internal storage management method and device
CN106528290A (en) * 2016-09-17 2017-03-22 上海摩软通讯技术有限公司 Resource scheduling method for mobile terminal and mobile terminal
CN106406966A (en) * 2016-10-31 2017-02-15 维沃移动通信有限公司 Preloading method for application and mobile terminal
US20190188007A1 (en) * 2017-12-20 2019-06-20 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method for Preloading Application, Storage Medium, and Terminal Device
CN108920202A (en) * 2018-05-15 2018-11-30 Oppo广东移动通信有限公司 Using preloading management method, device, storage medium and intelligent terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
罗悦;: "船舶底层通信系统信息资源并行分配方法分析", 舰船科学技术, no. 22, pages 155 - 157 *

Similar Documents

Publication Publication Date Title
US10313288B2 (en) Photo sharing method and device
US9667774B2 (en) Methods and devices for sending virtual information card
EP3188066A1 (en) A method and an apparatus for managing an application
CN105069073B (en) Contact information recommendation method and device
EP3173970A1 (en) Image processing method and apparatus
CN108268322B (en) Memory optimization method and device and computer readable storage medium
EP3171554A1 (en) Method and device for displaying a message
CN107193653B (en) Bandwidth resource allocation method, device and storage medium
CN106919629B (en) Method and device for realizing information screening in group chat
CN107463052B (en) Shooting exposure method and device
EP3026876B1 (en) Method for acquiring recommending information, terminal and server
CN107480785B (en) Convolutional neural network training method and device
CN105511777B (en) Session display method and device on touch display screen
CN110262692B (en) Touch screen scanning method, device and medium
CN112291631A (en) Information acquisition method, device, terminal and storage medium
CN109246184B (en) Time information acquisition method and device and readable storage medium
CN105488074B (en) Photo clustering method and device
CN105227426B (en) Application interface switching method and device and terminal equipment
CN108027821B (en) Method and device for processing picture
CN106447747B (en) Image processing method and device
CN110913276B (en) Data processing method, device, server, terminal and storage medium
CN105786561B (en) Method and device for calling process
US20170201479A1 (en) Group message display method, device and medium
CN108886461B (en) Data transmission method and device
CN107885464B (en) Data storage method, device and computer 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