Resource control method, device, electronic device and storage medium

By deploying smart contracts in the blockchain system, determining the resource owner and restricting the modification permissions, network failure problems caused by business components to arbitrarily modifying the resource key attribute information, and achieving the immutability of resource attribute information and network stability.

CN119210686BActive Publication Date: 2025-02-25NEW H3C TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411686224.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-22
Publication Date
2025-02-25
Estimated Expiration
2044-11-22

AI Technical Summary

Technical Problem

Network operation failures caused by business components arbitrarily modifying the key attribute information of resources, causing catastrophic losses to users.

Method used

Deploy smart contracts in the blockchain system, query resource attribute information through the first smart contract, determine resource owners in the second smart contract, determine resource owner rights in the third smart contract, determine resource owner rights in the fourth smart contract, allocate resource identifiers, and the fifth smart contract The contract increases the resource reference relationship, the sixth smart contract deletes the resource reference relationship, and the seventh smart contract disables the resource to ensure that only one owner of the resource can the owner have the right to modify the resource attribute information.

Benefits of technology

It realizes the immutability of resource attribute information, prevents business components from modifying resource key attribute information at will, and avoids network operation failures and user losses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a resource control method, device, electronic device and storage medium, which relates to the field of communication technology and is applied to a management platform in a management area cluster, each management area is a node in a blockchain system, and the method includes: receiving a resource application instruction sent by a first business component in the management area cluster, the resource application instruction includes a first address and a first input parameter; calling a first smart contract, and returning a first identifier corresponding to the first input parameter to the first business component when the first input parameter is queried in the database; calling a second smart contract, and determining the owner of the first resource from the first business component and the second business component as the current owner according to the priority of the business component. This solution can solve the problem of network operation failure caused by the business component arbitrarily modifying the key attribute information of the resource, which brings catastrophic losses to users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a resource control method, device, electronic device and storage medium. Background Art

[0002] Many large enterprises divide their networks into multiple management areas. The management station of each management area includes multiple business components. Different business components can manage the same or different resources. When a resource is managed by multiple business components, these multiple business components can modify the resource's name, Internet Protocol (IP) address, Media Access Control (MAC) address, serial number (SN), affiliated organization and other attribute information.

[0003] If the key attribute information of a resource is modified by a business component, other business components that originally managed the resource will no longer be able to manage the resource. If other business components are components that implement important functions, such as control components, it will cause network operation failures and bring catastrophic losses to users. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a resource control method, device, electronic device and storage medium to solve the problem that the network operation failure is caused by the service component arbitrarily modifying the key attribute information of the resource, which brings catastrophic losses to the user. The specific technical solution is as follows:

[0005] In a first aspect, an embodiment of the present application provides a resource control method, which is applied to a management platform in a management area cluster, wherein each management area in the management area cluster is a node in a blockchain system, and the method includes:

[0006] Receive a resource application instruction sent by a first business component in a management area cluster, wherein the resource application instruction includes a first address and a first input parameter of the first business component, wherein the first input parameter includes part or all of attribute information of a first resource in the management area cluster;

[0007] calling a first smart contract deployed in the blockchain system to query the first input parameter in a database, and if the first input parameter is found, returning a first identifier corresponding to the first input parameter in the database to the first business component according to the first address, so that the first business component controls the first resource according to the first identifier, wherein the database stores a correspondence between attribute information of the resource and the identifier;

[0008] A second smart contract deployed in the blockchain system is called to determine the owner of the first resource from the first business component and the second business component according to the priority of the first business component and the priority of the second business component, the second business component being the current owner of the first resource, and the owner of the first resource having the authority to modify the attribute information of the first resource.

[0009] In some embodiments, the step of determining the owner of the first resource from the first business component and the second business component according to the priority of the first business component and the priority of the second business component includes:

[0010] When the priority of the first service component is lower than the priority of the second service component, keep the second service component as the owner of the first resource;

[0011] When the priority of the first service component is greater than or equal to the priority of the second service component, the first service component is modified to be the owner of the first resource.

[0012] In some embodiments, the method further comprises:

[0013] receiving a resource modification instruction sent by the first service component, wherein the resource modification instruction includes the first address, the first identifier, and a second input parameter, wherein the second input parameter includes part or all of the attribute information of the first resource;

[0014] Calling a third smart contract deployed in the blockchain system to determine whether the first business component is the owner of the first resource according to the first address and the first identifier; if it is determined that the first business component is the owner of the first resource, modifying the attribute information of the first resource according to the second input parameter; if it is determined that the first business component is not the owner of the first resource, prohibiting modification of the attribute information of the first resource.

[0015] In some embodiments, the method further comprises:

[0016] When calling the first smart contract, if the first input parameter is not found in the database, calling the fourth smart contract deployed in the blockchain system to assign the first identifier to the first resource, returning the first identifier to the first business component according to the first address, storing the correspondence between the attribute information of the first resource and the first identifier in the database, and taking the first business component as the owner of the first resource.

[0017] In some embodiments, the method further comprises:

[0018] After returning the first identifier to the first business component, a fifth smart contract deployed in the blockchain system is called to add a corresponding relationship between the first identifier and the first address in the database.

[0019] In some embodiments, the method further comprises:

[0020] receiving a resource deletion instruction sent by the first service component, wherein the resource deletion instruction includes the first address and the first identifier;

[0021] Calling a sixth smart contract deployed in the blockchain system to delete the correspondence between the first identifier and the first address, and obtaining the number of remaining business components applying for the first resource;

[0022] When the number of the business components is 0, a seventh smart contract deployed in the blockchain system is called to disable the first resource corresponding to the first identifier.

[0023] In a second aspect, an embodiment of the present application provides a resource control device, which is applied to a management platform in a management area cluster, wherein each management area in the management area cluster is a node in a blockchain system, and the device includes:

[0024] A receiving module, configured to receive a resource application instruction sent by a first business component in a management area cluster, wherein the resource application instruction includes a first address and a first input parameter of the first business component, wherein the first input parameter includes part or all of attribute information of a first resource in the management area cluster;

[0025] A calling module, configured to call a first smart contract deployed in the blockchain system to query the first input parameter in a database, and if the first input parameter is found, return a first identifier corresponding to the first input parameter in the database to the first business component according to the first address, so that the first business component controls the first resource according to the first identifier, wherein the database stores a correspondence between attribute information of the resource and the identifier;

[0026] The calling module is also used to call a second smart contract deployed in the blockchain system to determine the owner of the first resource from the first business component and the second business component according to the priority of the first business component and the priority of the second business component, the second business component is the current owner of the first resource, and the owner of the first resource has the authority to modify the attribute information of the first resource.

[0027] In some embodiments, the calling module is specifically used to:

[0028] When the priority of the first business component is lower than that of the second business component, the second business component is maintained as the owner of the first resource; when the priority of the first business component is greater than or equal to that of the second business component, the first business component is modified to be the owner of the first resource.

[0029] In some embodiments, the receiving module is further used to receive a resource modification instruction sent by the first business component, the resource modification instruction includes the first address, the first identifier and a second input parameter, and the second input parameter includes part or all of the attribute information of the first resource;

