Resource allocation method, device and storage medium

文档序号:1398626 发布日期:2020-03-03 浏览:5次 中文

阅读说明:本技术 资源配置方法、装置和存储介质 (Resource allocation method, device and storage medium ) 是由 张乾 赵君杰 苏京 于 2018-08-22 设计创作,主要内容包括:本公开提供了一种资源配置方法、装置和存储介质,涉及物联网技术领域,其中方法包括:创建自动部署资源;将与目标资源对应的配置规则信息存储在自动部署资源中,以使自动部署资源根据配置规则信息对目标资源进行自动配置;本公开的方法、装置和存储介质,减少了对应用层与服务层之间的带宽资源的消耗,并减少了对应用层以及服务层的计算资源的消耗,提高了对目标资源进行子资源创建或对目标资源的属性进行配置的效率,能够降低运营成本并提高用户的使用感受度。(The disclosure provides a resource configuration method, a resource configuration device and a storage medium, and relates to the technical field of Internet of things, wherein the method comprises the following steps: creating an automatic deployment resource; storing the configuration rule information corresponding to the target resource in the automatic deployment resource so that the automatic deployment resource automatically configures the target resource according to the configuration rule information; the method, the device and the storage medium reduce the consumption of bandwidth resources between the application layer and the service layer, reduce the consumption of computing resources of the application layer and the service layer, improve the efficiency of creating the sub-resources of the target resources or configuring the attributes of the target resources, reduce the operation cost and improve the use experience of users.)

1. A method of resource allocation, comprising:

creating an automatic deployment resource;

storing configuration rule information corresponding to the target resource in the automatic deployment resource so that the automatic deployment resource automatically configures the target resource according to the configuration rule information.

2. The method of claim 1, storing the configuration rule information in the automated deployment resource comprises:

receiving the configuration rule information, and storing the configuration in the automatic deployment resource; or the like, or, alternatively,

setting the configuration rule information, and storing the configuration in the automatic deployment resource.

3. The method of claim 2, the configuration rule information comprising: target resource matching information; wherein the setting the configuration rule information includes:

acquiring resource characteristic information corresponding to the target resource;

and generating the target resource matching information based on the resource characteristic information so that the automatic deployment resource determines the target resource according to the target matching information.

4. The method of claim 2, the configuration rule information comprising: attribute configuration information; wherein the setting the configuration rule information includes:

acquiring attribute information to be configured corresponding to the target resource;

and generating the attribute configuration information based on the attribute information to be configured so that the automatic deployment resource configures the corresponding attribute of the target resource according to the attribute configuration information.

5. The method of claim 2, the configuration rule information comprising: sub-resource configuration information; wherein the setting the configuration rule information includes:

acquiring sub-resource information to be configured corresponding to the target resource;

and generating the sub-resource configuration information based on the sub-resource information to be configured so that the automatic deployment resource configures the corresponding sub-resource of the target resource according to the sub-resource configuration information.

6. The method of claim 2, the configuration rule information comprising: configuring effective condition information; wherein the setting the configuration rule information includes:

determining a configuration validation decision rule based on a configuration policy corresponding to the target resource;

and generating the configuration validation condition information based on the configuration validation decision rule so that the automatic deployment resource determines whether to automatically configure the target resource according to the configuration validation condition information.

7. The method of claim 2, further comprising:

and generating the automatic deployment resource in an application layer, setting the configuration rule information, storing the configuration rule information in the automatic deployment resource, and then sending the automatic deployment resource to a service layer so as to deploy the automatic deployment resource in the service layer.

8. The method of any one of claims 1 to 7,

the target resource is at least one of a resource that has been created before the automatic deployment resource deployment and a resource that has been newly created after the automatic deployment resource deployment.

9. A resource configuration apparatus, comprising:

the resource creating module is used for creating automatic deployment resources;

and the rule configuration module is used for storing the configuration rule information corresponding to the target resource in the automatic deployment resource so that the automatic deployment resource can automatically configure the target resource according to the configuration rule information.

10. The apparatus of claim 9, wherein,

the rule configuration module is configured to receive the configuration rule information and store the configuration in the automatic deployment resource; or the like, or, alternatively,

the rule configuration module is configured to set the configuration rule information and store the configuration in the automatic deployment resource.

11. The apparatus of claim 10, the configuration rule information comprising: target resource matching information;

the rule configuration module includes:

a target resource information obtaining unit, configured to obtain resource feature information corresponding to the target resource;

and the target matching information setting unit is used for generating the target resource matching information based on the resource characteristic information so that the automatic deployment resource determines the target resource according to the target matching information.

12. The apparatus of claim 10, the configuration rule information comprising: attribute configuration information;

the rule configuration module includes:

a target attribute information obtaining unit, configured to obtain attribute information to be configured corresponding to the target resource;

and the attribute configuration information setting unit is used for generating the attribute configuration information based on the attribute information to be configured so that the automatic deployment resource configures the corresponding attribute of the target resource according to the attribute configuration information.

