CN108063680B - Resource allocation control method and device - Google Patents

Resource allocation control method and device Download PDF

Info

Publication number
CN108063680B
CN108063680B CN201610988649.8A CN201610988649A CN108063680B CN 108063680 B CN108063680 B CN 108063680B CN 201610988649 A CN201610988649 A CN 201610988649A CN 108063680 B CN108063680 B CN 108063680B
Authority
CN
China
Prior art keywords
resource
attribute
instruction
acquiring
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610988649.8A
Other languages
Chinese (zh)
Other versions
CN108063680A (en
Inventor
皮剑
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Teracloud Iot Technology Co ltd
Original Assignee
Shenzhen Teracloud Iot Technology 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 Shenzhen Teracloud Iot Technology Co ltd filed Critical Shenzhen Teracloud Iot Technology Co ltd
Priority to CN201610988649.8A priority Critical patent/CN108063680B/en
Publication of CN108063680A publication Critical patent/CN108063680A/en
Application granted granted Critical
Publication of CN108063680B publication Critical patent/CN108063680B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/14Network analysis or design

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)
  • Storage Device Security (AREA)

Abstract

The invention relates to a resource allocation control method and a device, wherein the method comprises the following steps: acquiring resource information; analyzing the resource information to obtain resource attributes; and calling and loading the resources according to the resource attributes. According to the resource allocation control method and the resource allocation control device, the resource information is obtained and the resource attribute is obtained through analysis, so that the resource is called and loaded, the automatic allocation of the resource is realized, and the resource allocation efficiency is effectively improved.

Description