[0030] The calling module is also used to call a third smart contract deployed in the blockchain system to determine whether the first business component is the owner of the first resource based on the first address and the first identifier; if it is determined that the first business component is the owner of the first resource, modify the attribute information of the first resource according to the second input parameter; if it is determined that the first business component is not the owner of the first resource, prohibit modifying the attribute information of the first resource.

[0031] In some embodiments, the calling module is also used to call the fourth smart contract deployed in the blockchain system when calling the first smart contract and the first input parameter is not found in the database, so as to assign the first identifier to the first resource, return the first identifier to the first business component according to the first address, store the correspondence between the attribute information of the first resource and the first identifier in the database, and regard the first business component as the owner of the first resource.

[0032] In some embodiments, the calling module is further used to call a fifth smart contract deployed in the blockchain system after returning the first identifier to the first business component, so as to add a corresponding relationship between the first identifier and the first address in the database.

[0033] In some embodiments, the receiving module is further used to receive a resource deletion instruction sent by the first service component, where the resource deletion instruction includes the first address and the first identifier;

[0034] The calling module is also used to call a sixth smart contract deployed in the blockchain system to delete the correspondence between the first identifier and the first address, and obtain the remaining number of business components that apply for the first resource; when the number of business components is 0, call a seventh smart contract deployed in the blockchain system to disable the first resource corresponding to the first identifier.

[0035] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the processor is prompted by the machine-executable instructions to implement any of the above-mentioned resource control methods.

[0036] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any of the above-mentioned resource control methods is implemented.

[0037] In a fifth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute any of the above-mentioned resource control methods.

[0038] Beneficial effects of the embodiments of the present application:

[0039] In the technical solution provided by the embodiment of the present application, a smart contract for managing resources is deployed in the blockchain system, such as a first smart contract for verifying the existence of resources and a second smart contract for transferring resource owners. The first smart contract and the second smart contract are used to realize that there is only one owner of a resource, and the owner has the authority to modify the attribute information of the resource, and other non-owners do not have the authority to modify the attribute information of the resource. Since the smart contracts deployed in the blockchain system are automatically executed, and the execution process cannot be tampered with, therefore, based on the smart contract, it is possible to set the component that implements important functions as the owner of the resource, and the component that implements important functions can modify the attribute information of the resource, and other non-owners cannot break through the business logic barrier and forcibly modify the attribute information of the resource, which ensures the non-tamperability of the entire link, and then realizes the non-tamperability of the attribute information of the resource, and solves the problem that the network operation failure is caused by the business component arbitrarily modifying the key attribute information of the resource, which brings catastrophic losses to users.

[0040] Of course, implementing any product or method of the present application does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.

[0042] Figure 1 A network architecture diagram for managing regional clusters;

[0043] Figure 2A schematic diagram of the basic architecture of the blockchain system;

[0044] Figure 3 A schematic diagram of a first flow chart of a resource control method provided in an embodiment of the present application;

[0045] Figure 4 A schematic diagram of the networking of the management area cluster provided in an embodiment of the present application;

[0046] Figure 5 A schematic diagram of a blockchain provided in an embodiment of the present application;

[0047] Figure 6 A second flow chart of the resource control method provided in the embodiment of the present application;

[0048] Figure 7 A third flow chart of the resource control method provided in the embodiment of the present application;

[0049] Figure 8 A fourth flow chart of the resource control method provided in the embodiment of the present application;

[0050] Fig. 9 A fifth flow chart of the resource control method provided in the embodiment of the present application;

[0051] Fig.10 A schematic diagram of the overall technical architecture of the user resource authority control system provided in the embodiment of the present application;

[0052] Fig.11 A method flow chart of a user resource authority control system provided in an embodiment of the present application;

[0053] Fig.12 A schematic diagram of a control resource flow of a control architecture provided in an embodiment of the present application;

[0054] Fig.13 A schematic diagram of a process for a monitoring component to apply for resources provided in an embodiment of the present application;

[0055] Fig.14 A schematic diagram of a structure of a resource control device provided in an embodiment of the present application;

[0056] Fig.15 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0057] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field based on the present application belong to the scope of protection of the present application.

[0058] To facilitate understanding, the terms appearing in the embodiments of the present application are explained below.

[0059] Management area (Region): A physical or logical management scope divided in some way. A management area can be a local area network, data center, data center branch, etc. Figure 1 In the network shown, each cloud area represents a management area, namely LAN 1 to LAN N.

[0060] Management station: A software system that manages network devices or applications in the management area. Figure 1 In the figure, each dotted rectangle represents a management station. The management station includes one or more business components such as campus controller, data center (DC) controller, software-defined wide area network (SD-WAN) controller, application-driven wide area network (AD-WAN) controller, network management server, input / output management (IOM) component, Eagle Vision endpoint detection system (EPS) component, environmental impact assessment (EIA) certification component, analysis component, etc. The network elements managed by the management station may include: Figure 1 Information Technology / Communication Technology (IT / CT) resources such as routers, switches, firewalls, servers, and access points (APs) are shown.

[0061] If one management station manages one or more management stations among multiple management stations, the management station responsible for management is the primary management station. Figure 1 The management station 1 in LAN 1 is the management station 1 in the LAN 1; the managed management station is the sub-management station, such as Figure 1 Management station 2 in LAN 2 ~ management station N in LAN N. The main management station and one or more sub-management stations form a superior-subordinate relationship.

[0062] Blockchain: A decentralized distributed ledger that is stored in a block chain, cannot be tampered with, and is secure and reliable. In a blockchain, transaction information is linked together in the form of blocks, and the consistency of this distributed ledger is jointly maintained and verified by multiple blockchain nodes in the network. The infrastructure of the blockchain system is as follows: Figure 2 As shown, it includes three major layers and six sub-layers. The three major layers include the basic network layer, the intermediate protocol layer and the application service layer. The six sub-layers include the data layer and network layer under the basic network layer, the consensus layer, the incentive layer and the contract layer under the intermediate protocol layer, and the application layer under the application service layer.

[0063] The data layer is used to describe the physical form of blockchain technology. It is the data structure of the ledger and describes what parts the blockchain system is composed of, such as Figure 2 Data blocks, chain structures, hash functions, asymmetric encryption, Merkle trees, and timestamps.

[0064] The network layer is used to realize information exchange between blockchain nodes in the blockchain network and to realize the decentralization of blockchain nodes. The blockchain network is essentially a peer-to-peer (P2P) network, which is an Internet system without a central server and relies on user groups to exchange information. In the blockchain network, blockchain nodes interact with each other using designated propagation mechanisms and verification mechanisms to create new blocks.

[0065] The consensus layer is responsible for allocating the task load of blockchain nodes, allowing highly distributed blockchain nodes to efficiently reach consensus on the validity of block data in a decentralized system. The more commonly used consensus mechanisms in blockchain systems include Proof-of-Work (PoW), Proof of Stake (PoS), and Delegated Proof of Stake (DPoS).

[0066] The incentive layer is used to formulate the "remuneration system" of blockchain nodes, provide certain incentives, and encourage blockchain nodes to participate in the security verification of blockchain. The incentive layer's reward mechanism includes two types: issuance mechanism and distribution mechanism.

[0067] The contract layer includes various script codes, algorithm mechanisms, and smart contracts, which give the ledger programmable features.