13. The apparatus of claim 10, the configuration rule information comprising: sub-resource configuration information;

the rule configuration module includes:

a sub-resource information obtaining unit, configured to obtain sub-resource information to be configured corresponding to the target resource;

and the sub-resource configuration information setting unit is used for generating the sub-resource configuration information based on the sub-resource information to be configured so that the automatic deployment resource configures the corresponding sub-resource of the target resource according to the sub-resource configuration information.

14. The apparatus of claim 10, the configuration rule information comprising: configuring effective condition information;

the rule configuration module includes:

an effective attribute obtaining unit, configured to determine a configuration effective decision rule based on a configuration policy corresponding to the target resource;

and the validation condition setting unit is used for generating the configuration validation condition information based on the configuration validation judgment rule so that the automatic deployment resource determines whether to automatically configure the target resource according to the configuration validation condition information.

15. The apparatus of claim 10, wherein,

the resource creating module is used for generating the automatic deployment resource in an application layer;

the rule configuration module is used for setting the configuration rule message in an application layer;

the resource allocation device comprises:

and the resource deployment module is used for sending the automatic deployment resource to a service layer after the rule configuration module stores the configuration rule information in the automatic deployment resource so as to deploy the automatic deployment resource in the service layer.

16. The apparatus of any one of claims 9 to 15,

the target resource is at least one of a resource that has been created before the automatic deployment resource deployment and a resource that has been newly created after the automatic deployment resource deployment.

17. A resource configuration apparatus, comprising: a memory for storing executable instructions; and a processor in communication with the memory to execute the executable instructions to perform the operations of the resource configuration method of any of claims 1 to 8.

18. A computer storage medium storing computer-readable instructions that, when executed, perform the operations of the resource allocation method of any one of claims 1 to 8.

Technical Field

The present disclosure relates to the field of internet of things technology, and in particular, to a resource allocation method, device and storage medium.

Background

At present, in the internet of things, when creating a sub-resource for a target resource or configuring an attribute of the target resource, an application layer initiates a request to a service layer, and the service layer queries the target resource according to the request, acquires target resource information and returns the target resource information to the application layer; and the application layer initiates a new request, an update request and the like to the target resource according to the target resource information so as to enable the target resource to newly create a sub-resource, modify and configure the attribute of the target resource and the like. When sub-resource creation is performed on a plurality of target resources or the attributes of the target resources are configured, the application layer needs to perform data interaction and related processing on a single target resource and the service layer every time, the service layer also needs to perform corresponding processing such as query every time, bandwidth resources between the application layer and the service layer are occupied more, and the operating resource pressure of the application layer and the service layer is higher.

BRIEF SUMMARY OF THE PRESENT DISCLOSURE

In view of the above, an object of the present disclosure is to provide a resource allocation method, apparatus and storage medium.

According to an aspect of the present disclosure, there is provided a resource configuration method, including: creating an automatic deployment resource; storing configuration rule information corresponding to the target resource in the automatic deployment resource so that the automatic deployment resource automatically configures the target resource according to the configuration rule information.

Optionally, receiving the configuration rule information, and storing the configuration in the automatic deployment resource; or setting the configuration rule information and storing the configuration in the automatic deployment resource.

Optionally, the configuration rule information includes: target resource matching information; wherein the setting the configuration rule information includes: acquiring resource characteristic information corresponding to the target resource; and generating the target resource matching information based on the resource characteristic information so that the automatic deployment resource determines the target resource according to the target matching information.

Optionally, the configuration rule information includes: attribute configuration information; wherein the setting the configuration rule information includes: acquiring attribute information to be configured corresponding to the target resource; and generating the attribute configuration information based on the attribute information to be configured so that the automatic deployment resource configures the corresponding attribute of the target resource according to the attribute configuration information.

Optionally, the configuration rule information includes: sub-resource configuration information; wherein the setting the configuration rule information includes: acquiring sub-resource information to be configured corresponding to the target resource; and generating the sub-resource configuration information based on the sub-resource information to be configured so that the automatic deployment resource configures the corresponding sub-resource of the target resource according to the sub-resource configuration information.

Optionally, the configuration rule information includes: configuring effective condition information; wherein the setting the configuration rule information includes: determining a configuration validation decision rule based on a configuration policy corresponding to the target resource; and generating the configuration validation condition information based on the configuration validation decision rule so that the automatic deployment resource determines whether to automatically configure the target resource according to the configuration validation condition information.

Optionally, the automatic deployment resource is generated in an application layer, the configuration rule information is set, and the automatic deployment resource is sent to a service layer after the configuration rule information is stored in the automatic deployment resource, so as to deploy the automatic deployment resource in the service layer.

Optionally, the target resource is at least one of a resource that has been created before the automatic deployment resource deployment and a resource that has been newly created after the automatic deployment resource deployment.

