Power repair resource allocation method, device and equipment based on smart contract

CN113971504BActive Publication Date: 2024-10-15CHINA SOUTHERN POWER GRID MATERIALS CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202111082040.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-15
Publication Date
2024-10-15
Estimated Expiration
2041-09-15

AI Technical Summary

Technical Problem

The existing electric power emergency repair resource allocation work is inefficient and relies on manual dispatch, making it difficult to respond quickly and efficiently match emergency repair resources.

Method used

Using a smart contract-based method, blockchain technology is used to respond to emergency repair resource acquisition requests, determine the demand information of abnormal power supply nodes, match the resource supply information of the emergency repair resource supply end, and perform resource matching processing according to the material supply weight until the preset conditions are met. Quantity, distance and timeliness of resource transfer.

Benefits of technology

It achieves accurate matching and dynamic adjustment of emergency repair resources, improves the efficiency of power emergency supply supplies, and ensures that resources are in place in a timely manner during post-disaster repairs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113971504B_ABST
    Figure CN113971504B_ABST
Patent Text Reader

Abstract

The present application relates to a method, device and equipment for allocating power emergency repair resources based on smart contracts. The method includes: responding to an emergency repair resource acquisition request for an abnormal power supply node, determining the emergency repair resource demand information of the abnormal power supply node; reading the emergency repair resource supply information pre-uploaded by each emergency repair resource supply end from the target blockchain, and determining the emergency repair resources to be matched for the abnormal power supply node according to the emergency repair resource supply information and the emergency repair resource demand information; performing resource matching processing on the emergency repair resources to be matched according to the material matching weights of each emergency repair resource supply end, and obtaining a resource matching result; updating the material matching weights of each emergency repair resource supply end according to the resource matching result; returning to the step of performing resource matching processing on the emergency repair resources to be matched according to the material matching weights of each emergency repair resource supply end, and obtaining a resource matching result, until the target resource matching result is obtained. The use of this method can improve the efficiency of emergency repair resource allocation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of power emergency repair technology, and in particular to a method, device, computer equipment and storage medium for allocating power emergency repair resources based on smart contracts. Background Art

[0002] The power industry is the lifeline of the national economy. As a basic industry, it deserves the attention of the country's industrial development. When talking about the power industry, the word "safety" comes to mind. Power supply is an important part of the power industry and has a great connection with the national economy and people's livelihood.

[0003] Power accidents caused by natural disasters, external damage, human error or equipment overload will cause regional or local power outages. Electricity is an important part of people's daily life. After an accident occurs, while organizing relevant personnel to carry out emergency repairs, the corresponding supplies and materials must be in place at the same time.

[0004] The current distribution network post-disaster repair resource allocation work is still relatively simple and relies on manual scheduling, and the efficiency of repair resource allocation is low. Summary of the invention

[0005] Based on this, it is necessary to provide a smart contract-based power emergency repair resource allocation method, device, computer equipment and storage medium that can improve the efficiency of post-disaster emergency repair resource allocation in response to the above-mentioned technical problems.

[0006] A method for allocating power emergency repair resources based on smart contracts, comprising:

[0007] In response to a request for obtaining emergency repair resources for a node with abnormal power supply, determining emergency repair resource demand information for the node with abnormal power supply;

[0008] Read the emergency repair resource supply information pre-uploaded by each emergency repair resource supply end from the target blockchain, and determine the emergency repair resources to be matched for the power supply abnormality node according to the emergency repair resource supply information and the emergency repair resource demand information; wherein each of the emergency repair resource supply ends has a material supply weight corresponding to the resource supply attribute; the resource supply attribute includes the resource consumption quantity, resource transfer distance and resource transfer time corresponding to the resource transfer operation;

[0009] According to the material matching weights of the emergency repair resource suppliers, resource matching processing is performed on the emergency repair resources to be matched to obtain a resource matching result; the resource matching result includes the amount of emergency repair resource transfer from each emergency repair resource supplier to the power supply abnormality node;

[0010] According to the resource matching result, the material matching weight of each of the emergency repair resource supply ends is updated;

[0011] Return to the step of performing resource matching processing on the emergency repair resources to be matched according to the material matching weights of each of the emergency repair resource supply ends, and obtaining a resource matching result, until a target resource matching result is obtained; wherein the resource consumption quantity, resource transfer distance, and resource transfer time of the resource transfer operation corresponding to the target resource matching result meet preset conditions.

[0012] In one embodiment, the method further comprises:

[0013] Determine, according to the target resource matching result, the target emergency repair resource transfer amount of each emergency repair resource supplier to the power supply abnormality node;

[0014] According to the target emergency repair resource transfer amount corresponding to each of the emergency repair resource supply ends, an emergency repair resource transfer instruction is sent to each of the emergency repair resource supply ends; the emergency repair resource transfer instruction is used to instruct each of the emergency repair resource supply ends to transfer the emergency repair resources to the power supply abnormality node according to the corresponding target emergency repair resource transfer amount.

[0015] In one embodiment, if the emergency repair resource supply end is a resource supplier end, after the step of sending an emergency repair resource transfer instruction to each of the emergency repair resource supply ends according to the target emergency repair resource transfer amount corresponding to each of the emergency repair resource supply ends, the method further includes:

[0016] Determine the virtual resource transfer amount of the power supply abnormality node to the emergency repair resource supplier according to the target emergency repair resource transfer amount of the emergency repair resource supplier to the power supply abnormality node;

[0017] According to the virtual resource transfer amount, the virtual resources are transferred to the virtual resource account corresponding to the emergency repair resource supply end, and according to the virtual resource transfer amount, the virtual resources in the virtual resource account corresponding to the power supply abnormality node are deducted.

[0018] In one embodiment, if the emergency repair resource supply end is a resource storage warehouse end, after the step of sending an emergency repair resource transfer instruction to each of the emergency repair resource supply ends according to the target emergency repair resource transfer amount corresponding to each of the emergency repair resource supply ends, the method further includes:

[0019] Obtaining the resource transfer contribution of each of the emergency repair resource suppliers in the target resource matching result; the resource transfer contribution value is used to characterize the resource transfer degree of each of the emergency repair resource suppliers in the target resource matching result;

[0020] Generating a virtual resource reward amount for each of the emergency repair resource suppliers according to the resource transfer contribution of each of the emergency repair resource suppliers;