[0068] The application layer is the driving force for sustainable development. The application layer encapsulates various application scenarios and cases of blockchain, such as Figure 2 The three blockchain applications shown in are programmable currency, programmable finance, and programmable society.

[0069] Due to factors such as network security isolation, cluster management performance scalability, and geographical location across regions, many large enterprises divide their networks into multiple management areas. Each management area deploys a management station, which can deploy one or more management components, one or more control components, one or more analysis components, and other business components. Each business component can manage and apply for resources. In actual applications, different business components can manage the same or different resources.

[0070] When a resource is managed by multiple business components, these multiple business components can modify the resource's name, Internet Protocol (IP) address, Media Access Control (MAC) address, Serial Number (SN), affiliated organization and other attribute information. If the key attribute information of a resource is modified by a business component, the other business components that originally managed the resource will no longer be able to manage the resource. If the other business components are components that implement important functions, such as control components, it will cause network operation failures and bring catastrophic losses to users.

[0071] For example, when control components and non-control components apply for the same resource, the management platform unifies the resource by referencing the resource, so that the control components and non-control components can manage the same resource. The non-control component modifies the attribute information of the resource. Since the attribute information of the resource has been modified, the control component will no longer be able to manage the resource. The control component directly affects the interoperability of business traffic. If the control component can no longer manage the resource, it will cause serious problems such as business traffic on the entire network being blocked and the user's newly purchased network equipment being unable to be managed by the control component. This will undoubtedly bring catastrophic losses to the user.

[0072] To solve the above problems, the present application provides a resource control method, such as Figure 3 As shown, a management platform is applied to a management area cluster, each management area in the management area cluster is a node in a blockchain system, and the method includes:

[0073] Step S31, receiving a resource application instruction sent by a first business component in a management area cluster, where the resource application instruction includes a first address and a first input parameter of the first business component, where the first input parameter includes part or all of attribute information of a first resource in the management area cluster;

[0074] Step S32, calling a first smart contract deployed in the blockchain system to query a first input parameter in a database. If the first input parameter is found, a first identifier corresponding to the first input parameter in the database is returned to the first business component according to the first address, so that the first business component controls the first resource according to the first identifier. The database stores a correspondence between the attribute information of the resource and the identifier.

[0075] Step S33, calling the second smart contract deployed in the blockchain system to determine the owner of the first resource from the first business component and the second business component according to the priority of the first business component and the priority of the second business component, the second business component is the current owner of the first resource, and the owner of the first resource has the authority to modify the attribute information of the first resource.

[0076] By applying the technical solution provided in the embodiment of the present application, a smart contract for managing resources is deployed in the blockchain system, such as a first smart contract for verifying the existence of resources and a second smart contract for transferring resource owners. By using the first smart contract and the second smart contract, it is realized that there is only one owner of a resource, and the owner has the authority to modify the attribute information of the resource, and other non-owners do not have the authority to modify the attribute information of the resource. Since the smart contracts deployed in the blockchain system are automatically executed, and the execution process cannot be tampered with, therefore, based on the smart contract, it is possible to set the component that implements important functions as the owner of the resource, and the component that implements important functions can modify the attribute information of the resource, and other non-owners cannot break through the business logic barrier and forcibly modify the attribute information of the resource, which ensures the non-tamperability of the entire link, and then realizes the non-tamperability of the attribute information of the resource, and solves the problem that the network operation failure is caused by the business component arbitrarily modifying the key attribute information of the resource, which brings catastrophic losses to users.

[0077] In the embodiment of the present application, the management platform is a middle platform for unifying resource data, that is, the management platform is an organizational module between the front-end combat unit (such as the business component) and the back-end resource department (such as the first resource mentioned above). The management area cluster includes one or more management areas, such as Figure 1 As shown in the figure, each management area is a node in the blockchain system (i.e., blockchain node). The database of the blockchain node can store the full amount of component addresses in the management area cluster, so that the management platform can manage each business component in the management area cluster.

[0078] like Figure 4In the networking of the management area cluster shown, the management area cluster includes management area 1 to management area 4. Park controller 1, DC controller 1, and network management server 1 are deployed in management area 1, park controller 2, DC controller 2, and network management server 2 are deployed in management area 2, park controller 3, DC controller 3, and network management server 3 are deployed in management area 3, and park controller 4, DC controller 4, and network management server 4 are deployed in management area 4. Management area 1 to management area 4 serve as blockchain nodes 1 to blockchain nodes 4 in the blockchain system, and the databases of blockchain nodes 1 to blockchain nodes 4 store the addresses of park controllers 1 to park controllers 4, the addresses of DC controllers 1 to DC controllers 4, and the addresses of network management servers 1 to network management servers 4.

[0079] In addition, each blockchain node stores the same copy of the blockchain, e.g. Figure 5 As shown, blockchain nodes 1 to 4 store blockchains linked to blocks 1 to 3. As the blockchain system runs, the number of blocks stored in each blockchain node continues to increase. Figure 5 Only three blocks are used as an example, which is not limiting.

[0080] In the embodiment of the present application, the component address is the address of the business component, that is, the identity address of the business component. The component address can be composed of the management area identifier (Identity, ID) and the business component name. The component address can also be in other forms as long as the component address is unique on the blockchain.

[0081] In the above step S31, the first business component can be any business component in any management area in the management area cluster. The first business component calls the chassis interface and sends a resource application instruction to the management platform to register a resource, such as a first resource. The resource may include but is not limited to IT / CT resources such as routers, switching devices, firewalls, servers, and APs. The first address is the address of the first business component. The first resource is any resource in the management area cluster, and the first resource and the first business component may be located in the same management area or in different management areas.

[0082] The first input parameter is an associated parameter of the first resource input by the user when registering the resource, including part or all of the attribute information of the first resource. For example, the attribute information of the resource can be shown in Table 1.

[0083] Table 1

[0084]

[0085] The resource type may include monitoring resources and configuration management database (CMDB) resources. The encoding format is the encoding format used when performing calculations, the management area ID is the ID of the management area to which the resource belongs, the tenant ID is the ID of the tenant to which the resource belongs, and the organization ID is the ID of the organization to which the resource belongs.

[0086] When applying for resources, the input parameters included in the resource application instruction may include all the attribute information in Table 1 above, or may include part of the attribute information in Table 1 above, such as key attribute information such as resource name, resource IP, resource MAC, resource SN, etc.

[0087] In the above step S32, the first smart contract is deployed in the blockchain system. In the embodiment of the present application, the code of the first smart contract can be stored on the blockchain in the blockchain node. The first smart contract is a smart contract for verifying the existence of resources. The existence of resources means that the resources have been registered by other business components, and the non-existence of resources means that the resources have not been registered by other business components. The first smart contract can query whether the resource exists in the database based on attribute information such as resource name, resource IP, resource MAC, resource SN, etc.; if it exists, the resource ID in the database is returned; if it does not exist, it returns null.

[0088] The database stores the result information after the smart contract is executed, such as the correspondence between the attribute information of the resource obtained after the business component applies for the resource and the ID assigned to the resource (i.e., the resource ID), as shown in Table 2.

[0089] Table 2

[0090]

[0091] In Table 2, the resource status may include two states: available and disabled. The application time is the time when the resource is first applied for, and the modification time is the time when the resource is most recently applied for.