Resource allocation control method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a resource allocation control method and apparatus.
Background
In recent years, computer networks have become carriers of various industries, and cloud computing provides resources such as computation, storage, software, and services to users through high-speed internet transmission capability. Whether the resources are common information resources or computing resources, a user acquires and operates the resources through various ways to form a resource package so as to meet the application scene requirement, and the user needs to manually record the calling mode and sequence of the resource package. For the same user, configuring a plurality of same user scenes requires repeated operations, or similar needs of the same user require the same repeated work. However, such a record is only formally used, and when it is needed next time, the resource involved therein needs to be searched and located again, even for the same user, the same kind of resource or the same kind of service. To a certain extent, there is a large amount of repetitive work, so that the resource allocation work efficiency is low
Disclosure of Invention
Therefore, it is necessary to provide a resource allocation control method and device for effectively improving resource allocation efficiency, aiming at the defect that the conventional resource allocation method is low in efficiency.
A resource allocation control method, comprising:
acquiring resource information;
analyzing the resource information to obtain resource attributes;
and calling and loading the resources according to the resource attributes.
In one embodiment, the step of analyzing the resource information and obtaining the resource attribute includes:
analyzing the resource information to obtain a module sequence;
and acquiring resources and resource attributes corresponding to the resources according to the module sequences.
In one embodiment, the step of calling and loading the resource according to the resource attribute includes:
acquiring a resource instruction;
and loading the resource according to the module sequence, the resource attribute and the resource instruction.
In one embodiment, the step of obtaining resource information is preceded by:
acquiring a resource instruction;
analyzing the resource instruction, and acquiring the corresponding resource attribute according to the resource instruction;
and generating the resource information according to the resource attribute codes.
In one embodiment, the step of generating the resource information according to the resource attribute code comprises:
analyzing the resource attribute to obtain an attribute code corresponding to the resource attribute;
generating a module sequence according to the attribute codes;
and encrypting the module sequence to generate resource information.
In one embodiment, the step of analyzing the resource information and obtaining the resource attribute includes:
decrypting the resource information to obtain the module sequence;
analyzing the module sequence, and acquiring an attribute code according to the module sequence;
and acquiring the resource attribute according to the attribute code.
A resource allocation control apparatus comprising:
a resource information acquisition unit for acquiring resource information;
a resource attribute obtaining unit, configured to analyze the resource information and obtain a resource attribute;
and the resource calling unit is used for calling and loading the resource according to the resource attribute.
In one embodiment, the resource attribute obtaining unit includes:
a module sequence acquiring subunit, configured to parse the resource information to acquire a module sequence;
and the resource and resource attribute acquiring subunit is used for acquiring the resource and the resource attribute corresponding to the resource according to the module sequence.
In one embodiment, the resource calling unit includes:
the resource instruction acquisition subunit is used for acquiring a resource instruction;
and the resource loading subunit is used for loading the resource according to the module sequence, the resource attribute and the resource instruction.
In one embodiment, further comprising:
a resource instruction obtaining unit, configured to obtain a resource instruction;
the resource instruction analyzing unit is used for analyzing the resource instruction and acquiring the corresponding resource attribute according to the resource instruction;
and the resource information generating unit is used for generating the resource information according to the resource attribute codes.
According to the resource allocation control method and the resource allocation control device, the resource information is obtained and the resource attribute is obtained through analysis, so that the resource is called and loaded, the automatic allocation of the resource is realized, and the resource allocation efficiency is effectively improved.
Drawings
FIG. 1A is a flowchart illustrating a resource allocation control method according to an embodiment;
FIG. 1B is a flowchart illustrating a resource allocation control method according to another embodiment;
FIG. 1C is a flowchart illustrating a resource allocation control method according to another embodiment;
FIG. 1D is a flowchart illustrating a resource allocation control method according to another embodiment;
FIG. 1E is a flowchart illustrating a resource allocation control method according to another embodiment;
FIG. 1F is a flowchart illustrating a resource allocation control method according to another embodiment;
FIG. 1G is a flowchart illustrating a resource allocation control method according to another embodiment;
FIG. 2A is a block diagram of the elements of a resource allocation control apparatus according to an embodiment;
FIG. 2B is a block diagram of a resource attribute obtaining unit according to an embodiment;
FIG. 2C is a block diagram of elements of a resource invocation unit, according to an embodiment;
FIG. 2D is a block diagram of a resource allocation control apparatus according to another embodiment;
FIG. 2E is a block diagram of a resource information generation unit according to an embodiment;
FIG. 2F is a block diagram of a resource attribute obtaining unit according to another embodiment;
FIG. 2G is a block diagram of elements of a resource invocation unit according to another embodiment;
FIG. 3 is a schematic diagram of a resource information generation process according to an embodiment;
FIG. 4 is a diagram illustrating a resource allocation process according to an embodiment.
Detailed Description
To facilitate an understanding of the invention, the invention will now be described more fully with reference to the accompanying drawings. Preferred embodiments of the present invention are shown in the drawings. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
In one embodiment, as shown in fig. 1A, a resource allocation control method of a preferred embodiment includes:
step 140, resource information is obtained.
In this embodiment, the resource information includes information related to resource configuration. For example, the resource information is encrypted information.
For example, a configuration instruction of a user is obtained, and resource information is obtained according to the configuration instruction, specifically, the configuration instruction is obtained through a user operation, for example, resource information is obtained according to a configuration trigger event, specifically, the trigger event is that when a user configures an application scenario or a system environment, a configuration operation of the user is detected, and resource information is obtained according to the configuration operation of the user.
The resource information is pre-stored information, for example, the resource information is pre-stored locally, and for example, the resource information is pre-stored in a server, for example, the server is a cloud server, for example, the resource information is pre-stored in a server in a network, for example, the network is the internet, and for example, the network is a local area network.
Step 160, analyzing the resource information to obtain the resource attribute.
In this embodiment, the obtained resource information is analyzed, and a resource attribute is obtained according to the resource information, for example, the resource is a system resource, for example, the resource is a file, for example, the resource is an image file, for example, the resource is an audio file, or a video file, or an image file, where as another example, the resource is an executable program, or a system, where as another example, the resource is a memory space of a computer, and as another example, the resource is a computer device.
The resource attributes include, for example, a resource category, a resource identification, a resource address, a call duration, and a call order, for example, the resource category is a type of the resource, for example, the resource type is a file format, e.g., the resource is identified by the name of the resource, e.g., the resource address is the call path of the resource, e.g., the Resource address is a URL (Uniform Resource Locator) address pointing to an address of a Resource to be called, for example, the calling duration is the time length of the Resource call, for example, the call duration also includes a call start time and a call end time, for example, the call order is the order of the calls of the resources, it should be understood that, when an application scene or a system environment is configured, each resource needs to be called according to a preset sequence, so that the application scene or the system environment can be configured smoothly.
And step 180, calling and loading the resource according to the resource attribute.
In this embodiment, resources are called according to the resource identifier, the resource address, the calling time and the calling sequence, specifically, each resource is obtained according to the resource identifier and the resource address, each resource is sequentially called according to the calling sequence, and each resource is ended after the resource is called according to the calling time, so that the resources are reasonably called, the configuration is completed, and the efficiency of resource configuration is effectively improved.
In one embodiment, as shown in FIG. 1B, step 160 comprises:
step 160A, the resource information is analyzed to obtain a module sequence.
Specifically, in this embodiment, the resource information may be text information, the resource information is pre-stored in a local area, a server, or a network, the module sequence includes an execution sequence of a plurality of resources, or the module sequence records a loading sequence of the resources, for example, the module sequence is a calling sequence of the resources, and has different module sequences in different scenarios or different deployment environments. The module sequence execution mode supports logic judgment.
And 160B, acquiring resources and resource attributes corresponding to the resources according to the module sequences.
Specifically, in this step, according to the loading sequence of the module sequence, resources and resource attributes in the module sequence are sequentially obtained, each resource corresponds to at least one resource attribute, the resource attributes include a resource type and a resource identifier of the resource, and also include calling characteristics of the resource, such as a calling duration and a calling path, and the resources are obtained according to the module sequence, so that each resource can be sequentially called, and the resource attributes corresponding to the resources are prestored in a local area, a server, or a network.
In one embodiment, as shown in FIG. 1C, step 180 includes:
step 180A, a resource instruction is obtained.
For example, the resource information is parsed to obtain the resource command. Specifically, the resource information also describes resource instructions. The resource instruction is a call instruction of the resource, for example, the resource instruction is a call start, a call stop, a call wait, a call pause, a call termination, a call resume, and the like of the resource, and is used for controlling loading of the resource.
Step 180B, loading the resource according to the module sequence, the resource attribute and the resource instruction.
In this embodiment, after the module sequence, the resource attribute, and the resource instruction are obtained, the resource is loaded according to the module sequence, the resource attribute, and the resource instruction. Specifically, in this embodiment, the resource information records a corresponding resource instruction, a module sequence, and a resource attribute, and starts to call according to the resource instruction, and calls each resource according to the call sequence of the module sequence, and loads each resource according to the resource attribute, so that each resource can be sequentially loaded in a matching manner.
The following is a specific application scenario of resource allocation in this embodiment:
in the present embodiment, the resource information describes module elements, module sequences, and resource instructions. In this embodiment, the module elements are resources and resource attributes, for example, the resources and the resource attributes are integrated, and the resources and the resource attributes are modularized, that is, the resources and the resource attributes are modularized into the module elements, where one module element includes one resource and a resource attribute corresponding to the resource, and in this embodiment, the resource attributes include a selection of the resource, a call parameter, and a call path of the resource.
The calling order of the module elements is modularized, for example, the calling order of the module elements is modularized into a module sequence, that is, the calling order of each module element is different under different module sequences, that is, the calling order of each module element is recorded under one module sequence. The module sequence execution mode supports logic judgment.
The resource instruction is a resource calling instruction, a plurality of resource instructions form a resource instruction set, one or more resource instructions are recorded in the resource information, and the corresponding relation and the sequence relation of the resource instructions and the module sequences are also recorded in the resource information.
In this embodiment, the module elements include:
win7 system module, selecting system Win7, mirror path, CPU value, MEM value and HDD value, wherein the resource in the module element is Win7 system module, and the resource attribute is mirror path, CPU value, MEM value and HDD value.
And E2. a Linux system module: selecting a system Linux, setting a mirror image path, and setting CPU, MEM and HDD values, wherein the resource in the module element is a Linux system module, and the resource attribute is the mirror image path, CPU value, MEM value and HDD value.
Ie installation module: and installing IE, setting a file path and an installation path, wherein the resource in the module element is an IE installation module, the resource attribute is installation IE, and the file path and the installation path are set.
And E4.chrome installation module: and installing the Chrome, setting a file path and an installation path, setting a Chrome installation module as a resource in the module element, setting a file path and an installation path as a resource attribute.
E5. A script module: setting a script path and a setting result storage file, wherein the resource in the module element is a script module, and the resource attribute is the setting script path and the setting result storage file.
E6. An input module: setting address/text/content, using the resource in the module element as input module, and using the resource attribute as set address/text/content.
E7. A return module: setting the uploaded file, wherein the resource in the module element is a return module, and the resource attribute is the set uploaded file.
E8. An environment configuration module: the resource in the module element is an environment configuration module, and the resource attribute is an environment variable and a variable value.
E9. And (3) timed waiting: the length of time.
E10. And (3) developing IDE: and selecting the IDE and installing the IDE.
E11. A message notification module: and setting the message content.
E12. And (3) restarting the system: and selecting a system and restarting.
E13. And (3) starting a system: and selecting a system and starting the system.
E14. And (3) shutting down the system: and selecting a system and closing the system.
E15. Creating a system: a create operation is performed.
The module sequence in this embodiment includes:
s1, a WEB test environment deployment module: composed of module element E1, module element E15, module element E13, module element E3, module element E4, module element E6, module element E5, and module element E7 in this order.
S2, a development environment deployment module: the module element is composed of a module element E2, a module element E15, a module element E13, a module element E10, a module element E12, and a module element E11 in order.
The resource instruction set in this embodiment includes:
ME1, module starting;
ME2. module stop;
ME3. module waiting;
ME4. module pause;
ME5, module termination;
ME6. module termination;
and ME7, module recovery.
In this embodiment, the module sequence is formed by combining a series of resource instructions and module elements according to preset rules, and may be edited by a module recorder or a module designer and executed by a module executor in an actual cloud environment.
In this embodiment, the process of acquiring resource information and loading resources specifically includes:
when the cloud computing system is executed, the module executor analyzes the module sequence, configures the required cloud computing resources in advance, and controls the corresponding cloud computing resources to complete corresponding behaviors when the module is executed, so that the service requirement is realized.
In a deployment scenario of a WEB test environment, resource instructions ME1 and ME6 correspond to a module sequence WEB test environment deployment module, and a resource loading process for WEB test environment deployment is as follows:
executing the sequence of S1 modules: ME1 → E1 → E15 → E13 → E3 → E4 → E6 → E5 → E7 → ME6.
In a deployment scenario of a WEB test environment, resource instructions ME1 and ME6 correspond to a module sequence WEB test environment deployment module, and a resource loading process for WEB test environment deployment is as follows:
in a development environment deployment scenario, resource instructions ME1 and ME6 correspond to a module sequence development environment deployment module, and then the resource loading process for development environment deployment is as follows:
executing the sequence of S2 modules: ME1 → E2 → E15 → E13 → E10 → E12 → E11 → ME6.
The deployment of the WEB test environment and the deployment of the development environment are respectively realized through the two processes, and the efficiency of environment deployment is effectively improved.
In a further embodiment, as shown in FIG. 1D, step 140 is preceded by:
step 110, obtain the resource instruction.
Specifically, the resource instruction is an instruction corresponding to an operation performed by a user to configure an application scenario or a system environment, and the resource instruction is used to call and load a resource, or in other words, the resource instruction is an operation instruction for the resource. For example, a resource instruction for configuring a resource is detected, and when the resource instruction for configuring the resource is detected, the resource instruction is acquired. In one embodiment, the resource instruction is a configuration instruction, e.g., this step is a get configuration instruction.
And 120, analyzing the resource instruction, and acquiring the corresponding resource attribute according to the resource instruction.
In this embodiment, a resource attribute is obtained according to a resource instruction, specifically, an operation object of the resource instruction is a resource, each resource instruction corresponds to an operation object, and an address and a resource identifier of the resource are obtained according to a calling sequence and a calling duration of the resource acquired by the resource instruction, for example, the resource attribute is obtained, and the resource attribute is stored or recorded.
In order to avoid storing the resource attributes for multiple times, for example, when the resource instruction is obtained, the corresponding resource attribute is obtained according to the resource instruction, and whether the same resource attribute exists is detected, it is worth mentioning that, when different application scenes or system environments are configured, the types, names, duration and sequence of the called resources are different, in this way, when the same application scenario or system environment is configured, the type, name, duration and sequence of the called resources are the same, and therefore, in the embodiment, by detecting whether the same resource attribute exists, to detect whether to configure the application scenario or the system environment for the first time, if there are no identical resource attributes, then the next step is performed, if there are identical resource attributes, it means that the user does not configure the application scenario or system environment for the first time, and the next step is not performed at this time.
And step 130, generating the resource information according to the resource attribute codes.
For example, the resource information is generated according to the resource instruction and the resource attribute code, specifically, the resource attribute is coded, for example, the resource instruction, the resource identifier, the resource address, the call duration and the call order are coded to generate the resource information, specifically, the resource identifier, the resource address, the call duration and the call order are represented by numbers or characters, and the numbers or characters are coded to form characters. For example, the resource identifier is a character string, the resource address is a character string, the calling duration is a numerical value, and the calling sequence is a numerical value, so that the multiple resource attributes of each resource can be expressed by preset character strings and numerical values, the data volume of the resource information generated by the character strings and the numerical values is smaller, and the storage space occupied by the resource information is effectively reduced.
In this embodiment, the resource information is generated according to the resource instruction of the resource calling or operation by the user, so that the resource information can be directly called when resource configuration is subsequently performed, the resource information does not need to be manually set, and the generation efficiency of the resource information is effectively improved.
Also included after step 130 is storing the resource information.
For example, the resource information is stored locally, for example, the resource information is stored in a server, for example, the resource information is stored in a cloud server, for example, the resource information is stored in a server in a network, for example, the network is the internet, and for example, the network is a local area network. In this embodiment, the resource information is generated and stored by the user when the resource is configured, so that the user can directly read the resource information to perform automatic configuration of the resource, thereby effectively improving the efficiency of resource configuration. Because the resource information is stored in the server in the network, the user can acquire the resource information when configuring different terminals or computers, thereby realizing the rapid configuration of the resource.
As shown in FIG. 1E, in one embodiment, step 130 includes:
step 132, analyzing the resource attribute, and obtaining an attribute code corresponding to the resource attribute.
Specifically, the attribute code is a number or a character corresponding to the resource attribute, and the attribute code is used to represent the resource attribute, for example, the resource identifier, the resource address, the call duration, and the call order are encoded by a character string or a numerical value, for example, the resource identifier is a character string, the resource address is a character string, the call duration is a numerical value, and the call order is a numerical value, for example, the smaller the numerical value of the call order is, the higher the priority of the call order is. In this embodiment, the attribute code of each resource attribute is obtained by analyzing each resource attribute, so as to obtain the call sequence, the call duration, and the call path of each resource.
For example, step 132 further includes obtaining an attribute code corresponding to the resource instruction, specifically, the attribute code is a number or a character corresponding to the resource instruction, and the attribute code is further used for representing the resource instruction.
And 134, generating a module sequence according to the attribute codes.
Specifically, in order to reduce the data amount of the resource information and reduce the storage space occupied by the resource information, in this embodiment, an attribute code of each attribute is generated into a module sequence, where the module sequence is a set of attribute codes, for example, the module sequence is an expression connected by the attribute codes, for example, the module sequence is generated by superimposing the attribute codes in a preset format. In this way, the data volume of the attribute code recorded by the module sequence is smaller, and the storage space occupied by the resource information can be effectively reduced.
And step 136, encrypting the module sequence to generate resource information.
In this embodiment, the security of the resource information is improved by an encryption manner, so as to prevent the resource information from being leaked and tampered, for example, an RSA (public key encryption) algorithm is used to encrypt the module sequence, so that the security of the resource information generated after the module sequence is encrypted is higher, and the leakage or tampering is effectively avoided, for example, in order to improve the reliability of the resource information, in one embodiment, a data check bit is added to the module sequence and the resource information is generated by encryption. For example, after CRC (Cyclic Redundancy Check) data Check bits are added to the block sequence, resource information is generated by encryption, and the resource information is stored. After the data check bit is added, the reliability of the resource information can be effectively improved, so that the reliability of a module sequence obtained by decrypting the resource information is higher.
As shown in FIG. 1F, in one embodiment, step 160 comprises:
and step 162, decrypting the resource information to obtain the module sequence.
And 164, analyzing the module sequence, and acquiring the attribute code according to the module sequence.
And 166, acquiring the resource attribute according to the attribute code.
In this embodiment, a module sequence is obtained by decrypting the resource information, and an attribute code is obtained according to the module sequence, so as to obtain the resource attribute, for example, the module sequence is obtained by decrypting the resource information, data check is performed on the module sequence, the attribute code is obtained, for example, CRC check is performed on the module sequence, the attribute code is obtained, and then the corresponding resource attribute is obtained by the attribute code.
As shown in FIG. 1G, in one embodiment, step 180 includes:
step 182, detecting whether the resource corresponding to the resource attribute is available.
Specifically, at the time of configuring the environment, there is a resource that is not invokable, e.g., the resource is already occupied, and as such, the resource is already started, so that the resource is not available at this time. Therefore, in order to invoke the resource, it is necessary to detect whether the resource corresponding to the resource attribute is available before invoking.
Step 184, when the resource corresponding to the resource attribute is available, calling and loading the resource.
In this embodiment, when a resource corresponding to the resource attribute is available, the resource may be directly called and loaded. For example, when a resource corresponding to a resource attribute is available, the resource is called and preloaded, for example, after the resource is preloaded, the resource is executed according to the resource attribute, for example, after the resource is preloaded, the resource is executed according to a call duration and a call sequence of the resource attribute.
In another embodiment, when the resource corresponding to the resource attribute is unavailable, the resource is waited for being idle, and when the resource is idle, the resource is called and loaded.
The following is a specific resource allocation example:
in this embodiment, as shown in fig. 3, when a user performs system environment configuration, a corresponding resource is obtained according to a resource instruction of the user, and a resource attribute is obtained, where the resource attribute includes: for example, a desktop is started, for example, when the resource name is the desktop, the calling duration is 2, and the calling order is 1, in this embodiment, the resource attributes obtained according to the resource instruction of the user are as follows:
Figure BDA0001149070450000111
Figure BDA0001149070450000121
generating a module sequence according to the resource attribute, for example, the module sequence corresponding to the desktop is: and if EMvm is ON +2+1, the module sequence of the multiple resources is EM ON +2+1+ OP +15+2 … …, and then CRC checking the module sequence and encrypting the module sequence to generate resource information.
When the user performs resource configuration next time, as shown in fig. 4, reading resource information, decrypting the resource information, obtaining a module sequence, decrypting the module sequence, performing CRC check on the decrypted module sequence, judging whether the CRC check of the module sequence is successful, if so, detecting whether the resource is available, if so, preloading the resource according to the call duration and the call sequence, if detecting that the resource is unavailable, waiting, detecting whether the resource is available again, and if the resource is available, preloading the resource. For example, after the desktop is started, videos and web pages are preloaded, after the desktop and the waiting calling time, video playing is executed, and after the video playing, the web pages are opened.
As shown in fig. 2A, a resource allocation control apparatus of an embodiment includes:
a resource information obtaining unit 240, configured to obtain resource information.
And a resource attribute obtaining unit 260, configured to parse the resource information to obtain a resource attribute.
And the resource calling unit 280 is used for calling and loading the resource according to the resource attribute.
As shown in fig. 2B, in an embodiment, the resource attribute obtaining unit 260 includes:
a module sequence acquiring subunit 260A, configured to parse the resource information to acquire a module sequence;
and a resource and resource attribute obtaining subunit 260B, configured to obtain, according to the module sequence, a resource and a resource attribute corresponding to the resource.
As shown in fig. 2C, in one embodiment, the resource calling unit 280 includes:
a resource instruction obtaining subunit 280A, configured to obtain a resource instruction;
a resource loading subunit 280B, configured to load the resource according to the module sequence, the resource attribute, and the resource instruction.
In another embodiment, as shown in fig. 2D, the method further includes:
a resource instruction obtaining unit 210, configured to obtain a resource instruction.
The resource instruction parsing unit 220 is configured to parse the resource instruction, and obtain the corresponding resource attribute according to the resource instruction.
A resource information generating unit 230, configured to generate the resource information according to the resource attribute code.
In one embodiment, as shown in fig. 2E, the resource information generating unit 230 includes:
the attribute code obtaining subunit 232 is configured to analyze the resource attribute, and obtain an attribute code corresponding to the resource attribute.
And a module sequence generating subunit 234, configured to generate a module sequence according to the attribute codes.
And a resource information encryption subunit 236, configured to encrypt the module sequence to generate resource information.
As shown in fig. 2F, in an embodiment, the resource attribute obtaining unit 260 includes:
and a resource information decryption subunit 262, configured to decrypt the resource information, and obtain the module sequence.
And a module sequence parsing subunit 264, configured to parse the module sequence and obtain the attribute code according to the module sequence.
And an attribute code parsing subunit 266, configured to obtain the resource attribute according to the attribute code.
As shown in fig. 2G, in one embodiment, the resource calling unit 280 includes:
an available resource detecting subunit 282, configured to detect whether a resource corresponding to the resource attribute is available.
An available resource loading subunit 284, configured to, when a resource corresponding to the resource attribute is available, invoke and load the resource.
It should be noted that, in the above system embodiment, each included unit is only divided according to functional logic, but is not limited to the above division as long as the corresponding function can be realized; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
In addition, it can be understood by those skilled in the art that all or part of the steps in the method for implementing the embodiments described above may be implemented by instructing the relevant hardware through a program, and the corresponding program may be stored in a readable storage medium.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (9)