[0021] According to the virtual resource reward amount, the virtual resources are transferred to the virtual resource account corresponding to the emergency repair resource supplier.

[0022] In one embodiment, obtaining the resource transfer contribution value of each of the emergency repair resource suppliers in the target resource matching result includes:

[0023] Obtaining a correlation coefficient between the virtual resource transferred from the emergency repair resource supply end to the power supply abnormality node and the emergency repair resource to be matched;

[0024] According to the correlation coefficient of each of the emergency repair resource supply ends, the resource transfer contribution of each of the emergency repair resource supply ends in the target resource matching result is determined.

[0025] In one of the embodiments, before the step of determining the emergency repair resource demand information of the abnormal power supply node in response to the emergency repair resource acquisition request for the abnormal power supply node, the method further includes:

[0026] Receiving initial emergency repair resource supply data sent by each of the emergency repair resource supply terminals;

[0027] Performing data preprocessing on the initial emergency repair resource supply data to obtain the emergency repair resource supply information; the data format of the emergency repair resource supply information meets the preset conditions;

[0028] The emergency repair resource supply information corresponding to each of the emergency repair resource supply ends is uploaded to the target blockchain.

[0029] In one embodiment, the performing data preprocessing on the initial emergency repair resource supply data to obtain the emergency repair resource supply information includes:

[0030] Performing data cleaning on the initial emergency repair resource supply information to obtain cleaned data; the cleaned data has a preset data format;

[0031] Performing data classification processing on the cleaned data to obtain classified data; the classified data includes data obtained by classifying the cleaned data according to different emergency repair resource types;

[0032] Data complement processing is performed on the missing data in the classified data to obtain complemented data as the emergency repair resource supply information.

[0033] A power repair resource allocation device based on smart contracts, the device comprising:

[0034] A response module, configured to respond to a request for obtaining emergency repair resources for a power supply abnormality node and determine emergency repair resource demand information for the power supply abnormality node;

[0035] A determination module is used to read the emergency repair resource supply information pre-uploaded by each emergency repair resource supply end from the target blockchain, and determine the emergency repair resources to be matched for the power supply abnormality node according to the emergency repair resource supply information and the emergency repair resource demand information; wherein each of the emergency repair resource supply ends has a material supply weight corresponding to the resource supply attribute; the resource supply attribute includes the resource consumption quantity corresponding to the execution of the resource transfer operation, the resource transfer distance and the resource transfer time limit;

[0036] A matching module, used to perform resource matching processing on the emergency repair resources to be matched according to the material matching weights of each of the emergency repair resource suppliers, to obtain a resource matching result; the resource matching result includes the amount of emergency repair resource transfer from each of the emergency repair resource suppliers to the power supply abnormality node;

[0037] An updating module, used for updating the material matching weights of each of the emergency repair resource supply ends according to the resource matching results;

[0038] A return module is used to return to the matching module until a target resource matching result is obtained; wherein the resource consumption quantity, resource transfer distance and resource transfer time of the resource transfer operation corresponding to the target resource matching result meet preset conditions.

[0039] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.

[0040] A computer-readable storage medium stores a computer program, which implements the steps of the above method when executed by a processor.

[0041] The above-mentioned smart contract-based power emergency repair resource allocation method, device, computer equipment and storage medium determine the emergency repair resource demand information of the power supply abnormality node by responding to the emergency repair resource acquisition request for the power supply abnormality node; read the emergency repair resource supply information pre-uploaded by each emergency repair resource supply end from the target blockchain, and determine the emergency repair resources to be matched for the power supply abnormality node according to the emergency repair resource supply information and the emergency repair resource demand information; wherein each emergency repair resource supply end has a material supply weight corresponding to the resource supply attribute; the resource supply attribute includes the resource consumption quantity, resource transfer distance and resource transfer time corresponding to the execution of the resource transfer operation; according to the material matching weight of each emergency repair resource supply end, the emergency repair resources to be matched are processed to obtain the resource matching result; the resource matching result includes the material matching weight of each emergency repair resource supply end The amount of emergency repair resources transferred by the end to the power supply abnormal node; according to the resource matching result, the material matching weight of each emergency repair resource supply end is updated; according to the material matching weight of each emergency repair resource supply end, the resource matching processing is returned to the step of obtaining the resource matching result by performing resource matching processing on the emergency repair resources to be matched, until the target resource matching result is obtained; wherein, the resource consumption quantity, resource transfer distance and resource transfer time of the resource transfer operation corresponding to the target resource matching result meet the preset conditions; in this way, the material matching weights corresponding to each emergency repair resource supply end are dynamically adjusted by using the resource matching result, until the target resource matching result whose resource consumption quantity, resource transfer distance and resource transfer time meet the preset conditions is obtained, thereby realizing the accurate on-demand matching of emergency repair resources and improving the efficiency of power emergency material supply. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 An application environment diagram of a method for allocating power repair resources based on a smart contract in one embodiment;

[0043] Figure 2 A flowchart of a method for allocating power repair resources based on a smart contract in one embodiment;

[0044] Figure 3 This is an application scenario diagram of a method for allocating power repair resources based on a smart contract in one embodiment;

[0045] Figure 4 A chain diagram of a repair resource in an embodiment;

[0046] Figure 5 A system framework diagram of a method for allocating power repair resources based on a smart contract in one embodiment;

[0047] Figure 6 A flowchart of a method for allocating power repair resources based on a smart contract in another embodiment;

[0048] Figure 7 It is a structural block diagram of a power emergency repair resource allocation device based on a smart contract in one embodiment;