[0092] After receiving the resource application instruction, the management platform can call the first smart contract through the external interface of the blockchain system to verify whether the first resource applied by the first business component exists. Specifically, the first input parameter is queried in the database. If the first input parameter is found, it means that the first resource exists, that is, the first resource has been registered by other business components. Then the management platform returns the resource ID (such as the first identifier) ​​corresponding to the first input parameter in the database to the first business component according to the first address. This realizes the application of the first resource by the first business component. Subsequently, the first business component controls the first resource according to the first identifier, such as analyzing the usage of the resource, managing the information recorded in the resource, and modifying the attribute information of the resource.

[0093] During the execution of the first smart contract, the transaction records generated are stored in the block, where the transaction records may include: smart contract address, smart contract, first input parameter and first address, etc., to facilitate the subsequent verification of the execution results stored in the database (such as the first business component applying for the first resource), avoid tampering of the execution results, and achieve traceability of the execution results.

[0094] In the above step S33, the second smart contract is deployed in the blockchain system. In the embodiment of the present application, the code of the second smart contract can be stored on the blockchain in the blockchain node. The second smart contract is a smart contract for transferring the resource owner. The second smart contract can transfer the owner of the resource according to the priority of the business component. The implementation scheme for transferring the resource owner is actually to complete the process of exchanging coins for goods by paying 0 ethers according to the built-in transaction function provided by the blockchain system. The owner of a resource has the authority to modify the attribute information of the resource.

[0095] In the embodiment of the present application, different business components have their own priorities, for example, the priorities of business components include high priority, medium priority and low priority. Among them, high-priority business components include control components such as SD-WAN controller, AD-WAN controller, campus controller, DC controller, etc.; medium-priority business components include management components such as network management server, and low-priority business components include analysis components such as analyzer and Universal Center (u-center) server.

[0096] In the above step S32, the management platform calls the first smart contract and determines that the first resource already exists, which means that the first resource currently has an owner. Taking the current owner of the first resource as the second business component as an example, after returning the first identifier to the first business component, the management platform can call the second smart contract through the external interface of the blockchain system to determine whether to transfer the owner of the first resource. Specifically, according to the priority of the first business component and the priority of the second business component, the owner of the first resource is determined from the first business component and the second business component.

[0097] In some embodiments, the management platform calls the second smart contract to implement the operation of transferring the owner of the resource (i.e., the above-mentioned step S33), which can be implemented by the following steps: comparing the priority of the first business component to be less than the priority of the second business component; when the priority of the first business component is less than the priority of the second business component, keeping the second business component as the owner of the first resource; when the priority of the first business component is greater than or equal to the priority of the second business component, modifying the first business component to be the owner of the first resource.

[0098] In the embodiment of the present application, the management platform may also use other methods to determine the owner of the first resource, such as determining the priority of the first type to which the first business component belongs and the priority of the second type to which the second business component belongs; comparing the two priorities, and when the priority of the first type is less than the priority of the second type, maintaining the second business component as the owner of the first resource; and when the priority of the first type is greater than or equal to the priority of the second type, modifying the first business component to be the owner of the first resource. The types to which business components belong can be divided into control, management, and analysis types, where a control type business component is a control component, a management type business component is a management component, and an analysis type business component is an analysis component.

[0099] During the execution of the second smart contract, the transaction records generated are stored in the block, where the transaction records may include: smart contract address, smart contract, first identifier and first address, etc., to facilitate the subsequent verification of the execution results stored in the database (such as the first business component is the owner of the first resource), avoid tampering of the execution results, and achieve traceability of the execution results.

[0100] In the embodiment of the present application, a high-priority business component can transfer the owner's authority of a low-priority business component, but a low-priority business component cannot transfer the owner's authority of a high-priority business component. In this way, only a high-priority business component can modify the attribute information of a resource.

[0101] In some embodiments, Figure 6 As shown, a resource control method is also provided, which may include the following steps:

[0102] Step S61, receiving a resource application instruction sent by the first business component in the management area cluster, the resource application instruction includes the first address and first input parameter of the first business component, the first input parameter includes part or all of the attribute information of the first resource in the management area cluster; the same as the above step S31.

[0103] Step S62, calling the first smart contract deployed in the blockchain system to query the first input parameter in the database. If the first input parameter is found, the first identifier corresponding to the first input parameter in the database is returned to the first business component according to the first address, so that the first business component controls the first resource according to the first identifier, and the database stores the correspondence between the attribute information of the resource and the identifier; the same as the above step S32.

[0104] Step S63, calling the second smart contract deployed in the blockchain system to determine the owner of the first resource from the first business component and the second business component according to the priority of the first business component and the priority of the second business component, the second business component is the current owner of the first resource, and the owner of the first resource has the authority to modify the attribute information of the first resource; the same as the above step S33.

[0105] Step S64, receiving a resource modification instruction sent by the first business component, where the resource modification instruction includes a first address, a first identifier, and a second input parameter, where the second input parameter includes part or all of the attribute information of the first resource;

[0106] In an embodiment of the present application, the first business component can call the chassis interface to send a resource modification instruction to the management platform to modify the attribute information of the resource, such as the attribute information of the first resource. The second input parameter is the associated parameter of the first resource entered by the user when modifying the resource, including part or all of the attribute information of the first resource. Here, the first resource is the resource whose attribute information needs to be modified, and the second input parameter is the attribute information that needs to be modified.

[0107] Step S65, calling a third smart contract deployed in the blockchain system to determine whether the first business component is the owner of the first resource based on the first address and the first identifier; if it is determined that the first business component is the owner of the first resource, modify the attribute information of the first resource according to the second input parameter; if it is determined that the first business component is not the owner of the first resource, prohibiting modification of the attribute information of the first resource.

[0108] In the embodiment of the present application, the third smart contract is deployed in the blockchain system. In the embodiment of the present application, the code of the third smart contract can be stored on the blockchain in the blockchain node. The third smart contract is a smart contract for modifying the key attributes of resources. The third smart contract controls the resource owner to modify the key attribute information such as the incoming resource IP, resource SN, resource MAC, etc.; when the non-resource owner attempts to modify, the modification fails.