According to another aspect of the present disclosure, there is provided a resource configuration apparatus including: the resource creating module is used for creating automatic deployment resources; the rule configuration module is used for setting configuration rule information corresponding to the target resource; and the rule configuration module is used for storing the configuration rule information in the automatic deployment resource so that the automatic deployment resource can automatically configure the target resource according to the configuration rule information.

Optionally, the rule configuration module is configured to receive the configuration rule information, and store the configuration in the automatic deployment resource; or, the rule configuration module is configured to set the configuration rule information and store the configuration in the automatic deployment resource.

Optionally, the configuration rule information includes: target resource matching information; the rule configuration module includes: a target resource information obtaining unit, configured to obtain resource feature information corresponding to the target resource; and the target matching information setting unit is used for generating the target resource matching information based on the resource characteristic information so that the automatic deployment resource determines the target resource according to the target matching information.

Optionally, the configuration rule information includes: attribute configuration information; the rule configuration module includes: a target attribute information obtaining unit, configured to obtain attribute information to be configured corresponding to the target resource; and the attribute configuration information setting unit is used for generating the attribute configuration information based on the attribute information to be configured so that the automatic deployment resource configures the corresponding attribute of the target resource according to the attribute configuration information.

Optionally, the configuration rule information includes: sub-resource configuration information; the rule configuration module includes: a sub-resource information obtaining unit, configured to obtain sub-resource information to be configured corresponding to the target resource; and the sub-resource configuration information setting unit is used for generating the sub-resource configuration information based on the sub-resource information to be configured so that the automatic deployment resource configures the corresponding sub-resource of the target resource according to the sub-resource configuration information.

Optionally, the configuration rule information includes: configuring effective condition information; the rule configuration module includes: an effective attribute obtaining unit, configured to determine a configuration effective decision rule based on a configuration policy corresponding to the target resource; and the validation condition setting unit is used for generating the configuration validation condition information based on the configuration validation judgment rule so that the automatic deployment resource determines whether to automatically configure the target resource according to the configuration validation condition information.

Optionally, the resource creating module is configured to generate the automatic deployment resource in an application layer; the rule configuration module is configured to set the configuration rule information in an application layer, and the resource configuration apparatus includes: and the resource deployment module is used for sending the automatic deployment resource to a service layer after the rule configuration module stores the configuration rule information in the automatic deployment resource so as to deploy the automatic deployment resource in the service layer.

Optionally, the target resource is at least one of a resource that has been created before the automatic deployment resource deployment and a resource that has been newly created after the automatic deployment resource deployment.

According to still another aspect of the present disclosure, there is provided a resource configuration apparatus including: a memory for storing executable instructions; and a processor in communication with the memory to execute the executable instructions to perform the operations of the resource configuration method as described above.

According to yet another aspect of the present disclosure, a computer storage medium is provided for storing computer-readable instructions that, when executed, perform the operations of the resource configuration method as described above.

According to the resource configuration method, the resource configuration device and the storage medium, the automatic deployment resource is created to create the sub-resource for the target resource or configure the attribute of the target resource, so that the consumption of bandwidth resources between an application layer and a service layer is reduced, the consumption of computing resources of the application layer and the service layer is reduced, and the efficiency of creating the sub-resource for the target resource or configuring the attribute of the target resource is improved.

Drawings

In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.

FIG. 1 is a schematic flow chart diagram illustrating one embodiment of a resource allocation method of the present disclosure;

fig. 2 is a schematic flowchart illustrating setting of target resource matching information in an embodiment of a resource allocation method according to the present disclosure;

fig. 3 is a schematic flowchart illustrating setting of attribute configuration information in an embodiment of a resource configuration method according to the present disclosure;

fig. 4 is a schematic flowchart illustrating setting of sub-resource configuration information in an embodiment of a resource configuration method according to the present disclosure;

fig. 5 is a schematic flowchart illustrating setting of configuration validation condition information in an embodiment of the resource configuration method of the present disclosure;

FIG. 6 is a schematic diagram of attribute configuration for a target resource according to the resource configuration method of the present disclosure;

FIGS. 7A and 7B are another schematic diagrams of the resource configuration method of the present disclosure for attribute configuration of a target resource;

FIGS. 8A and 8B are schematic diagrams of sub-resource creation for a target resource for the resource configuration method of the present disclosure;

FIG. 9 is a block diagram illustrating an embodiment of a resource allocation apparatus according to the present disclosure;

FIG. 10 is a block diagram illustrating an embodiment of a rule configuration module of the resource configuration apparatus of the present disclosure;

FIG. 11 is a block diagram illustrating another embodiment of a rule configuration module of the resource configuration apparatus according to the present disclosure;

FIG. 12 is a block diagram illustrating a rule configuration module according to another embodiment of the resource configuration apparatus of the present disclosure;

FIG. 13 is a block diagram illustrating a rule configuration module according to yet another embodiment of the resource configuration apparatus of the present disclosure;