[0049] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0051] This application provides a method for allocating power repair resources based on smart contracts, which can be applied to Figure 1 In the application environment shown. Among them, the power supply abnormality node 102 and each emergency repair resource supply end 104 communicate with the server 106 through the network. Among them, the server 106 responds to the emergency repair resource acquisition request for the power supply abnormality node 102, and determines the emergency repair resource demand information of the power supply abnormality node 102; the server 106 reads the emergency repair resource supply information pre-uploaded by each emergency repair resource supply end 104 from the target blockchain, and determines the emergency repair resources to be matched for the power supply abnormality node 102 according to the emergency repair resource supply information and the emergency repair resource demand information; wherein each emergency repair resource supply end 104 has a material supply weight corresponding to the resource supply attribute; the resource supply attribute includes the resource consumption quantity, resource transfer distance and resource transfer time corresponding to the execution of the resource transfer operation; the server 106 is based on the emergency repair resource supply end 104 Material matching weight, performing resource matching processing on the emergency repair resources to be matched, and obtaining a resource matching result; the resource matching result includes the amount of emergency repair resource transfer from each emergency repair resource supplier 104 to the power supply abnormality node 102; the server 106 updates the material matching weight of each emergency repair resource supplier 104 according to the resource matching result; the server 106 returns to the step of performing resource matching processing on the emergency repair resources to be matched according to the material matching weight of each emergency repair resource supplier 104, and obtaining the resource matching result, until the target resource matching result is obtained; wherein, the resource consumption quantity, resource transfer distance and resource transfer time of the resource transfer operation corresponding to the target resource matching result meet the preset conditions.

[0052] In practical applications, the power supply abnormality node 102 and each emergency repair resource supply end 104 can be, but are not limited to, various personal computers, laptops, smart phones, tablet computers and portable wearable devices, and the server 106 can be implemented as an independent server or a server cluster consisting of multiple servers.

[0053] In one embodiment, Figure 2As shown in the figure, a method for allocating power repair resources based on smart contracts is provided. Figure 1 The server 106 in the example is used as an example to illustrate, and the following steps are included:

[0054] Step S210, in response to a request for obtaining emergency repair resources for a node with abnormal power supply, determining emergency repair resource demand information for the node with abnormal power supply.

[0055] Among them, the emergency repair resources may be materials used to repair nodes with abnormal power supply.

[0056] Among them, the power supply abnormal node may refer to a node where power cannot be supplied due to natural disasters (ice disasters, fires, tornadoes, etc.), human factors, and other reasons (line aging, equipment aging, natural erosion, etc.). For example, the power supply abnormal node may be a substation. In practical applications, the power supply abnormal node may also be named a disaster accident point.

[0057] In the specific implementation, when the power supply abnormality node cannot supply electricity due to natural disasters, human factors and other reasons, in order to repair the power supply abnormality node, the power supply abnormality node needs to request to obtain the emergency repair resources used to repair the power supply abnormality node. For example, after an emergency power repair event occurs, the power supply abnormality node first performs statistics to count how many power materials are needed and what types, etc. After the statistics are completed, the emergency demand for power materials (i.e., emergency repair resource demand information) is published to the blockchain through the server. In actual applications, the power supply abnormality node can send an emergency repair resource acquisition request to the server based on the emergency repair resource demand. After receiving the emergency repair resource acquisition request, the server responds to the emergency repair resource acquisition request and determines the emergency repair resource demand information submitted by the power supply abnormality node.

[0058] Step S220, read the emergency repair resource supply information pre-uploaded by each emergency repair resource supplier from the target blockchain, and determine the emergency repair resources to be matched for the power supply abnormality node according to the emergency repair resource supply information and the emergency repair resource demand information; wherein each emergency repair resource supplier has a material supply weight corresponding to the resource supply attribute; the resource supply attribute includes the resource consumption quantity corresponding to the execution of the resource transfer operation, the resource transfer distance and the resource transfer time limit.

[0059] The emergency repair resource supply end may refer to a terminal where a user account supplying emergency repair resources is located. In practical applications, the emergency repair resource supply end may include a terminal where a user account of a warehouse is located (i.e., a resource warehouse end), and may also include a terminal where a user account of a supplier is located (i.e., a resource supplier end).

[0060] Among them, each emergency repair resource supply end has a material supply weight corresponding to the resource supply attribute. The resource supply attribute may include the resource consumption quantity, resource transfer distance and resource transfer timeliness corresponding to the resource transfer operation. For example, in the process of emergency repair resource matching, the quantity, distance, timeliness and other attributes of the emergency materials of the supplier (supplier, warehouse) are all attributes that need to be considered, but the proportion of material attributes is different. The quantity of materials may be a hard requirement, or the timeliness of materials may be a hard requirement. As shown in formula (1), for the demand side (disaster accident point), to maximize the benefits, a weight is set for each material attribute.

[0061] B:max[α1Num(b i )+α2D(b i )+...+α m T(b i )] (1)

[0062] Among them, α is the weight coefficient, and different material attributes have different weights; b i represents the materials of supplier i, then Num(b i ) represents the quantity attribute of the i-th material of the supplier, D(b i ) represents the distance attribute of the seller i’s goods, T(b i ) represents the timeliness attribute of the seller i’s materials, which are all attributes that need to be considered in the supply of power emergency materials.

[0063] In the specific implementation, the server can also read the emergency repair resource supply information pre-uploaded by each emergency repair resource supplier from the target blockchain, and determine the emergency repair resources to be matched for the power supply abnormality node based on the emergency repair resource supply information and the emergency repair resource demand information (that is, the emergency repair resources that can be supplied by each emergency repair resource supplier and meet the emergency repair resource demand of the power supply abnormality node).

[0064] Step S230, performing resource matching processing on the emergency repair resources to be matched according to the material matching weights of each emergency repair resource supplier to obtain a resource matching result; the resource matching result includes the amount of emergency repair resources transferred by each emergency repair resource supplier to the power supply abnormality node.

[0065] In the specific implementation, the server performs resource matching processing on the emergency repair resources to be matched according to the material matching weights of each emergency repair resource supplier to obtain a resource matching result; the resource matching result includes the amount of emergency repair resources transferred by each emergency repair resource supplier to the power supply abnormality node.

[0066] For example, the server can perform resource matching processing on the emergency repair resources to be matched according to the preset power emergency material matching algorithm and use the material matching weights of each emergency repair resource supply end to obtain a resource matching result; the resource matching result includes the amount of emergency repair resources transferred by each emergency repair resource supply end to the power supply abnormality node.

[0067] Step S240: updating the material matching weights of each emergency repair resource supplier according to the resource matching result.

[0068] Step S250, returns to the step of performing resource matching processing on the emergency repair resources to be matched according to the material matching weights of each emergency repair resource supply end, and obtaining the resource matching result, until the target resource matching result is obtained; wherein, the resource consumption quantity, resource transfer distance and resource transfer time of the resource transfer operation corresponding to the target resource matching result meet the preset conditions.