[0109] After receiving the resource modification instruction, the management platform calls the third smart contract through the external interface of the blockchain system to modify the attribute information of the first resource. Specifically, it can be: based on the first address and the first identifier, determine whether the first business component is the owner of the first resource (the owner's identity can be determined in the above step S63); when it is determined that the first business component is the owner of the first resource, modify the attribute information of the first resource according to the second input parameter, that is, modify the attribute information of the first resource to the second input parameter; when it is determined that the first business component is not the owner of the first resource, prohibit modifying the attribute information of the first resource.

[0110] During the execution of the third smart contract, the transaction records generated are stored in the block, where the transaction records may include: smart contract address, smart contract, first identifier, second input parameter and first address, etc., to facilitate the subsequent verification of the execution results stored in the database (such as the modified attribute information of the first resource), avoid tampering of the execution results, and achieve traceability of the execution results.

[0111] In the embodiment of the present application, a third smart contract for modifying resource attribute information is deployed on the blockchain system. By using the third smart contract, it can be strictly implemented that high-priority business components can modify the attribute information of resources, while low-priority business components cannot modify the attribute information of resources, further ensuring the tamper-proof nature of the entire link and solving the problem of network operation failures caused by business components arbitrarily modifying key attribute information of resources, causing catastrophic losses to users.

[0112] In the embodiment of the present application, when the network security level is low, the third smart contract may not be deployed on the blockchain system, which can reduce the size of the blockchain system.

[0113] In some embodiments, Figure 7 As shown, a resource control method is also provided, which may include the following steps:

[0114] Step S71, receiving a resource application instruction sent by the first business component in the management area cluster, the resource application instruction includes the first address and first input parameter of the first business component, the first input parameter includes part or all of the attribute information of the first resource in the management area cluster; the same as the above step S31.

[0115] Step S72, calling the first smart contract deployed in the blockchain system to query the first input parameter in the database. If the first input parameter is found, the first identifier corresponding to the first input parameter in the database is returned to the first business component according to the first address, so that the first business component controls the first resource according to the first identifier; the database stores the correspondence between the attribute information of the resource and the identifier; the same as the above step S32.

[0116] Step S73, calling the second smart contract deployed in the blockchain system to determine the owner of the first resource from the first business component and the second business component according to the priority of the first business component and the priority of the second business component, the second business component is the current owner of the first resource, and the owner of the first resource has the authority to modify the attribute information of the first resource; the same as the above step S33.

[0117] Step S74, when calling the first smart contract and failing to find the first input parameter in the database, calling the fourth smart contract deployed in the blockchain system to assign a first identifier to the first resource, returning the first identifier to the first business component according to the first address, and storing the corresponding relationship between the attribute information of the first resource and the first identifier in the database, and taking the first business component as the owner of the first resource.

[0118] In the embodiment of the present application, the fourth smart contract is deployed in the blockchain system. In the embodiment of the present application, the code of the fourth smart contract can be stored on the blockchain in the blockchain node. The fourth smart contract is a smart contract for creating resources. The fourth smart contract uses key attribute information such as resource name, resource IP, resource SN, resource MAC, and component address to register resources on the management platform, that is, to create resources; after successful creation, a unique resource ID is assigned to the resource, and the corresponding relationship between the attribute information of the resource and the identifier is stored in the database, as shown in Table 2 above, and the current business component is set as the owner of this resource.

[0119] When the first smart contract is called and the first input parameter is not found in the database, it means that the first resource does not exist. The management platform calls the fourth smart contract through the external interface of the blockchain system to store the corresponding relationship between the attribute information of the first resource and the first identifier in the database. At this time, the first resource is only applied (referenced) by the first business component, so the first business component is the owner of the first resource.

[0120] During the execution of the fourth smart contract, the transaction records generated are stored in the block, where the transaction records may include: smart contract address, smart contract, first input parameter and first address, etc., to facilitate the subsequent verification of the execution results stored in the database (such as the first business component applying for the first resource), avoid tampering of the execution results, and achieve traceability of the execution results.

[0121] In some embodiments, Figure 8 As shown, a resource control method is also provided, which may include the following steps:

[0122] Step S81, receiving a resource application instruction sent by the first business component in the management area cluster, the resource application instruction includes the first address and first input parameter of the first business component, the first input parameter includes part or all of the attribute information of the first resource in the management area cluster; the same as the above step S31.

[0123] Step S82, calling the first smart contract deployed in the blockchain system to query the first input parameter in the database. If the first input parameter is found, the first identifier corresponding to the first input parameter in the database is returned to the first business component according to the first address, so that the first business component controls the first resource according to the first identifier. The database stores the correspondence between the attribute information of the resource and the identifier; the same as the above step S32.

[0124] Step S83, calling the second smart contract deployed in the blockchain system to determine the owner of the first resource from the first business component and the second business component according to the priority of the first business component and the priority of the second business component, the second business component is the current owner of the first resource, and the owner of the first resource has the authority to modify the attribute information of the first resource; the same as the above step S33.

[0125] Step S84, after returning the first identifier to the first business component, calling the fifth smart contract deployed in the blockchain system to add the corresponding relationship between the first identifier and the first address in the database.

[0126] In the embodiment of the present application, the fifth smart contract is deployed in the blockchain system. In the embodiment of the present application, the code of the fourth smart contract can be stored on the blockchain in the blockchain node. The fifth smart contract is a smart contract that references resources. The fifth smart contract adds a reference relationship between resources and components based on the resource ID and component address.

[0127] After the management platform returns the first identifier to the first business component, it indicates that the first business component references the first resource, and then calls the fifth smart contract through the external interface of the blockchain system to add the corresponding relationship between the first identifier and the first address in the database, that is, to add the reference relationship between the first resource and the first business component. In the embodiment of the present application, the reference relationship between resources and components is shown in Table 3.

[0128] Table 3

[0129]

[0130] In Table 3, component ID is the ID of the service component, and component name is the name of the service component. The component address may consist of the management area ID, component ID, and component name, or may consist of the management area ID and component name, or may only include the component ID.

[0131] During the execution of the fifth smart contract, the transaction records generated are stored in the block, where the transaction records may include: smart contract address, smart contract, first identifier and first address, etc., to facilitate the subsequent verification of the execution results stored in the database (such as the first business component references the first resource, that is, the correspondence between the first identifier and the first address), avoid tampering of the execution results, and achieve traceability of the execution results.

[0132] The reference relationship between resources and components is a result of the execution of the first to fifth smart contracts. The management platform records the reference relationship in the database to facilitate the management of resources and business components.

[0133] In some embodiments, Fig. 9 As shown, a resource control method is also provided, which may include the following steps:

[0134] Step S91, receiving a resource application instruction sent by the first business component in the management area cluster, the resource application instruction includes the first address and first input parameter of the first business component, the first input parameter includes part or all of the attribute information of the first resource in the management area cluster; the same as the above step S31.

[0135] Step S92, calling the first smart contract deployed in the blockchain system to query the first input parameter in the database. If the first input parameter is found, the first identifier corresponding to the first input parameter in the database is returned to the first business component according to the first address, so that the first business component controls the first resource according to the first identifier, and the database stores the correspondence between the attribute information of the resource and the identifier; the same as the above step S32.

[0136] Step S93, calling the second smart contract deployed in the blockchain system to determine the owner of the first resource from the first business component and the second business component according to the priority of the first business component and the priority of the second business component, the second business component is the current owner of the first resource, and the owner of the first resource has the authority to modify the attribute information of the first resource; the same as the above step S33.

[0137] Step S94, after returning the first identifier to the first business component, calling the fifth smart contract deployed in the blockchain system to add the correspondence between the first identifier and the first address in the database; the same as the above step S84.

[0138] Step S95, receiving a resource deletion instruction sent by the first business component, where the resource deletion instruction includes a first address and a first identifier;

[0139] In the embodiment of the present application, the first business component can call the chassis interface to send a resource deletion instruction to the management platform to delete the reference relationship between the resource and the component. The resource deletion instruction includes the component address and resource ID of the component whose reference relationship needs to be deleted, such as the first address and the first identifier.

[0140] Step S96, calling a sixth smart contract deployed in the blockchain system to delete the correspondence between the first identifier and the first address, and obtaining the number of remaining business components applying for the first resource;

[0141] In the embodiment of the present application, the sixth smart contract is deployed in the blockchain system. In the embodiment of the present application, the code of the fourth smart contract can be stored on the blockchain in the blockchain node. The sixth smart contract is a smart contract for deleting resource references. The sixth smart contract deletes the reference relationship between this resource and this business component according to the component address and resource ID, and returns the number of remaining reference components of this resource. If there is no reference relationship between the business component and the resource, the number of remaining reference components of the resource is directly returned. The number of remaining reference components of the resource is the number of business components remaining to apply for the first resource.

[0142] After receiving the resource deletion instruction, the management platform can call the sixth smart contract through the external interface of the blockchain system to delete the reference relationship between the first resource and the first business component. Specifically, it can be: delete the corresponding relationship between the first identifier and the first address, reduce the number of business components applying for the first resource by 1, and obtain the remaining number of business components applying for the first resource; if there is no reference relationship between the business component and the resource, the number of business components applying for the first resource remains unchanged, and the number of business components applying for the first resource is the remaining number of business components applying for the first resource.

[0143] After the correspondence between the first identifier and the first address is deleted, the first service component can no longer reference the first resource.

[0144] During the execution of the sixth smart contract, the transaction records generated are stored in the block, where the transaction records may include: smart contract address, smart contract, first identifier and first address, etc., to facilitate subsequent verification of the execution results stored in the database (such as deleting the correspondence between the first identifier and the first address), avoid tampering of the execution results, and achieve traceability of the execution results.

[0145] Step S97, when the number of remaining business components applying for the first resource is 0, call the seventh smart contract deployed in the blockchain system to disable the first resource corresponding to the first identifier.

[0146] In the embodiment of the present application, the seventh smart contract is deployed in the blockchain system. In the embodiment of the present application, the code of the fourth smart contract can be stored on the blockchain in the blockchain node. The seventh smart contract is a smart contract for disabling resources. The seventh smart contract disables this resource when the resource is no longer used.

[0147] In executing step S96, if the management platform obtains that the number of remaining business components applying for the first resource is 0, it means that no business component references the first resource anymore. The management platform can call the seventh smart contract through the external interface of the blockchain system to disable the first resource corresponding to the first identifier.

[0148] If the number of remaining business components applying for the first resource obtained by the management platform is not 0, it means that there are still business components referencing the first resource, and the management platform can end this resource deletion operation.

[0149] During the execution of the seventh smart contract, the transaction records generated are stored in the block, where the transaction records may include: smart contract address, smart contract, first identifier and first address, etc., to facilitate the subsequent verification of the execution results stored in the database (such as disabling the first resource), avoid tampering with the execution results, and achieve traceability of the execution results.

[0150] In the embodiment of the present application, by deploying the sixth smart contract and the seventh smart contract on the blockchain system, the resource can be disabled in time when it is not in use, thereby saving the overall energy consumption of the network.

[0151] Combine the following Fig.10 The overall technical architecture of the user resource permission control system shown in the figure, Fig.11 The method flow of the user resource authority control system shown in the figure, Fig.12 The control resource flow of the control architecture shown, Fig.13 The process of the monitoring component applying for resources shown explains the resource control method provided in the embodiment of the present application.

[0152] In the embodiment of the present application, the user resource authority control system may include a front-end user interface (UI) based on HyperText Markup Language (HTML) / Java Script (JS), peripheral components of the management station, internal components of the platform, upper / lower management stations, servers, and middleware, etc. Among them, the server can be used as a management platform, including a network (Web) layer based on Representational State Transfer (REST), an application programming interface (Application Programming Interface, API) layer based on REST, an API layer based on Google Remote Procedure Call (gRPC), a configuration (Config) layer, a public (Util) layer, a business service layer, a helper class (Helper) layer, and a smart contract access layer (i.e., the external interface of the blockchain system).

[0153] IT operation and maintenance personnel can call the Web layer through the front-end UI to access a management station. The peripheral components of the management station include campus controller, DC controller, SD-WAN controller, AD-WAN controller, network management server, IOM component, Eagle Eye EPS component, EIA certification component, and analysis component. The peripheral components of the management station, the internal components of the platform, and the upper / lower management stations can access this management station through the API layer.

[0154] The business service layer includes functions such as user management, role management, permission management, and resource management in this management station. The business service layer accesses the data and business in the blockchain data layer on the blockchain system through the smart contract access layer. The smart contract layer language in the blockchain system (such as smart contract Solidity) includes the smart contract code that has been deployed on the blockchain system.

[0155] The business service layer uses the methods of calling, accessing, receiving / sending, etc. through the Data Access Objects (DAO) layer and third-party services 1 to 3 (such as Feign client, Redis client, Kafka client), to access the database (Data Base, DB) of this management station, other business component APIs of this management station, Redis server 1 (Server), Kafka server 2 (Server) and other corresponding middleware to implement some functions of this management station that need to rely on middleware.

[0156] exist Fig.10Based on the overall technical architecture of the user resource authority control system shown in FIG, the method flow of the user resource authority control system is as follows: Fig.11 shown.

[0157] Step (1), initialization of the rights management system.

[0158] The user deploys relevant smart contracts for user authority control and relevant smart contracts for resource management (such as the first to seventh smart contracts mentioned above) to the blockchain system.

[0159] For example, user R undertakes the deployment of smart contracts. The management platform calls the "initialization preset role and related permissions smart contract" to automatically generate system administrator permissions and multiple administrator roles, and presets corresponding functional permissions or resource permissions for each administrator role. At the same time, user R will be added as a system administrator user and assigned a system administrator role. The system administrator user is the initial administrator and cannot be replaced (but subsequent administrator users can change roles).

[0160] Step (2), creation and configuration of permissions and roles (this step is optional).

[0161] User R calls the process of creating a custom role, creates a custom role, and associates it with the existing permissions on the management platform, such as the permissions in step (1). After the custom role is created, it can be used for function authorization.

[0162] Step (3): Install and deploy the surrounding components and initialize roles, permissions, and resources.

[0163] Each component is installed and deployed to the management platform. The management platform can call the registration permission process and create a custom role process to register the functional permissions and roles that meet the business scenario constraints of each component. Each component calls the resource application process to register switches, routers, APs, ACs, servers, operating systems and other resources to the management platform. For the specific resource application process, please refer to the above Figure 7 Part of the description.

[0164] Step (4), user registers an account.

[0165] When the management platform is running, user S can register an account through the user registration process, in which user S needs to complete the submission of personal identity information such as degree information, user biometric information (such as fingerprints, irises, etc. to strengthen the certainty of user identity), and fingerprint certificate scans according to the prompts of the management platform.

[0166] Step (5), review user registration information.

[0167] User S's registration information needs to go through the user review process to check the legitimacy of personal identity information. The "User Personal Information Legitimacy Check Smart Contract" will automatically check whether user S's personal identity information meets the requirements. If user S's personal identity information does not meet the requirements, user S's registration fails. If user S successfully passes this smart contract check, a key file (including user address and private key) is generated in the blockchain system based on the personal identity information provided by user S and saved in the blockchain system.

[0168] Step (6): review the user registration information and authorize functional permissions and resource permissions.

[0169] User R calls the user authorization process for the approved user S and assigns functional permissions and resource permissions to user S. At the same time, the management platform feeds back the key file generated when the user registered to user S through legal and authoritative channels.

[0170] In step (7), the user logs in using the key and accesses the system.

[0171] After receiving the key file, user S can enter personal identity information (ID card, fingerprint, iris, etc.) and private key to log in to the cluster system of this management area. The management platform decrypts the encrypted ciphertext of personal identity information stored in the blockchain system according to the private key, and compares it with the personal identity information entered by the user; if the user identity is authentic, user S successfully logs in to the cluster system of this management area, and can view his assigned role and resource permissions in the system personal information module. For example, the management platform can call the process of viewing user authorization information, return the function permission ID set and resource permission ID set bound to user S, and perform relevant operations on the cluster system of the management area within this authorization scope.

[0172] After user S logs in with the key and accesses the cluster system in the management area, he can use Fig.12 The control architecture shown controls resources. Specifically, user S uses the front-end UI to call the Web layer to access the business service layer. The business service layer includes resource management functions such as applying for resources, modifying resources, and deleting resources. User S controls the business components through the business service layer to call the smart contracts on the blockchain system to apply for resources, modify resources, and delete resources. The smart contract layer of the blockchain system can include 7 smart contracts: creating resources, referencing resources, transferring resource owners, deleting resource references, disabling resource smart contracts, modifying key resource attributes, and verifying resource existence. The use of these 7 smart contracts can be found in Figure 3~Figure 9 Part of the description.

[0173] Take the business component as the monitoring component and the monitoring component applying for resources as an example. The process of the monitoring component applying for resources is as follows: Fig.13As shown. The current user controls the monitoring component to call the API interface (such as the above-mentioned smart contract access layer) and inputs a resource application instruction to the management platform. The resource application instruction includes the address of the monitoring component and the public attribute information of the requested resource (such as resource name, resource IP, resource MAC, resource SN, etc.). The management platform, as a unified resource data middle platform, is configured with a unified resource instance, which records the corresponding relationship between the attribute information of the resource and the resource ID. The unified resource instance performs authorization management on all resources.

[0174] The unified resource instance calls the smart contract for verifying the existence of resources, the smart contract for creating resources, the smart contract for referencing resources, etc. according to the resource application instruction, so as to realize the monitoring component referencing related resources and returning the resource ID to the monitoring component. Specifically, it can be: verifying whether the applied resource exists; if the applied resource exists, the recorded ID of the applied resource is returned; if the applied resource does not exist, the smart contract for creating resources is called to create the resource and assign a unique ID to the resource, and the assigned ID of the applied resource is returned, and the corresponding relationship between the attribute information of the resource and the resource ID is recorded; and the smart contract for referencing resources is called to record the reference relationship between the resource and the monitoring component.

[0175] In addition, the management platform can filter the resource range that the current user should have according to the resource viewing rules configured by the user, so that the current user can view the resources within the resource range that they should have.

[0176] In the embodiment of the present application, the decentralized, transparent, secure and tamper-proof characteristics of blockchain technology are combined to solve the problem of arbitrary modification of key attributes of resources, that is: each component is an ordinary user on a blockchain system. When applying for a resource, only the owner component of the resource can modify the resource, and other business components only have read permissions but no modification permissions; the owner identity can be transferred through smart contracts within the blockchain system to ensure the tamper-proof and traceability of resources.

[0177] When a business component attempts to modify a resource, the management platform calls the smart contract in the blockchain system to determine the modification priority of the business component. Low-priority business components cannot modify the attribute information of the resource, which ensures that low-priority non-control components cannot modify the key attribute information of the resource, such as IP and SN. The stability of the control component's configuration of the device and the online status of the managed device are guaranteed. Due to the automatic execution of the blockchain's smart contract and the inability to be tampered with during the execution process, the non-control component cannot break through the priority business logic barrier. If it is modified forcibly, the modification will definitely fail, ensuring the tamper-proof nature of the entire link and avoiding the problems of network traffic being damaged and the device being unable to be managed due to the non-control component arbitrarily modifying the key attribute information of the resource IP.

[0178] Corresponding to the above resource control method, the embodiment of the present application also provides a resource control device, such as Fig.14 As shown, a management platform is applied to a management area cluster, each management area in the management area cluster is a blockchain node, and the device includes:

[0179] The receiving module 141 is used to receive a resource application instruction sent by a first business component in the management area cluster, where the resource application instruction includes a first address and a first input parameter of the first business component, where the first input parameter includes part or all of the attribute information of the first resource in the management area cluster;

[0180] The calling module 142 is used to call the first smart contract deployed in the blockchain system to query the first input parameter in the database. If the first input parameter is found, the first identifier corresponding to the first input parameter in the database is returned to the first business component according to the first address, so that the first business component controls the first resource according to the first identifier. The database stores the corresponding relationship between the attribute information of the resource and the identifier.

[0181] The calling module 142 is also used to call a second smart contract deployed in the blockchain system to determine the owner of the first resource from the first business component and the second business component according to the priority of the first business component and the priority of the second business component. The second business component is the current owner of the first resource, and the owner of the first resource has the authority to modify the attribute information of the first resource.

[0182] In some embodiments, the calling module 142 may be specifically used to:

[0183] When the priority of the first business component is lower than that of the second business component, the second business component is kept as the owner of the first resource; when the priority of the first business component is greater than or equal to that of the second business component, the first business component is modified to be the owner of the first resource.

[0184] In some embodiments, the receiving module 141 may also be used to receive a resource modification instruction sent by the first business component, where the resource modification instruction includes a first address, a first identifier, and a second input parameter, where the second input parameter includes part or all of the attribute information of the first resource;

[0185] The calling module 142 can also be used to call a third smart contract deployed in the blockchain system to determine whether the first business component is the owner of the first resource based on the first address and the first identifier; if it is determined that the first business component is the owner of the first resource, modify the attribute information of the first resource according to the second input parameter; if it is determined that the first business component is not the owner of the first resource, prohibit modifying the attribute information of the first resource.

[0186] In some embodiments, the calling module 142 can also be used to call a fourth smart contract deployed in the blockchain system when calling the first smart contract and failing to find the first input parameter in the database, so as to assign a first identifier to the first resource, return the first identifier to the first business component according to the first address, store the correspondence between the attribute information of the first resource and the first identifier in the database, and regard the first business component as the owner of the first resource.

[0187] In some embodiments, the calling module 142 can also be used to call a fifth smart contract deployed in the blockchain system after returning the first identifier to the first business component, so as to add a corresponding relationship between the first identifier and the first address in the database.

[0188] In some embodiments, the receiving module 141 may also be used to receive a resource deletion instruction sent by the first business component, where the resource deletion instruction includes the first address and the first identifier;

[0189] The calling module 142 can also be used to call the sixth smart contract deployed in the blockchain system to delete the correspondence between the first identifier and the first address, and obtain the remaining number of business components that apply for the first resource; when the number of business components is 0, call the seventh smart contract deployed in the blockchain system to disable the first resource corresponding to the first identifier.

[0190] In the technical solution provided by the embodiment of the present application, a smart contract for managing resources is deployed in the blockchain system, such as a first smart contract for verifying the existence of resources and a second smart contract for transferring resource owners. The first smart contract and the second smart contract are used to realize that there is only one owner of a resource, and the owner has the authority to modify the attribute information of the resource, and other non-owners do not have the authority to modify the attribute information of the resource. Since the smart contracts deployed on the blockchain system are automatically executed, and the execution process cannot be tampered with, therefore, based on the smart contract, it is possible to set the component that implements important functions as the owner of the resource, and the component that implements important functions can modify the attribute information of the resource, and other non-owners cannot break through the business logic barrier and forcibly modify the attribute information of the resource, which ensures the non-tamperability of the entire link, and then realizes the non-tamperability of the attribute information of the resource, and solves the problem of network operation failure caused by the arbitrary modification of the key attribute information of the resource by the business component, which brings catastrophic losses to the user.

[0191] Corresponding to the above resource control method, the embodiment of the present application further provides an electronic device (such as the above management platform), such as Fig.15As shown, it includes a processor 151 and a machine-readable storage medium 152, the machine-readable storage medium 152 stores machine-executable instructions that can be executed by the processor 151, and the processor 151 is prompted by the machine-executable instructions to implement the above resource control method.

[0192] The machine-readable storage medium may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk storage. Optionally, the machine-readable storage medium may also be at least one storage device located away from the aforementioned processor.

[0193] The processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.

[0194] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, any of the above-mentioned resource control methods is implemented.

[0195] In another embodiment provided by the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any resource control method in the above embodiments.

[0196] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.

[0197] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0198] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, electronic device, storage medium and program product embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0199] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims

1. A resource control method, characterized in that: A management platform applied to a management area cluster, each management area in the management area cluster is a node in a blockchain system, and the method includes: Receive a resource application instruction sent by a first business component in a management area cluster, wherein the resource application instruction includes a first address and a first input parameter of the first business component, wherein the first input parameter includes part or all of attribute information of a first resource in the management area cluster; calling a first smart contract deployed in the blockchain system to query the first input parameter in a database, and if the first input parameter is found, returning a first identifier corresponding to the first input parameter in the database to the first business component according to the first address, so that the first business component controls the first resource according to the first identifier, wherein the database stores a correspondence between attribute information of the resource and the identifier; A second smart contract deployed in the blockchain system is called to determine the owner of the first resource from the first business component and the second business component according to the priority of the first business component and the priority of the second business component, the second business component being the current owner of the first resource, and the owner of the first resource having the authority to modify the attribute information of the first resource.

2. The method according to claim 1, characterized in that The step of determining the owner of the first resource from the first business component and the second business component according to the priority of the first business component and the priority of the second business component includes: When the priority of the first service component is lower than the priority of the second service component, keep the second service component as the owner of the first resource; When the priority of the first service component is greater than or equal to the priority of the second service component, the first service component is modified to be the owner of the first resource.

3. The method according to claim 1, characterized in that The method further comprises: receiving a resource modification instruction sent by the first service component, wherein the resource modification instruction includes the first address, the first identifier, and a second input parameter, wherein the second input parameter includes part or all of the attribute information of the first resource; Calling a third smart contract deployed in the blockchain system to determine whether the first business component is the owner of the first resource according to the first address and the first identifier; if it is determined that the first business component is the owner of the first resource, modifying the attribute information of the first resource according to the second input parameter; if it is determined that the first business component is not the owner of the first resource, prohibiting modification of the attribute information of the first resource.