FIG. 14 is a block diagram illustrating another embodiment of a resource allocation apparatus according to the present disclosure;

fig. 15 is a block diagram illustrating a resource allocation apparatus according to another embodiment of the disclosure.

Detailed Description

Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise. It is to be understood that the described embodiments are merely illustrative of some, and not restrictive, of the embodiments of the disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.

The terms "first", "second", and the like are used hereinafter only for descriptive distinction and not for other specific meanings.

Fig. 1 is a schematic flowchart of a resource allocation method according to an embodiment of the present disclosure, as shown in fig. 1:

step 101, creating an automatic deployment resource.

Automated deployment resources may be created in a variety of application scenarios. For example, if the child resource creation or the configuration of the attribute of the target resource is required, the application layer creates the automatic deployment resource and sends the automatic deployment resource to the service layer, so as to deploy the automatic deployment resource in the service layer and execute the corresponding operation. For example, the resource configuration device running in the application layer may create the automatic deployment resource according to the received creation instruction, where the creation instruction may be sent by a user or sent by a resource that needs to perform a corresponding operation.

And 102, storing the configuration rule information corresponding to the target resource in the automatic deployment resource so that the automatic deployment resource automatically configures the target resource according to the configuration rule information.

The resources include: application Entity (AE), container, software, etc. in each device and sensor. The configuration rule information may include a plurality of information, for example, target resource matching information, attribute configuration information, sub-resource configuration information, configuration validation condition information, and the like, where the target resource matching information, the attribute configuration information, the sub-resource configuration information, the configuration validation condition information, and the like respectively include at least one attribute value.

The target resource matching information, the attribute configuration information, the sub-resource configuration information, the configuration validation condition information, and the like are stored in the automatic deployment resource. Configuring the target resource includes adding, deleting, modifying and the like to the attribute and the sub-resource of the target resource.

In one embodiment, the application layer receives configuration rule information and stores the configuration in the automated deployment resource. For example, an automatic deployment resource creation request is received, the automatic deployment resource creation request carries configuration rule information corresponding to a target resource, the configuration rule information is extracted from the automatic deployment resource creation request, and the configuration rule information is stored in the automatic deployment resource. Or the application layer sets the configuration rule information and stores the configuration in the automatic deployment resource. For example, after the automatic deployment resource is created, configuration rule information corresponding to the target resource is set and stored in the automatic deployment resource.

The Internet of things can be divided into a sensing layer, a network layer, a service layer and an application layer; the sensing layer is composed of various sensors, including sensing terminals such as an infrared sensor, an electronic tag, a card reader and an inductor, and is a source for identifying objects and acquiring information of the Internet of things; the network layer consists of various networks including the Internet, a broadcast and television network, a network management system, a cloud computing platform and the like and is responsible for transmitting and processing information acquired by the sensing layer; a large amount of information generated by the sensing layer is transmitted and converged to the service layer through the network layer, and the service layer effectively integrates and utilizes the collected information. The application layer is an interface of the Internet of things and a user, and is combined with industrial requirements to realize intelligent application of the Internet of things.

In one embodiment, the automatic deployment resource is generated and the configuration rule information is set in the application layer, and after the configuration rule information is stored in the automatic deployment resource, the application layer sends the automatic deployment resource to the service layer so as to deploy the automatic deployment resource in the service layer. The target resource includes a resource that may have been created prior to the automatically deploying resource deployment or a resource that was newly created after the automatically deploying resource deployment.

In one embodiment, when creating the automatic deployment resource, generating a self attribute of the automatic deployment resource and storing the self attribute in the automatic deployment resource, wherein an attribute value of the self attribute is used for identifying attribute information, state information and the like of the automatic deployment resource. The self-attribute of the automatically deployed resource can be multiple, for example, the resource type, the resource ID, the resource name, the resource expiration time, the resource creation time, the resource last modification time, the declaration object of the resource, the declaration attribute of the resource, and the like. When creating the automatic deployment resource, a plurality of attributes may be selected and attribute values may be set, for example, the resource type is set to 100 (representing that the resource type is the automatic deployment resource type), the resource ID is set to 12333, the resource name is autodeployment 1, the resource expiration time is 20181020, the resource creation time 20180705, and the resource last modification time is 20180802.

In one embodiment, the generated configuration rule information includes: target resource matching information, attribute configuration information, sub-resource configuration information, configuration validation condition information, and the like. Fig. 2 is a schematic flowchart of setting target resource matching information in an embodiment of the resource configuration method of the present disclosure, as shown in fig. 2:

step 201 obtains resource characteristic information corresponding to the target resource.

The resource characteristic information comprises target resource type information; the target resource types may be various, such as software, containers, application entities, and the like. The resource feature information may also include information such as a target resource tag, a target resource creator, and the like, where the target resource tag may be a target resource ID, and the like.