[0069] In specific implementation, since it is difficult to directly achieve perfect matching of power materials during the emergency material matching process, the so-called perfect matching can mean that as long as the materials of a warehouse or a supplier can meet the requirements of quantity, distance and timeliness.

[0070] Therefore, the server needs to execute the matching algorithm multiple times. After each match is completed, the server can update the material matching weights of each emergency repair resource supply end according to the resource matching results. For example, if the server determines that some attributes are not taken into consideration, the weight of each material attribute will be reset. For example, if a power emergency material can be delivered within the specified time, but the quantity is insufficient, the next batch of materials can be delivered at a later time, and the weight of the timeliness attribute will be reduced. The server only adjusts the weight for the disaster accident point after each match, and the matching process is completed by the blockchain system. After each match is completed through the precise matching smart contract, the matching result chain smart contract is called to chain the matching result and save it on the blockchain until the target resource matching result is obtained; that is, the resource consumption quantity, resource transfer distance and resource transfer time after executing the resource transfer operation corresponding to the target resource matching result meet the preset conditions. For example, each emergency repair resource supply end can transfer a specified number of emergency repair resources to the power supply abnormality node within the specified time.

[0071] To facilitate the understanding of those skilled in the art, Figure 3 An application scenario diagram of a power repair resource allocation method based on smart contracts is provided. Figure 3As shown in the figure, when supplying power emergency materials, it will be affected by many attributes, such as distance, quantity of materials, price, etc. Therefore, when supplying power emergency materials, a fast, efficient and reasonable matching method is needed to ensure that power emergency materials can be fully supplied. Among them, suppliers and warehouses will upload their own power emergency material data to the blockchain through the emergency material data chain smart contract. After the power emergency repair incident occurs, the power accident site will first conduct statistics on how many power materials are needed and what types, etc. After the statistics are completed, the emergency demand for power materials will be published on the blockchain. At this time, the system accurately matches the power materials by running the power emergency material precise matching algorithm. After completing the matching of power emergency materials, the supplier needs to pay a fee, which will be settled after the power emergency repair process is completed through the transaction settlement smart contract. After the power emergency process is completed, the contribution of each warehouse is analyzed using the gray correlation analysis method, and then the contribution settlement smart contract is called to complete the reward for the warehouse.

[0072] In the above-mentioned power emergency repair resource allocation method based on smart contract, the emergency repair resource demand information of the power supply abnormality node is determined by responding to the emergency repair resource acquisition request for the power supply abnormality node; the emergency repair resource supply information pre-uploaded by each emergency repair resource supply end is read from the target blockchain, and the emergency repair resources to be matched for the power supply abnormality node are determined according to the emergency repair resource supply information and the emergency repair resource demand information; wherein each emergency repair resource supply end has a material supply weight corresponding to the resource supply attribute; the resource supply attribute includes the resource consumption quantity, resource transfer distance and resource transfer time corresponding to the execution of the resource transfer operation; according to the material matching weight of each emergency repair resource supply end, the emergency repair resources to be matched are processed to obtain the resource matching result; the resource matching result includes the material matching weight of each emergency repair resource supply end for the power supply abnormality node The amount of emergency repair resources transferred at the point; according to the resource matching result, the material matching weight of each emergency repair resource supply end is updated; according to the material matching weight of each emergency repair resource supply end, the resource matching processing is performed on the emergency repair resources to be matched to obtain the resource matching result, until the target resource matching result is obtained; wherein, the resource consumption quantity, resource transfer distance and resource transfer time of the resource transfer operation corresponding to the target resource matching result meet the preset conditions; in this way, the material matching weights corresponding to each emergency repair resource supply end are dynamically adjusted by using the resource matching result, until the target resource matching result whose resource consumption quantity, resource transfer distance and resource transfer time meet the preset conditions is obtained, thereby realizing the accurate on-demand matching of emergency repair resources and improving the efficiency of power emergency material supply.

[0073] In another embodiment, the method also includes: determining the target emergency repair resource transfer amount of each emergency repair resource supplier to the abnormal power supply node according to the target resource matching result; sending an emergency repair resource transfer instruction to each emergency repair resource supplier according to the target emergency repair resource transfer amount corresponding to each emergency repair resource supplier; the emergency repair resource transfer instruction is used to instruct each emergency repair resource supplier to transfer the emergency repair resources to the abnormal power supply node according to the corresponding target emergency repair resource transfer amount.

[0074] In a specific implementation, the server can determine the target emergency resource transfer amount of each emergency resource supply end to the power supply abnormality node according to the target resource matching result. Then, the server sends an emergency resource transfer instruction to each emergency resource supply end according to the target emergency resource transfer amount corresponding to each emergency resource supply end, so as to instruct each emergency resource supply end to transfer the emergency resource to the power supply abnormality node according to the corresponding target emergency resource transfer amount.

[0075] The technical solution of this embodiment determines the target emergency repair resource transfer amount of each emergency repair resource supply end to the power supply abnormality node according to the target resource matching result, and sends an emergency repair resource transfer instruction to each emergency repair resource supply end according to the target emergency repair resource transfer amount corresponding to each emergency repair resource supply end, thereby accurately instructing each emergency repair resource supply end to transfer the emergency repair resources to the power supply abnormality node according to the corresponding target emergency repair resource transfer amount.

[0076] In another embodiment, if the emergency repair resource supply end is a resource supplier end, after the step of sending an emergency repair resource transfer instruction to each emergency repair resource supply end according to the target emergency repair resource transfer amount corresponding to each emergency repair resource supply end, the method also includes: determining the virtual resource transfer amount of the abnormal power supply node to the emergency repair resource supply end according to the target emergency repair resource transfer amount of the emergency repair resource supply end for the abnormal power supply node; transferring the virtual resources to the virtual resource account corresponding to the emergency repair resource supply end according to the virtual resource transfer amount, and deducting the virtual resources in the virtual resource account corresponding to the abnormal power supply node according to the virtual resource transfer amount.

[0077] After completing the matching of power emergency materials, a fee needs to be paid to the supplier. This fee will be settled after the power emergency repair process is completed through the transaction settlement smart contract. Specifically, if the emergency repair resource supply end is the resource supplier end, after the server sends the emergency repair resource transfer instruction to each emergency repair resource supply end according to the target emergency repair resource transfer amount corresponding to each emergency repair resource supply end, the server can also determine the virtual resource transfer amount of the power supply abnormal node to the emergency repair resource supply end according to the target emergency repair resource transfer amount of the power supply abnormal node by the emergency repair resource supply end; according to the virtual resource transfer amount, the virtual resources are transferred to the virtual resource account corresponding to the emergency repair resource supply end, and according to the virtual resource transfer amount, the virtual resources in the virtual resource account corresponding to the power supply abnormal node are deducted.