4. The method according to claim 1, characterized in that: The method further comprises: When calling the first smart contract, if the first input parameter is not found in the database, calling the fourth smart contract deployed in the blockchain system to assign the first identifier to the first resource, returning the first identifier to the first business component according to the first address, storing the correspondence between the attribute information of the first resource and the first identifier in the database, and taking the first business component as the owner of the first resource.

5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: After returning the first identifier to the first business component, a fifth smart contract deployed in the blockchain system is called to add a corresponding relationship between the first identifier and the first address in the database.

6. The method according to claim 5, characterized in that The method further comprises: receiving a resource deletion instruction sent by the first service component, wherein the resource deletion instruction includes the first address and the first identifier; Calling a sixth smart contract deployed in the blockchain system to delete the correspondence between the first identifier and the first address, and obtaining the number of remaining business components applying for the first resource; When the number of the business components is 0, a seventh smart contract deployed in the blockchain system is called to disable the first resource corresponding to the first identifier.

7. A resource control device, characterized in that: A management platform applied to a management area cluster, each management area in the management area cluster is a node in a blockchain system, and the device includes: A receiving module, configured to receive a resource application instruction sent by a first business component in a management area cluster, wherein the resource application instruction includes a first address and a first input parameter of the first business component, wherein the first input parameter includes part or all of attribute information of a first resource in the management area cluster; A calling module, configured to call a first smart contract deployed in the blockchain system to query the first input parameter in a database, and if the first input parameter is found, return a first identifier corresponding to the first input parameter in the database to the first business component according to the first address, so that the first business component controls the first resource according to the first identifier, wherein the database stores a correspondence between attribute information of the resource and the identifier; The calling module is also used to call a second smart contract deployed in the blockchain system to determine the owner of the first resource from the first business component and the second business component according to the priority of the first business component and the priority of the second business component, the second business component is the current owner of the first resource, and the owner of the first resource has the authority to modify the attribute information of the first resource.