Step 202, generating target resource matching information based on the resource characteristic information, so that the automatic deployment resource determines the target resource according to the target resource matching information.

The application layer can set a target resource type attribute, a target resource label attribute and a target resource creator attribute according to the target resource type information, the target resource label information and the target resource creator information, wherein attribute values of the target resource type attribute, the target resource label attribute and the target resource creator attribute are respectively used for representing the target resource type, the target resource label and the target resource creator information, and the target resource label attribute and the target resource creator attribute are selectable.

The target resource matching information may only include the attribute value of the target resource type attribute, or may include the attribute values of the target resource type attribute, the target resource tag attribute, and the target resource creator attribute. The application layer may also establish a data block, where the data block is a group of records that are sequentially and continuously arranged together, and the data block may store only the attribute value of the target resource type attribute, or may store the attribute values of the target resource type attribute, the target resource tag attribute, and the target resource creator attribute. The target resource matching information includes this data block.

And the automatic deployment resource determines the target resource according to the target matching information. For example, if the attribute value of the attribute of the target resource type obtained by the automatic deployment resource is "container", the resource of the container type is taken as the target resource. The configuration rule information also comprises an attribute value of the filtering use attribute, if the attribute value of the filtering use attribute is characterized as matched filtering, the automatic deployment resource determines the target resource according to the target matching information, and if the attribute value of the filtering use attribute is characterized as unmatched filtering, the automatic deployment resource determines all the resources as the target resource.

In an embodiment, fig. 3 is a schematic flowchart of setting attribute configuration information in an embodiment of a resource configuration method of the present disclosure, as shown in fig. 3:

step 301, obtaining attribute information to be configured corresponding to the target resource.

The application layer can send a request message to the service layer for obtaining the attribute information of the target resource needing to be configured, and the service layer inquires the attribute information of the target resource needing to be configured and returns the attribute information to the application layer. The attribute to be configured for the target resource may be various, for example, an attribute of an access control policy identifier (accesscontrol policyids), an attribute of an access website, and the like. The attribute information may include deployment attribute name information and deployment attribute value information. For example, the deployment attribute name is a download access website, and the deployment attribute value is a download address of the new patch software.

Step 302, generating attribute configuration information based on the attribute information to be configured, so that the automatic deployment resource configures the corresponding attribute of the target resource according to the attribute configuration information.

The application layer may set a deployment attribute name attribute and a deployment attribute value attribute, where attribute values of the deployment attribute name attribute and the deployment attribute value attribute represent deployment attribute name information and deployment attribute value information, respectively. The attribute configuration information includes attribute values of a deployment attribute name attribute and a deployment attribute value attribute, and the like.

The application layer can set a deployment operation attribute and a deployment object attribute, wherein an attribute value of the deployment operation attribute is used for characterizing the type of the configuration operation, and the type of the configuration operation comprises the following steps: create, modify, delete, etc. For example, if the attribute value of the deployment operation attribute is C, the type of the configuration operation is the type of the setup operation; if the attribute value of the deployment operation attribute is U, configuring the type of the operation as a modification operation type; and if the attribute value of the attribute of the deployment operation is D, the type of the configuration operation is a deletion operation type. The attribute values of the deployment object attributes are used to characterize the configuration operands, which include attributes, sub-resources, and the like. For example, if the attribute value of the deployment object attribute is A, the operation object is configured as the attribute; and if the attribute value of the attribute of the deployment object is B, configuring the operation object as a child resource. The configuration rule information contains attribute values of the deployment operation attribute and the deployment object attribute.

And automatically deploying the resource to obtain attribute configuration information for configuring the corresponding attribute of the target resource. For example, the automatic deployment resource obtains the attribute value of the deployment attribute name attribute as a download access website, and obtains the attribute value of the deployment attribute value attribute as a download address of the new patch software. The automatic deployment resource can send an attribute modification message carrying the attribute values of the deployment attribute name attribute and the deployment attribute value attribute to the target resource, so as to modify the attribute of the target object, and the target resource modifies the own attribute value of the download access website into the download address of the new patch software.

In an embodiment, fig. 4 is a schematic flowchart of setting sub-resource configuration information in an embodiment of a resource configuration method of the present disclosure, as shown in fig. 4:

step 401, obtaining sub-resource information to be configured corresponding to a target resource;

the application layer can send a request message to the service layer for acquiring the sub-resource information required to be established by the target resource, and the service layer inquires the sub-resource information required to be established by the target resource and returns the sub-resource information to the application layer. The sub-resource information established by the target resource may be an ID list of the sub-resources that the target resource needs to add, and the like.

Step 402, generating sub-resource configuration information based on the sub-resource information to be configured, so that the automatic deployment resource configures the corresponding sub-resource of the target resource according to the sub-resource configuration information. The application layer may set a deployment resource identifier attribute, and an attribute value of the deployment resource attribute is used to represent child resource information established by the target resource. The sub-resource configuration information includes an attribute value of a deployment resource identification attribute.