1. A method for controlling resource allocation, comprising:
acquiring a configuration instruction of a user, and acquiring resource information according to the configuration instruction;
analyzing the resource information to obtain a module sequence;
acquiring resources and resource attributes corresponding to the resources according to the module sequences; the resource attribute comprises a resource category, a resource identifier, a resource address, a calling duration and a calling sequence;
acquiring a resource instruction; the resource information comprises a resource instruction; the resource instruction comprises the steps of starting, stopping, waiting, pausing, stopping, terminating and resuming the calling of the resource;
detecting whether the resource corresponding to the resource attribute is available;
when the resource corresponding to the resource attribute is available, calling and loading the resource;
and when the resource corresponding to the resource attribute is unavailable, waiting for the resource to be idle, and calling and loading the resource when the resource is idle.
2. The method according to claim 1, wherein the step of obtaining resource information comprises:
acquiring a resource instruction;
analyzing the resource instruction, and acquiring the corresponding resource attribute according to the resource instruction;
and generating the resource information according to the resource attribute codes.
3. The method according to claim 1, wherein the analyzing the resource information obtains a module sequence; according to the module sequence, the step of obtaining the resource and the resource attribute corresponding to the resource comprises the following steps:
analyzing the resource attribute to obtain an attribute code corresponding to the resource attribute;
generating a module sequence according to the attribute codes;
and encrypting the module sequence to generate resource information.
4. The method according to claim 3, wherein the step of analyzing the resource information and obtaining the resource attribute comprises:
decrypting the resource information to obtain the module sequence;
analyzing the module sequence, and acquiring an attribute code according to the module sequence;
and acquiring the resource attribute according to the attribute code.
5. A resource allocation control apparatus, comprising:
the resource information acquisition unit is used for acquiring a configuration instruction of a user and acquiring resource information according to the configuration instruction;
a resource attribute obtaining unit, configured to analyze the resource information and obtain a module sequence; acquiring resources and resource attributes corresponding to the resources according to the module sequences; the resource attribute comprises a resource category, a resource identifier, a resource address, a calling duration and a calling sequence;
the resource instruction acquisition subunit is used for acquiring a resource instruction; the resource information comprises a resource instruction; the resource instruction comprises the steps of starting, stopping, waiting, pausing, stopping, terminating and resuming the calling of the resource;
an available resource detecting subunit, configured to detect whether a resource corresponding to the resource attribute is available;
the available resource loading subunit is used for calling and loading the resource when the resource corresponding to the resource attribute is available;
and when the resource corresponding to the resource attribute is unavailable, waiting for the resource to be idle, and calling and loading the resource when the resource is idle.
6. The apparatus according to claim 5, wherein the resource attribute acquisition unit includes:
a module sequence acquiring subunit, configured to parse the resource information to acquire a module sequence;
and the resource and resource attribute acquiring subunit is used for acquiring the resource and the resource attribute corresponding to the resource according to the module sequence.
7. The resource allocation control apparatus according to claim 6, further comprising:
a resource instruction obtaining unit, configured to obtain a resource instruction;
the resource instruction analyzing unit is used for analyzing the resource instruction and acquiring the corresponding resource attribute according to the resource instruction;
and the resource information generating unit is used for generating the resource information according to the resource attribute codes.
8. The apparatus of claim 7, wherein the resource information generating unit comprises:
the attribute code acquiring subunit is used for analyzing the resource attribute and acquiring an attribute code corresponding to the resource attribute;
a module sequence generating subunit, configured to generate a module sequence according to the attribute code;
and the resource information encryption subunit is used for encrypting the module sequence to generate resource information.
9. The apparatus according to claim 8, wherein the resource attribute obtaining unit comprises:
the resource information decryption subunit is used for decrypting the resource information to obtain the module sequence;
the module sequence analysis subunit is used for analyzing the module sequence and acquiring the attribute code according to the module sequence;
and the attribute code analysis subunit is used for acquiring the resource attribute according to the attribute code.
CN201610988649.8A 2016-11-09 2016-11-09 Resource allocation control method and device Active CN108063680B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610988649.8A CN108063680B (en) 2016-11-09 2016-11-09 Resource allocation control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610988649.8A CN108063680B (en) 2016-11-09 2016-11-09 Resource allocation control method and device