[0078] The technical solution of this embodiment determines the virtual resource transfer amount of the abnormal power supply node to the emergency repair resource supply end according to the target emergency repair resource transfer amount of the emergency repair resource supply end to the abnormal power supply node, and transfers the virtual resources to the virtual resource account corresponding to the emergency repair resource supply end according to the virtual resource transfer amount, and deducts the virtual resources in the virtual resource account corresponding to the abnormal power supply node according to the virtual resource transfer amount, thereby improving the utilization rate of virtual resources.

[0079] In another embodiment, if the emergency repair resource supply end is a resource warehouse end, after the step of sending an emergency repair resource transfer instruction to each emergency repair resource supply end according to the target emergency repair resource transfer amount corresponding to each emergency repair resource supply end, the method also includes: obtaining the resource transfer contribution of each emergency repair resource supply end in the target resource matching result; the resource transfer contribution value is used to characterize the degree of resource transfer of each emergency repair resource supply end in the target resource matching result; according to the resource transfer contribution of each emergency repair resource supply end, a virtual resource reward amount for each emergency repair resource supply end is generated; according to the virtual resource reward amount, the virtual resources are transferred to the virtual resource account corresponding to the emergency repair resource supply end.

[0080] Among them, the correlation coefficient between the virtual resources transferred from the emergency repair resource supply end to the power supply abnormality node and the emergency repair resources to be matched is obtained; according to the correlation coefficient of each emergency repair resource supply end, the resource transfer contribution of each emergency repair resource supply end in the target resource matching result is determined.

[0081] In the specific implementation, the server downloads the matching result data stored on the smart contract call chain through the matching result. For each supplier, several types of emergency power supplies will be provided, uniformly represented by vectors, such as X i =(x i,1 ,x i,2 ...,x i,n ) identifies the i-th supplier, and the x i,m represents the mth type of goods of the ith supplier. In this application, we call it an index. By combining all the warehouses, we can get an index matrix (x i,j ) n×m , as shown below:

[0082]

[0083] Sub-step 1: Determine the reference indicator sequence. The reference indicator sequence is a comparison standard. By using the reference indicator sequence, the contribution of a warehouse can be measured, so as to issue rewards. This application scheme selects the lowest value of each indicator to form a reference sequence, which is recorded as:

[0084] X'0=(x'0(1),x'0(2),...,x'0(j),...,x'0(m))(3)

[0085] Where x'0(j) is the minimum value of index j.

[0086] Sub-step 2: Since the physical meaning of each indicator is different for different warehouses, it is not easy to compare the data, or it is difficult to get the correct conclusion when comparing. Therefore, when performing grey correlation analysis, data normalization is generally required. Calculate the absolute difference between the corresponding elements of each evaluated warehouse indicator sequence and the reference sequence one by one.

[0087] That is: |X i -X0′|(i=1,2,…,n)(4)

[0088] Sub-step 3: Find the maximum value by the following two formulas

[0089]

[0090]

[0091] Sub-step 4: Calculate the correlation coefficient

[0092] The correlation coefficient between each warehouse index sequence and the corresponding element of the reference sequence is calculated by formula (7):

[0093]

[0094] Where ρ is the resolution coefficient 0<ρ<1. The smaller ρ is, the greater the difference between the correlation coefficients is, and the stronger the discrimination ability is. In this application, ρ is set to 0.5.

[0095] Sub-step 5: Calculate the contribution correlation of each warehouse

[0096]

[0097] Among them, n is the total number of warehouses that participated in the power emergency material supply matching and were successfully matched.

[0098] Sub-step 6: Calculate the contribution and revenue of each warehouse

[0099] According to formula (9), the contribution of each warehouse is calculated:

[0100]

[0101] The rewards for each warehouse are:

[0102]

[0103] Among them, Benefit i Represents the reward of warehouse i; Bonus total Expressed as the total reward.

[0104] Through the above steps, the correlation between all indicators and the contribution of each warehouse is comprehensively considered, the contribution of the warehouse can be calculated fairly and reasonable rewards can be distributed.

[0105] In another embodiment, before responding to a request for obtaining emergency repair resources for a power supply abnormality node and determining the emergency repair resource demand information of the power supply abnormality node, the method also includes: receiving initial emergency repair resource supply data sent by each emergency repair resource supplier; performing data preprocessing on the initial emergency repair resource supply data to obtain emergency repair resource supply information; the data format of the emergency repair resource supply information meets preset conditions; and uploading the emergency repair resource supply information corresponding to each emergency repair resource supplier to the target blockchain.

[0106] To facilitate the understanding of those skilled in the art, Figure 4 Provides a chain map of emergency repair resources. Figure 4 As described, after the server responds to the emergency repair resource acquisition request for the power supply abnormality node and determines the emergency repair resource demand information of the power supply abnormality node, the server can also receive the initial emergency repair resource supply data sent by each emergency repair resource supplier; then, the server performs data preprocessing on the initial emergency repair resource supply data so that the data format of the obtained emergency repair resource supply information meets the preset conditions; finally, the server uploads the emergency repair resource supply information corresponding to each emergency repair resource supplier to the target blockchain through the emergency material data chain smart contract.

[0107] The technical solution of this embodiment realizes data preprocessing before uploading the emergency repair resource supply data to the chain, thereby realizing standardized processing of the emergency repair resource supply data, improving the subsequent processing efficiency of the emergency repair resource supply data by the server, and improving the allocation efficiency of emergency repair resources.

[0108] In another embodiment, data preprocessing is performed on initial emergency repair resource supply data to obtain emergency repair resource supply information, including: data cleaning processing is performed on the initial emergency repair resource supply information to obtain cleaned data; the cleaned data has a preset data format; data classification processing is performed on the cleaned data to obtain classified data; the classified data includes data obtained after classifying the cleaned data according to different emergency repair resource types; data supplementation processing is performed on missing data in the classified data to obtain supplemented data as emergency repair resource supply information.