And automatically deploying the resource to acquire the sub-resource configuration information, and configuring the corresponding sub-resource of the target resource, including establishing, modifying, deleting and the like. For example, the automatic deployment resource determines that the corresponding child resource of the target resource needs to be created according to the attribute values of the deployment operation attribute and the deployment object attribute. The automatic deployment resource obtains the attribute value of the deployment resource identification attribute, namely, the ID list of the child resource which needs to be added by the target resource is obtained. And the automatic deployment resource determines the sub-resource corresponding to the ID list of the sub-resource, creates or obtains the corresponding sub-resource, and adds the corresponding sub-resource under the target resource. For example, the target resource is a main control platform of the vegetable greenhouse, the automatically deployed resource obtains an ID list of sub-resources required to be added by the main control platform, only one sub-resource ID number exists in the ID list, the sub-resource corresponding to the sub-resource ID number is an air-conditioning control assembly, the automatically deployed resource can create the air-conditioning control assembly, a notification message is sent to the air-conditioning control assembly and the main control platform after the creation, the main control platform and the air-conditioning control assembly perform information interaction, and finally the air-conditioning control assembly is added under the main control platform.

In an embodiment, fig. 5 is a schematic flowchart illustrating a process of setting configuration validation condition information in an embodiment of the resource configuration method of the present disclosure, as shown in fig. 5:

step 501, determining a configuration validation decision rule based on a configuration policy corresponding to a target resource.

The application layer may send a request message to the service layer for obtaining the configuration policy corresponding to the target resource, and the service layer queries the configuration policy corresponding to the target resource and returns the configuration policy to the application layer. The application layer configures an effect decision rule based on a configuration policy corresponding to the target resource, and the effect decision attribute may be a time effect decision rule or the like.

For example, the target resource is a main control platform of the vegetable greenhouse, the application layer sends a request message to the service layer for acquiring the configuration strategy corresponding to the main control platform, and the service layer inquires the configuration strategy corresponding to the main control platform and returns the configuration strategy to the application layer. The configuration strategy of the master control platform is that at night 21: 00-23: 00, setting a configuration validation decision rule as that the resources are automatically deployed at 21 nights each day: 00-23: 00 is effective.

Step 502, generating configuration validation condition information based on the configuration validation decision rule, so that the automatic deployment resource determines whether to automatically configure the target resource according to the configuration validation condition information.

The application layer can set an effective time attribute, wherein the effective time attribute comprises a first time attribute for identifying that the effective time takes effect before the set time and a second time attribute for identifying that the effective time takes effect after the set time, and the first time attribute and the second time attribute can identify and configure an effective decision rule. The first time attribute and the second time attribute may be both set, or one of them may be selected for configuration.

For example, the configuration validation condition information includes attribute values of a first time attribute and a second time attribute, the second time attribute value being set to 21: 00, the first time attribute value is set to 23: 00. the automatic deployment resource obtains attribute values of the first time attribute and the second time attribute, and determines that the self is 21: 00-23: 00, then at 21: 00-23: 00 the master control platform is configured.

In one embodiment, a record attribute is provided in the automatic deployment resource, and is used to record history information of the automatic deployment resource for creating the child resource for the target resource or configuring the attribute of the target resource, where the history information includes a target resource list configured by the automatic deployment resource, and the like.

As shown in fig. 6, the resource types of the resource 61, the resource 63, and the resource 64 are all container types, and the resource type of the resource 62 is an application entity type. The application layer creates auto-deploy resources 65 and auto-deploy resources 66 and sends them to the service layer for deployment.

The attribute value of the deployment operation attribute in the configuration rule information stored in the automatic deployment resource 65 is C, and the attribute value of the deployment object attribute is a. The configuration rule information in the configuration rule information stored in the automatic deployment resource 65 only includes a target resource type attribute, and the target resource type is identified as a container type by the target resource type attribute value; the attribute configuration information in the configuration rule information stored in the automatic deployment resource 65 includes a deployment attribute name attribute and a deployment attribute value attribute, the attribute value of the deployment attribute name attribute identifies that the deployment attribute name is an access control policy attribute, and the attribute value of the deployment attribute value attribute is a first access control policy attribute value.

For example, when it is determined that a suspected attacker a crawls data of the internet of things to obtain the data, in order to protect data security, all container resources in the internet of things need to be protected temporarily, and an access control policy for a user a corresponding to the container resources is established, where the access control policy includes: if the resource acquisition request initiated by A is received, it is shielded. This access control policy corresponds to a first access control policy attribute value.

The attribute value of the deployment operation attribute in the configuration rule information stored in the automatic deployment resource 66 is C, and the attribute value of the deployment object attribute is a. The configuration rule information in the configuration rule information stored in the automatic deployment resource 65 only includes a target resource type attribute, and the resource value of the target resource type attribute identifies that the target resource type is an application entity type; the attribute configuration information in the configuration rule information stored in the automatic deployment resource 65 includes a deployment attribute name attribute and a deployment attribute value attribute, the attribute value of the deployment attribute name attribute is identified as a deployment attribute name access control policy attribute, and the attribute value of the deployment attribute value attribute is a second access control policy attribute value.