Publications (2)

Publication Number Publication Date
CN108063680A CN108063680A (en) 2018-05-22
CN108063680B true CN108063680B (en) 2021-08-17

Family

ID=62136797

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610988649.8A Active CN108063680B (en) 2016-11-09 2016-11-09 Resource allocation control method and device

Country Status (1)

Country Link
CN (1) CN108063680B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111611506A (en) * 2020-05-22 2020-09-01 维沃移动通信有限公司 Page loading method and device, electronic equipment and medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102231686B (en) * 2011-06-24 2017-08-11 北京天融信科技有限公司 A kind of system and method for realizing automated test of network security equipment
CN102624870A (en) * 2012-02-01 2012-08-01 北京航空航天大学 Intelligent optimization algorithm based cloud manufacturing computing resource reconfigurable collocation method
US10949230B2 (en) * 2012-05-31 2021-03-16 Microsoft Technology Licensing, Llc Language lists for resource selection based on language text direction
CN102855311A (en) * 2012-08-24 2013-01-02 乐视网信息技术(北京)股份有限公司 Intelligent file resource loader and intelligent file resource loading method
CN104424018B (en) * 2013-08-23 2018-02-16 阿里巴巴集团控股有限公司 Distributed Calculation transaction methods and device
CN103631592B (en) * 2013-11-29 2016-05-11 小米科技有限责任公司 A kind of configuration, call method, device and equipment that shows resource
CN104731521B (en) * 2013-12-23 2018-02-16 伊姆西公司 Method and apparatus for configuration data center