[0109] In the specific implementation, suppliers and warehouses will upload their own power emergency material data to the blockchain through the emergency material data chain smart contract. In the process of data uploading, the data is not directly uploaded to the blockchain from the warehouse or supplier's local database. The directly uploaded data will be more complicated and the data format is not uniform. In the process of power material supply, if the power material data format is not uniform and messy, it will take a long time to match in the process of accurate matching, and may even cause matching failure, resulting in slow power material supply and failure to complete power repair in time. When the power emergency material data is uploaded to the chain, the data is first processed. The purpose is to unify the data format, classify the materials, etc., so that the matching can be completed quickly when the materials are accurately matched in the future. The data includes the quantity of materials, the price of materials (the supplier will upload the price, and the materials in the warehouse have no price), the storage location of materials, and the timeliness of materials.

[0110] The technical solution of this embodiment performs data cleaning processing on the initial emergency repair resource supply information to obtain cleaned data; the cleaned data has a preset data format; the cleaned data is classified to obtain classified data; the classified data includes data obtained by classifying the cleaned data according to different emergency repair resource types; the missing data in the classified data is supplemented to obtain supplemented data as the emergency repair resource supply information, thereby realizing standardized processing of the emergency repair resource supply data, improving the subsequent processing efficiency of the server on the emergency repair resource supply data, and improving the allocation efficiency of emergency repair resources.

[0111] To facilitate the understanding of those skilled in the art, Figure 5 A system framework diagram of a power repair resource allocation method based on smart contracts is provided. Figure 5 The above mentioned includes application layer, blockchain layer, data layer, and related entities, which are described as follows:

[0112] The involved entities are all entities involved in the supply process of power emergency materials, including warehouses, suppliers, and disaster accident sites. The warehouse is a power emergency material warehouse, which stores power emergency materials. When a power accident occurs, materials can be called from the warehouse to ensure the supply of power emergency materials and reduce the problem of slow power repairs caused by insufficient material supply; suppliers are power emergency material suppliers. When there is a shortage of power materials in the warehouse, or the required power emergency materials are not available in the warehouse, it is necessary to purchase from the supplier in a timely manner to meet the supply of power emergency materials; disaster accident sites are places where power cannot be supplied due to natural disasters (ice disasters, fires, tornadoes, etc.), human factors and other reasons (aging of lines, aging of equipment, natural erosion, etc.), such as substations.

[0113] The data layer is responsible for data organization, including data cleaning, data classification, and data supplementation. Data cleaning is for the purpose of unifying the data format. When suppliers and warehouses upload their own material data, due to the inconsistency of their own data formats, it will take a lot of time to match the subsequent power material supply; data classification is to classify data according to different materials. Different warehouses and suppliers will have different emergency materials, which need to be classified, and further classification of the data of these materials; data supplementation is also aimed at the inconsistency of data formats between suppliers and warehouses, and the missing parts of the data need to be supplemented to ensure data consistency.

[0114] The blockchain layer provides blockchain service support for the supply of power emergency materials, including smart contracts, distributed storage and incentive systems. This application involves multiple smart contracts, such as smart contracts for emergency material data on-chain, smart contracts for precise matching, smart contracts for matching results on-chain, smart contracts for transaction settlement, smart contracts for contribution settlement, etc. Smart contracts are used to improve the efficiency of power emergency material supply, speed up the supply of power stamped materials, and enable accidents to be repaired faster; the incentive system is prepared for warehouses. After completing the power emergency material supply chain, the power grid company will reward the warehouses and complete the rewards through the incentive system;

[0115] The business layer is to complete the business related to the supply of power emergency materials, including precise matching module, interest settlement and process traceability. The precise matching module is an algorithm adopted when the disaster accident site needs to purchase materials from suppliers or call for materials from the warehouse when a power accident occurs, to ensure the supply of materials; the interest settlement module is to pay the supplier for the materials after the supply of power emergency materials is completed, and the payment is completed using the interest settlement module; the process traceability module is to complete the full process of evidence storage and traceability of the entire process of power emergency material supply.

[0116] In another embodiment, Figure 6 As shown in the figure, a method for allocating power repair resources based on smart contracts is provided. Figure 1 The server in the example is used to illustrate the following steps:

[0117] Step S610: In response to a request for obtaining emergency repair resources for a node with abnormal power supply, emergency repair resource demand information of the node with abnormal power supply is determined.

[0118] Step S620, read the emergency repair resource supply information pre-uploaded by each emergency repair resource supplier from the target blockchain, and determine the emergency repair resources to be matched for the power supply abnormality node according to the emergency repair resource supply information and the emergency repair resource demand information; wherein each of the emergency repair resource suppliers has a material supply weight corresponding to the resource supply attribute; the resource supply attribute includes the resource consumption quantity corresponding to the execution of the resource transfer operation, the resource transfer distance and the resource transfer time limit.

[0119] Step S630, performing resource matching processing on the emergency repair resources to be matched according to the material matching weights of each of the emergency repair resource suppliers to obtain a resource matching result; the resource matching result includes the amount of emergency repair resource transfer from each of the emergency repair resource suppliers to the power supply abnormality node.

[0120] Step S640: updating the material matching weight of each of the emergency repair resource suppliers according to the resource matching result.

[0121] Step S650, returns to the step of performing resource matching processing on the emergency repair resources to be matched according to the material matching weights of each of the emergency repair resource suppliers, and obtaining resource matching results, until the target resource matching result is obtained; wherein the resource consumption quantity, resource transfer distance and resource transfer time of the resource transfer operation corresponding to the target resource matching result meet the preset conditions.

[0122] Step S660: Determine the target emergency resource transfer amount of each emergency resource supplier to the power supply abnormality node according to the target resource matching result.

[0123] Step S670, sending an emergency repair resource transfer instruction to each of the emergency repair resource supply ends according to the target emergency repair resource transfer amount corresponding to each of the emergency repair resource supply ends; the emergency repair resource transfer instruction is used to instruct each of the emergency repair resource supply ends to transfer the emergency repair resources to the power supply abnormality node according to the corresponding target emergency repair resource transfer amount.

[0124] It should be noted that the specific limitations of the above steps can be found in the specific limitations of a method for allocating power emergency repair resources based on smart contracts mentioned above.

[0125] It should be understood that although Figure 2 and Figure 6 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2 and Figure 6At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.