Auto-deployment resource 65 and auto-deployment resource 66 are configured automatically after deployment at the service layer. The auto-deployment resource 65 adds a first access control policy attribute value to the access control policy identifications (accesscontrol policyids) of the resource 61, the resource 63, and the resource 64, respectively, and the auto-deployment resource 66 adds a second access control policy attribute value to the access control policy identifications of the resource 62.

In one embodiment, as shown in FIG. 7A, the resource types of both resources 71, 72 are software types. The application layer creates the auto-deploy resources 73 and deploys at the service layer. The resource 71 and the resource 72 are both provided with a download access website attribute, the attribute value of the download access website attribute is a website, and the resource 71 and the resource 72 download programs based on the attribute value of the download access website attribute.

The attribute value of the deployment operation attribute in the configuration rule information stored in the automatic deployment resource 73 is U (the type of the configuration operation is the modification operation type), and the attribute value of the deployment object attribute is a (the configuration operation object is an attribute). Target resource matching information in the configuration rule information stored in the automatic deployment resource 73 only contains a target resource type attribute, and the attribute value of the target resource type attribute identifies the deployment attribute name as a software type; the attribute configuration information in the configuration rule information stored in the automatic deployment resource 73 includes a deployment attribute name attribute and a deployment attribute value attribute, the attribute value of the deployment attribute name attribute identifies that the deployment attribute name is a download access website, and the attribute value of the deployment attribute value attribute is a download address of the new patch software.

The auto-deployment resource 73 is configured automatically after deployment at the service layer. The automatic deployment resource 73 modifies the attribute values of the download access website attributes of the resources 71 and 72 into the download addresses of the new patch software, and the resources 71 and 72 download the patches based on the download addresses of the new patch software for upgrading.

Automated deployment resource 73 monitors the resource. The resource 74 is newly created, and the resource type of the resource 74 is a software type. Automatic deployment resource 73 automatically configures resource 74 upon listening that resource 74 is running. The automatic deployment resource 73 modifies the attribute of the download access website of the resource 74 into the download address of the new patch software, and the resource 74 downloads the patch through the download address of the new patch software for upgrading. When software viruses are outbreak and the like, uniform patch upgrading needs to be carried out on the software, and the patching operation is carried out through the automatic deployment resource 73, so that the interaction times of a service layer and an application layer can be reduced, and the difficulty of patch upgrading is reduced.

In one embodiment, as shown in fig. 8A, the resource types of the resource 82 and the resource 83 are both container types, and the resource type of the resource 81 is an application entity type. As shown in fig. 8B, the application layer may send a request message to the service layer, where the request message is used to obtain the sub-resource information that needs to be established for the resource 82 and the resource 83, and the service layer queries the sub-resource information that needs to be established for the target resource and returns the information to the application layer.

The application layer creates the auto-deploy resources 87 and deploys at the service layer. The attribute value of the deployment operation attribute in the configuration rule information stored in the automatic deployment resource 87 is C (the type of the configuration operation is the set-up operation type), and the attribute value of the deployment object attribute is B (the configuration operation object is a child resource). The configuration rule information in the configuration rule information stored in the automatic deployment resource 87 includes a target resource type attribute, and an attribute value of the target resource type attribute is identified as a target resource type container type; the sub-resource information in the configuration rule information stored in the automatic deployment resource 87 includes a deployment resource attribute, and the attribute value of the deployment resource attribute is an ID list of the sub-resource that needs to be added. The auto-deployment resource 87 is automatically configured after deployment at the service layer. Determining a sub-resource corresponding to the ID list of the sub-resource that needs to be added by the target resource, and creating a resource 85 and a resource 86, where the resource 85 and the resource 86 may be multiple resources, such as application entities, and the resource 85 and the resource 86 are added under the resource 82 and the resource 83, respectively.

According to the resource configuration method in the embodiment, the automatic deployment resource is created to create the sub-resource for the target resource or configure the attribute of the target resource, so that data interaction between an application layer and a service layer is reduced, data interaction pressure between the application layer and the service layer is reduced, consumption of bandwidth resources between the application layer and the service layer is reduced, consumption of computing resources of the application layer and the service layer is reduced, and efficiency of creating the sub-resource for the target resource or configuring the attribute of the target resource is improved; in addition, the application layer performs relatively complex logic operation, and the service layer performs relatively simple logic operation, so that the method conforms to the architecture design.