Also Published As

Publication number Publication date
CN108063680A (en) 2018-05-22

Similar Documents

Publication Publication Date Title
CN106339312B (en) API test method and system
CN111314306A (en) Interface access method and device, electronic equipment and storage medium
CN104680039B (en) A kind of data guard method and device of application program installation kit
CN108628743B (en) Application program testing method, device, equipment and storage medium
CN107016282B (en) information processing method and device
US20160142437A1 (en) Method and system for preventing injection-type attacks in a web based operating system
CN110874236A (en) Cross-platform application device, terminal and storage medium
KR20170114582A (en) Image processing apparatus and control method thereof
CN104199654A (en) Open platform calling method and device
CN109492181B (en) Page jump method, device, computer equipment and storage medium
CN115552401A (en) Fast application detection method, device, equipment and storage medium
CN112214714A (en) Request processing method, device and equipment based on configuration file and storage medium
CN111259382A (en) Malicious behavior identification method, device and system and storage medium
CN114650154A (en) Webpage permission behavior control method and device, computer equipment and storage medium
CN108063680B (en) Resource allocation control method and device
CN108667919A (en) Data processing method, device, computer equipment and storage medium
CN107315677B (en) Method and device for judging abnormity of application program
CN109934016B (en) Application signature verification method and device and electronic equipment
CN113434217B (en) Vulnerability scanning method, vulnerability scanning device, computer equipment and medium
CN114781404A (en) Translation method, translation system and storage medium
KR102145324B1 (en) Method and server for analyzing weak point through library injection
CN113076548A (en) Robot automation process account information processing method and device
CN113873450A (en) Short message configuration method and device, computer equipment and storage medium
CN112015633B (en) Test excitation multi-platform multiplexing method, device, equipment and storage medium
CN113420313A (en) Program safe operation and encryption method and device, equipment and medium thereof

Legal Events

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