[0126] In one embodiment, Figure 7 As shown, a power emergency repair resource allocation device based on a smart contract is provided, comprising:

[0127] A response module 710 is used to respond to a request for obtaining emergency repair resources for a power supply abnormality node and determine emergency repair resource demand information for the power supply abnormality node;

[0128] The determination module 720 is used to read the emergency repair resource supply information pre-uploaded by each emergency repair resource supply end from the target blockchain, and determine the emergency repair resources to be matched for the power supply abnormality node according to the emergency repair resource supply information and the emergency repair resource demand information; wherein each of the emergency repair resource supply ends has a material supply weight corresponding to the resource supply attribute; the resource supply attribute includes the resource consumption quantity corresponding to the resource transfer operation, the resource transfer distance and the resource transfer time limit;

[0129] The matching module 730 is used to perform resource matching processing on the emergency repair resources to be matched according to the material matching weights of each of the emergency repair resource suppliers to obtain a resource matching result; the resource matching result includes the amount of emergency repair resource transfer from each of the emergency repair resource suppliers to the power supply abnormality node;

[0130] An updating module 740 is used to update the material matching weight of each of the emergency repair resource supply ends according to the resource matching result;

[0131] The return module 750 is used to return to the matching module until a target resource matching result is obtained; wherein the resource consumption quantity, resource transfer distance and resource transfer time of executing the resource transfer operation corresponding to the target resource matching result meet preset conditions.

[0132] In one of the embodiments, the device also includes: an emergency repair resource determination module, which is used to determine the target emergency repair resource transfer amount of each of the emergency repair resource suppliers to the power supply abnormality node according to the target resource matching result; a sending module, which is used to send an emergency repair resource transfer instruction to each of the emergency repair resource suppliers according to the target emergency repair resource transfer amount corresponding to each of the emergency repair resource suppliers; the emergency repair resource transfer instruction is used to instruct each of the emergency repair resource suppliers to transfer the emergency repair resources to the power supply abnormality node according to the corresponding target emergency repair resource transfer amount.

[0133] In one of the embodiments, if the emergency repair resource supply end is a resource supplier end, the device also includes: a virtual resource determination module, which is used to determine the virtual resource transfer amount of the power supply abnormality node to the emergency repair resource supply end according to the target emergency repair resource transfer amount of the emergency repair resource supply end to the power supply abnormality node; a first transfer module, which is used to transfer the virtual resources to the virtual resource account corresponding to the emergency repair resource supply end according to the virtual resource transfer amount, and deduct the virtual resources in the virtual resource account corresponding to the power supply abnormality node according to the virtual resource transfer amount.

[0134] In one of the embodiments, if the emergency repair resource supply end is a resource warehouse end, the device also includes: a contribution determination module, used to obtain the resource transfer contribution of each of the emergency repair resource supply ends in the target resource matching result; the resource transfer contribution value is used to characterize the degree of resource transfer of each of the emergency repair resource supply ends in the target resource matching result; a generation module, used to generate a virtual resource reward amount for each of the emergency repair resource supply ends according to the resource transfer contribution of each of the emergency repair resource supply ends; a second transfer module, used to transfer the virtual resources to the virtual resource account corresponding to the emergency repair resource supply end according to the virtual resource reward amount.

[0135] In one of the embodiments, the contribution determination module is specifically used to obtain the correlation coefficient between the virtual resources transferred from the emergency repair resource supply end to the power supply abnormality node and the emergency repair resources to be matched; and determine the resource transfer contribution of each emergency repair resource supply end in the target resource matching result based on the correlation coefficient of each emergency repair resource supply end.

[0136] In one of the embodiments, the device also includes: a receiving module, used to receive the initial emergency repair resource supply data sent by each of the emergency repair resource supply ends; a preprocessing module, used to perform data preprocessing on the initial emergency repair resource supply data to obtain the emergency repair resource supply information; the data format of the emergency repair resource supply information meets the preset conditions; and an uploading module, used to upload the emergency repair resource supply information corresponding to each of the emergency repair resource supply ends to the target blockchain.

[0137] In one of the embodiments, the preprocessing module is also used to perform data cleaning processing on the initial emergency repair resource supply information to obtain cleaned data; the cleaned data has a preset data format; the cleaned data is classified to obtain classified data; the classified data includes data obtained after classifying the cleaned data according to different emergency repair resource types; the missing data in the classified data is supplemented to obtain supplemented data as the emergency repair resource supply information.

[0138] For the specific limitations of the power emergency repair resource allocation device based on smart contracts, please refer to the limitations of the power emergency repair resource allocation method based on smart contracts above, which will not be repeated here. Each module in the above-mentioned power emergency repair resource allocation device based on smart contracts can be implemented in whole or in part through software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0139] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 8 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data for executing a power repair resource allocation method based on a smart contract. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a power repair resource allocation method based on a smart contract is implemented.

[0140] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0141] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the above-mentioned method for allocating power emergency repair resources based on smart contracts. The steps of the method for allocating power emergency repair resources based on smart contracts here can be the steps of the method for allocating power emergency repair resources based on smart contracts in each of the above-mentioned embodiments.

[0142] In one embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the processor executes the steps of the above-mentioned method for allocating power repair resources based on smart contracts. The steps of the method for allocating power repair resources based on smart contracts here can be the steps of the method for allocating power repair resources based on smart contracts in each of the above-mentioned embodiments.