8. The device according to claim 7, characterized in that The calling module is specifically used for: When the priority of the first business component is lower than that of the second business component, the second business component is maintained as the owner of the first resource; when the priority of the first business component is greater than or equal to that of the second business component, the first business component is modified to be the owner of the first resource.

9. The device according to claim 7, characterized in that The receiving module is further used to receive a resource modification instruction sent by the first business component, where the resource modification instruction includes the first address, the first identifier, and a second input parameter, where the second input parameter includes part or all of the attribute information of the first resource; The calling module is further used to call a third smart contract deployed in the blockchain system to determine whether the first business component is the owner of the first resource according to the first address and the first identifier; When it is determined that the first business component is the owner of the first resource, the attribute information of the first resource is modified according to the second input parameter; when it is determined that the first business component is not the owner of the first resource, modifying the attribute information of the first resource is prohibited.

10. The device according to claim 7, characterized in that The calling module is further used to call a fourth smart contract deployed in the blockchain system when calling the first smart contract and failing to find the first input parameter in the database, so as to assign the first identifier to the first resource, return the first identifier to the first business component according to the first address, store the corresponding relationship between the attribute information of the first resource and the first identifier in the database, and use the first business component as the owner of the first resource.

11. The device according to any one of claims 7 to 10, characterized in that: The calling module is also used to call a fifth smart contract deployed in the blockchain system after returning the first identifier to the first business component, so as to add a corresponding relationship between the first identifier and the first address in the database.

12. The device according to claim 11, characterized in that The receiving module is further used to receive a resource deletion instruction sent by the first service component, where the resource deletion instruction includes the first address and the first identifier; The calling module is also used to call a sixth smart contract deployed in the blockchain system to delete the correspondence between the first identifier and the first address, and obtain the remaining number of business components that apply for the first resource; when the number of business components is 0, call a seventh smart contract deployed in the blockchain system to disable the first resource corresponding to the first identifier.

13. An electronic device, characterized in that: The method comprises a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the processor is prompted by the machine-executable instructions to implement the method described in any one of claims 1 to 6.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • System, method and device for realizing government affair information resource sharing and exchange based on blockchain technology, processor and storage medium thereof

    CN112702402A

  • Block chain message transmission method and device

    CN113098982A