In one embodiment, as shown in fig. 9, the present disclosure provides a resource configuration apparatus 90, including: a resource creation module 91, a rule configuration module 92. The resource creation module 91 creates an automatic deployment resource. The rule configuration module 92 stores the configuration rule information corresponding to the target resource in the automatic deployment resource, so that the automatic deployment resource performs automatic configuration on the target resource according to the configuration rule information. The rule configuration module 92 receives configuration rule information and stores the configuration in the automatic deployment resource; alternatively, the rule configuration module 92 sets configuration rule information and stores the configuration in the automated deployment resource.

In one embodiment, the configuration rule information includes target resource matching information. As shown in fig. 10, the rule configuration module 92 includes: a target resource information obtaining unit 921 and a target matching information setting unit 922. The target resource information obtaining unit 921 obtains resource feature information corresponding to the target resource. The target matching information setting unit 922 generates target resource matching information based on the resource feature information, so that the automatic deployment resource determines a target resource according to the target matching information.

In one embodiment, the configuration rule information includes attribute configuration information. As shown in fig. 11, the rule configuration module 92 includes: a target attribute information obtaining unit 923, and an attribute configuration information setting unit 924. The target attribute information obtaining unit 923 obtains attribute information to be configured corresponding to the target resource. The attribute configuration information setting unit 924 generates attribute configuration information based on the attribute information to be configured, so that the automatic deployment resource configures the corresponding attribute of the target resource according to the attribute configuration information.

In one embodiment, the configuration rule information includes sub-resource configuration information. As shown in fig. 12, the rule configuration module 92 includes: a sub-resource information obtaining unit 925, and a sub-resource configuration information setting unit 926. The sub-resource information obtaining unit 925 obtains sub-resource information to be configured corresponding to the target resource. The sub-resource configuration information setting unit 926 generates sub-resource configuration information based on the sub-resource information to be configured, so that the automatic deployment resource configures the corresponding sub-resource of the target resource according to the sub-resource configuration information.

In one embodiment, the configuration rule information includes configuration validation condition information. As shown in fig. 13, the rule configuration module 92 includes: an effect attribute obtaining unit 927 and an effect condition setting unit 928. The validation attribute obtaining unit 927 determines a configuration validation decision rule based on the configuration policy corresponding to the target resource. The validation condition setting unit 928 generates configuration validation condition information based on the configuration validation decision rule so that the automatic deployment resource determines whether to automatically configure the target resource according to the configuration validation condition information.

In one embodiment, as shown in fig. 14, the resource configuring apparatus further includes a resource creating module 91. The resource creation module 94 generates the automated deployment resources in the application layer. The rule configuration module 92 sets a configuration rule message in the application layer, and the resource deployment module 93 sends the automatic deployment resource to the service layer after the rule configuration module 92 stores the configuration rule message in the automatic deployment resource, so as to deploy the automatic deployment resource in the service layer.

In one embodiment, as shown in fig. 15, a resource configuration apparatus is provided, which may include a memory 151 and a processor 152, the memory 151 is used for storing instructions, the processor 152 is coupled to the memory 151, and the processor 152 is configured to execute a resource configuration method implementing any of the above embodiments based on the instructions stored in the memory 151.

The resource allocation apparatus further includes a communication interface 153 for information interaction with other devices. Meanwhile, the device further comprises a bus 154, and the processor 152, the communication interface 153 and the memory 151 are communicated with each other through the bus 154.

The memory 151 may comprise a high-speed Random Access Memory (RAM) memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 151 may also be a memory array. The storage 151 may also be partitioned into blocks, and the blocks may be combined into virtual volumes according to certain rules.

Processor 152 may be a central processing unit CPU or may be an application specific integrated circuit ASIC or one or more integrated circuits configured to implement embodiments of the present disclosure.

In one embodiment, the present disclosure provides a computer-readable storage medium storing computer instructions that, when executed by a processor, implement a resource configuration method as in any of the above embodiments.

According to the resource configuration method, the resource configuration device and the storage medium in the embodiments, the sub-resource creation of the target resource or the configuration of the attribute of the target resource is performed by creating the automatic deployment resource, so that the consumption of the bandwidth resource between the application layer and the service layer is reduced, the consumption of the computing resource of the application layer and the service layer is reduced, the configuration is simple and convenient, the efficiency of creating the sub-resource of the target resource or configuring the attribute of the target resource is improved, the operation cost is reduced, and the use experience of a user is improved.

The method and system of the present disclosure may be implemented in a number of ways. For example, the methods and systems of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order for the steps of the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above unless specifically stated otherwise. Further, in some embodiments, the present disclosure may also be embodied as programs recorded in a recording medium, the programs including machine-readable instructions for implementing the methods according to the present disclosure. Thus, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.

The description of the present disclosure has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the disclosure in the form disclosed. Many modifications and variations will be apparent to practitioners skilled in this art. The embodiment was chosen and described in order to best explain the principles of the disclosure and the practical application, and to enable others of ordinary skill in the art to understand the disclosure for various embodiments with various modifications as are suited to the particular use contemplated.

21页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:设备配置方法、装置、电子设备和存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类