[0143] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0144] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0145] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A method for allocating power repair resources based on smart contracts, characterized in that: include: In response to a request for obtaining emergency repair resources for a node with abnormal power supply, determining emergency repair resource demand information for the node with abnormal power supply; Read the emergency repair resource supply information pre-uploaded by each emergency repair resource supplier from the target blockchain, and determine the emergency repair resources to be matched for the power supply abnormality node according to the emergency repair resource supply information and the emergency repair resource demand information; wherein each of the emergency repair resource suppliers has a material matching weight corresponding to the resource supply attribute; the resource supply attribute includes the resource consumption quantity, resource transfer distance and resource transfer time corresponding to the resource transfer operation; According to the material matching weights of the emergency repair resource suppliers, resource matching processing is performed on the emergency repair resources to be matched to obtain a resource matching result; the resource matching result includes the target emergency repair resource transfer amount of each emergency repair resource supplier to the power supply abnormality node; According to the resource matching result, the material matching weight of each of the emergency repair resource supply ends is updated; Returning to the step of performing resource matching processing on the emergency repair resources to be matched according to the material matching weights of each of the emergency repair resource supply ends to obtain a resource matching result, until a target resource matching result is obtained; wherein the resource consumption quantity, resource transfer distance and resource transfer time efficiency of executing the resource transfer operation corresponding to the target resource matching result meet preset conditions; Determine, according to the target resource matching result, the target emergency repair resource transfer amount of each emergency repair resource supplier to the power supply abnormality node; According to the target emergency repair resource transfer amount corresponding to each of the emergency repair resource supply ends, an emergency repair resource transfer instruction is sent to each of the emergency repair resource supply ends; the emergency repair resource transfer instruction is used to instruct each of the emergency repair resource supply ends to transfer the emergency repair resources to the power supply abnormality node according to the corresponding target emergency repair resource transfer amount; If the emergency repair resource supply end is a resource supplier end, then according to the target emergency repair resource transfer amount of the emergency repair resource supply end to the power supply abnormality node, the virtual resource transfer amount of the power supply abnormality node to the emergency repair resource supply end is determined; According to the virtual resource transfer amount, the virtual resources are transferred to the virtual resource account corresponding to the emergency repair resource supply end, and according to the virtual resource transfer amount, the virtual resources in the virtual resource account corresponding to the power supply abnormality node are deducted.

2. The method according to claim 1, characterized in that If the emergency repair resource supply end is a resource storage warehouse end, after the step of sending an emergency repair resource transfer instruction to each of the emergency repair resource supply ends according to the target emergency repair resource transfer amount corresponding to each of the emergency repair resource supply ends, the method further includes: Obtaining the resource transfer contribution of each of the emergency repair resource suppliers in the target resource matching result; the resource transfer contribution is used to characterize the degree of resource transfer of each of the emergency repair resource suppliers in the target resource matching result; Generating a virtual resource reward amount for each of the emergency repair resource suppliers according to the resource transfer contribution of each of the emergency repair resource suppliers; According to the virtual resource reward amount, the virtual resources are transferred to the virtual resource account corresponding to the emergency repair resource supplier.

3. The method according to claim 2, characterized in that The obtaining of the resource transfer contribution of each of the emergency repair resource suppliers in the target resource matching result includes: Obtaining a correlation coefficient between the virtual resource transferred from the emergency repair resource supply end to the power supply abnormality node and the emergency repair resource to be matched; According to the correlation coefficient of each of the emergency repair resource supply ends, the resource transfer contribution of each of the emergency repair resource supply ends in the target resource matching result is determined.

4. The method according to claim 1, characterized in that Before the step of determining the emergency repair resource demand information of the abnormal power supply node in response to the emergency repair resource acquisition request for the abnormal power supply node, the method further includes: Receiving initial emergency repair resource supply data sent by each of the emergency repair resource supply terminals; Performing data preprocessing on the initial emergency repair resource supply data to obtain the emergency repair resource supply information; the data format of the emergency repair resource supply information meets the preset conditions; The emergency repair resource supply information corresponding to each of the emergency repair resource supply ends is uploaded to the target blockchain.

5. The method according to claim 4, characterized in that The performing data preprocessing on the initial emergency repair resource supply data to obtain the emergency repair resource supply information includes: Performing data cleaning processing on the initial emergency repair resource supply information to obtain cleaned data; the cleaned data has a preset data format; Performing data classification processing on the cleaned data to obtain classified data; the classified data includes data obtained by classifying the cleaned data according to different emergency repair resource types; Data complement processing is performed on the missing data in the classified data to obtain complemented data as the emergency repair resource supply information.

6. A power repair resource allocation device based on smart contracts, characterized in that: The device comprises: A response module, configured to respond to a request for obtaining emergency repair resources for a power supply abnormality node and determine emergency repair resource demand information for the power supply abnormality node; A determination module is used to read the emergency repair resource supply information pre-uploaded by each emergency repair resource supply end from the target blockchain, and determine the emergency repair resources to be matched for the power supply abnormality node according to the emergency repair resource supply information and the emergency repair resource demand information; wherein each of the emergency repair resource supply ends has a material matching weight corresponding to the resource supply attribute; the resource supply attribute includes the resource consumption quantity, resource transfer distance and resource transfer time corresponding to the execution of the resource transfer operation; A matching module, used to perform resource matching processing on the emergency repair resources to be matched according to the material matching weights of each of the emergency repair resource suppliers, to obtain a resource matching result; the resource matching result includes a target emergency repair resource transfer amount of each of the emergency repair resource suppliers to the power supply abnormality node; An updating module, used for updating the material matching weights of each of the emergency repair resource supply ends according to the resource matching results; A return module, used to return to the matching module until a target resource matching result is obtained; wherein the resource consumption quantity, resource transfer distance and resource transfer time efficiency of executing the resource transfer operation corresponding to the target resource matching result meet preset conditions; The device further comprises: a repair resource determination module, which is used to determine the target repair resource transfer amount of each of the repair resource supply ends to the power supply abnormality node according to the target resource matching result; a sending module, which is used to send a repair resource transfer instruction to each of the repair resource supply ends according to the target repair resource transfer amount corresponding to each of the repair resource supply ends; the repair resource transfer instruction is used to instruct each of the repair resource supply ends to transfer the repair resources to the power supply abnormality node according to the corresponding target repair resource transfer amount; If the emergency repair resource supply end is a resource supplier end, the device also includes: a virtual resource determination module, which is used to determine the virtual resource transfer amount of the abnormal power supply node to the emergency repair resource supply end according to the target emergency repair resource transfer amount of the emergency repair resource supply end to the abnormal power supply node; a first transfer module, which is used to transfer the virtual resources to the virtual resource account corresponding to the emergency repair resource supply end according to the virtual resource transfer amount, and deduct the virtual resources in the virtual resource account corresponding to the abnormal power supply node according to the virtual resource transfer amount.

7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Deployment information generation method and device, computer device and storage medium

    CN109754095A

  • Flood prevention and typhoon prevention commanding and dispatching method and system based on blockchain, and service terminal

    CN112396327A

  • Resource management method and device, computer equipment and storage medium

    CN112580911A

  • Allocating virtual resource based on block chain

    US20200177519A1