[go: up one dir, main page]

CN113971504B - Intelligent contract-based power rush-repair resource allocation method, device and equipment - Google Patents

Intelligent contract-based power rush-repair resource allocation method, device and equipment Download PDF

Info

Publication number
CN113971504B
CN113971504B CN202111082040.1A CN202111082040A CN113971504B CN 113971504 B CN113971504 B CN 113971504B CN 202111082040 A CN202111082040 A CN 202111082040A CN 113971504 B CN113971504 B CN 113971504B
Authority
CN
China
Prior art keywords
resource
emergency repair
supply
emergency
repair resource
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111082040.1A
Other languages
Chinese (zh)
Other versions
CN113971504A (en
Inventor
林俊昌
邓兴华
李冉冉
周少丹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Southern Power Grid Supply Chain Group Co ltd
Original Assignee
China Southern Power Grid Materials Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Southern Power Grid Materials Co ltd filed Critical China Southern Power Grid Materials Co ltd
Priority to CN202111082040.1A priority Critical patent/CN113971504B/en
Publication of CN113971504A publication Critical patent/CN113971504A/en
Application granted granted Critical
Publication of CN113971504B publication Critical patent/CN113971504B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • G06Q10/06315Needs-based resource requirements planning or analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • G06Q10/06312Adjustment or analysis of established resource schedule, e.g. resource or task levelling, or dynamic rescheduling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/20Administration of product repair or maintenance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S10/00Systems supporting electrical power generation, transmission or distribution
    • Y04S10/50Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications

Landscapes

  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Engineering & Computer Science (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Marketing (AREA)
  • Tourism & Hospitality (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Quality & Reliability (AREA)
  • Operations Research (AREA)
  • Development Economics (AREA)
  • Health & Medical Sciences (AREA)
  • Educational Administration (AREA)
  • Game Theory and Decision Science (AREA)
  • Public Health (AREA)
  • Water Supply & Treatment (AREA)
  • Primary Health Care (AREA)
  • General Health & Medical Sciences (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application relates to an intelligent contract-based power rush-repair resource allocation method, device and equipment. The method comprises the following steps: responding to a repair resource acquisition request aiming at the power supply abnormal node, and determining repair resource demand information of the power supply abnormal node; the method comprises the steps of reading rush-repair resource supply information pre-uploaded by each rush-repair resource supply end from a target block chain, and determining to-be-matched rush-repair resources aiming at power supply abnormal nodes according to the rush-repair resource supply information and the rush-repair resource demand information; according to the material matching weight of each rush-repair resource supply end, carrying out resource matching treatment on the rush-repair resources to be matched to obtain a resource matching result; updating the material matching weight of each rush-repair resource supply end according to the resource matching result; and returning to the step of carrying out resource matching treatment on the to-be-matched rush-repair resources according to the material matching weight of each rush-repair resource supply end to obtain a resource matching result until a target resource matching result is obtained. The method can improve the efficiency of the first-aid repair resource allocation.

Description

基于智能合约的电力抢修资源分配方法、装置和设备Power emergency repair resource allocation method, device and equipment based on smart contract

技术领域Technical Field

本申请涉及电力抢修技术领域,特别是涉及一种基于智能合约的电力抢修资源分配方法、装置、计算机设备和存储介质。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

电力行业牵扯着国民经济的命脉,同时身为基础产业的它理应得到国家发展工业的重视。谈及电力行业,浮现脑海的便是安全二字。而电力供应是电力行业中重要一环,与国计民生有着莫大的联系。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.

由于自然灾害、外力破坏、人为误操作或设备超负荷运行等原因导致的电力事故,会造成地区性或者区域性的断电行为,电力是人们日常生活的重要组成部分,发生事故之后,在组织相关人员进行抢修的同时,其相应的物资、材料要同时到位。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.

现今的配电网灾后抢修资源分配工作,仍然停留在比较简单、依靠人工调度的状态,抢修资源分配效率较低。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

基于此,有必要针对上述技术问题,提供一种能够提高灾后抢修资源分配效率的基于智能合约的电力抢修资源分配方法、装置、计算机设备和存储介质。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.

一种基于智能合约的电力抢修资源分配方法,包括:A method for allocating power emergency repair resources based on smart contracts, comprising:

响应于针对供电异常节点的抢修资源获取请求,确定所述供电异常节点的抢修资源需求信息;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 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;

按照各所述抢修资源供应端的物资匹配权重,对所述待匹配抢修资源进行资源匹配处理,得到资源匹配结果;所述资源匹配结果包括各所述抢修资源供应端对所述供电异常节点的抢修资源转移量;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;

根据所述资源匹配结果,对各所述抢修资源供应端的物资匹配权重进行更新;According to the resource matching result, the material matching weight of each of the emergency repair resource supply ends is updated;

返回所述按照各所述抢修资源供应端的物资匹配权重,对所述待匹配抢修资源进行资源匹配处理,得到资源匹配结果的步骤,直至得到目标资源匹配结果;其中,执行所述目标资源匹配结果对应的资源转移操作的资源消耗数量、资源转移距离和资源转移时效满足预设条件。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.

在其中一个实施例中,所述方法还包括:In one embodiment, the method further comprises:

根据所述目标资源匹配结果,确定各所述抢修资源供应端对所述供电异常节点的目标抢修资源转移量;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.

在其中一个实施例中,若抢修资源供应端为资源供应商端,在所述按照各所述抢修资源供应端对应的目标抢修资源转移量,发送抢修资源转移指令至各所述抢修资源供应端的步骤之后,所述方法还包括: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:

根据所述抢修资源供应端对所述供电异常节点的目标抢修资源转移量,确定所述供电异常节点对所述抢修资源供应端的虚拟资源转移量;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;

按照所述虚拟资源转移量,将虚拟资源转移至所述抢修资源供应端对应的虚拟资源账户中,并按照所述虚拟资源转移量,扣除所述供电异常节点对应的虚拟资源账户中的虚拟资源。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.

在其中一个实施例中,若抢修资源供应端为资源仓储库端,在所述按照各所述抢修资源供应端对应的目标抢修资源转移量,发送抢修资源转移指令至各所述抢修资源供应端的步骤之后,所述方法还包括: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:

获取各所述抢修资源供应端在所述目标资源匹配结果中的资源转移贡献度;所述资源转移贡献值用于表征各所述抢修资源供应端在所述目标资源匹配结果中的资源转移程度;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;

根据各所述抢修资源供应端的资源转移贡献度,生成对各所述抢修资源供应端的虚拟资源奖励量;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.

在其中一个实施例中,所述获取各所述抢修资源供应端在所述目标资源匹配结果中的资源转移贡献值,包括:In one embodiment, obtaining the resource transfer contribution value 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.

在其中一个实施例中,在所述响应于针对供电异常节点的抢修资源获取请求,确定所述供电异常节点的抢修资源需求信息的步骤之前,所述方法还包括: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:

接收各所述抢修资源供应端发送的初始抢修资源供应数据;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.

在其中一个实施例中,所述对所述初始抢修资源供应数据进行数据预处理,得到所述抢修资源供应信息,包括:In one embodiment, the performing data preprocessing on the initial emergency repair resource supply data to obtain the emergency repair resource supply information includes:

对所述初始抢修资源供应信息进行数据清洗处理,得到清洗后数据;所述清先后数据具有预设的数据格式;Performing data cleaning 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.

一种基于智能合约的电力抢修资源分配装置,所述装置包括:A power repair resource allocation device based on smart contracts, the device comprising:

响应模块,用于响应于针对供电异常节点的抢修资源获取请求,确定所述供电异常节点的抢修资源需求信息;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 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;

匹配模块,用于按照各所述抢修资源供应端的物资匹配权重,对所述待匹配抢修资源进行资源匹配处理,得到资源匹配结果;所述资源匹配结果包括各所述抢修资源供应端对所述供电异常节点的抢修资源转移量;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;

更新模块,用于根据所述资源匹配结果,对各所述抢修资源供应端的物资匹配权重进行更新;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 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.

一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现上述的方法的步骤。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.

一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述的方法的步骤。A computer-readable storage medium stores a computer program, which implements the steps of the above method when executed by a processor.

上述基于智能合约的电力抢修资源分配方法、装置、计算机设备和存储介质,通过响应于针对供电异常节点的抢修资源获取请求,确定供电异常节点的抢修资源需求信息;从目标区块链中读取各抢修资源供应端预上传的抢修资源供应信息,并根据抢修资源供应信息和抢修资源需求信息,确定针对供电异常节点的待匹配抢修资源;其中,各抢修资源供应端具有与资源供应属性对应的物资供应权重;资源供应属性包括执行资源转移操作所对应的资源消耗数量、资源转移距离和资源转移时效;按照各抢修资源供应端的物资匹配权重,对待匹配抢修资源进行资源匹配处理,得到资源匹配结果;资源匹配结果包括各抢修资源供应端对供电异常节点的抢修资源转移量;根据资源匹配结果,对各抢修资源供应端的物资匹配权重进行更新;返回按照各抢修资源供应端的物资匹配权重,对待匹配抢修资源进行资源匹配处理,得到资源匹配结果的步骤,直至得到目标资源匹配结果;其中,执行目标资源匹配结果对应的资源转移操作的资源消耗数量、资源转移距离和资源转移时效满足预设条件;如此,通过利用资源匹配结果对各个抢修资源供应端对应的物资匹配权重进行动态调整,直至得到资源消耗数量、资源转移距离和资源转移时效满足预设条件的目标资源匹配结果,进而实现可以实现精准的完成抢修资源的按需匹配,提高了电力应急物资供应的效率。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

图1为一个实施例中一种基于智能合约的电力抢修资源分配方法的应用环境图;FIG1 is an application environment diagram of a method for allocating power repair resources based on a smart contract in one embodiment;

图2为一个实施例中一种基于智能合约的电力抢修资源分配方法的流程示意图;FIG2 is a flow chart of a method for allocating power repair resources based on a smart contract in one embodiment;

图3为一个实施例中一种基于智能合约的电力抢修资源分配方法的应用场景图;FIG3 is an application scenario diagram of a method for allocating power repair resources based on a smart contract in one embodiment;

图4为一个实施例中一种抢修资源的上链图;FIG4 is a diagram of a chain of emergency repair resources in one embodiment;

图5为一个实施例中一种基于智能合约的电力抢修资源分配方法的系统框架图;FIG5 is a system framework diagram of a method for allocating power repair resources based on a smart contract in one embodiment;

图6为另一个实施例中一种基于智能合约的电力抢修资源分配方法的流程示意图;FIG6 is a flow chart of a method for allocating power repair resources based on a smart contract in another embodiment;

图7为一个实施例中一种基于智能合约的电力抢修资源分配装置的结构框图;FIG7 is a structural block diagram of a power emergency repair resource allocation device based on a smart contract in one embodiment;

图8为一个实施例中计算机设备的内部结构图。FIG. 8 is a diagram showing the internal structure of a computer device in one embodiment.

具体实施方式DETAILED DESCRIPTION

为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。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.

本申请提供的一种基于智能合约的电力抢修资源分配方法,可以应用于如图1所示的应用环境中。其中,供电异常节点102与各抢修资源供应端104均通过网络与服务器106进行通信。其中,服务器106响应于针对供电异常节点102的抢修资源获取请求,确定供电异常节点102的抢修资源需求信息;服务器106从目标区块链中读取各抢修资源供应端104预上传的抢修资源供应信息,并根据抢修资源供应信息和抢修资源需求信息,确定针对供电异常节点102的待匹配抢修资源;其中,各抢修资源供应端104具有与资源供应属性对应的物资供应权重;资源供应属性包括执行资源转移操作所对应的资源消耗数量、资源转移距离和资源转移时效;服务器106按照各抢修资源供应端104的物资匹配权重,对待匹配抢修资源进行资源匹配处理,得到资源匹配结果;资源匹配结果包括各抢修资源供应端104对供电异常节点102的抢修资源转移量;服务器106根据资源匹配结果,对各抢修资源供应端104的物资匹配权重进行更新;服务器106返回按照各抢修资源供应端104的物资匹配权重,对待匹配抢修资源进行资源匹配处理,得到资源匹配结果的步骤,直至得到目标资源匹配结果;其中,执行目标资源匹配结果对应的资源转移操作的资源消耗数量、资源转移距离和资源转移时效满足预设条件。The present application provides a method for allocating power emergency repair resources based on smart contracts, which can be applied in the application environment shown in FIG1 . 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.

实际应用中,供电异常节点102与各抢修资源供应端104可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备,服务器106可以用独立的服务器或者是多个服务器组成的服务器集群来实现。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.

在一个实施例中,如图2所示,提供了一种基于智能合约的电力抢修资源分配方法,以该方法应用于图1中的服务器106为例进行说明,包括以下步骤:In one embodiment, as shown in FIG. 2 , a method for allocating power repair resources based on a smart contract is provided, which is described by taking the method applied to the server 106 in FIG. 1 as an example, and includes the following steps:

步骤S210,响应于针对供电异常节点的抢修资源获取请求,确定供电异常节点的抢修资源需求信息。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.

其中,抢修资源可以是用于维修供电异常节点的物资。Among them, the emergency repair resources may be materials used to repair nodes with abnormal power supply.

其中,供电异常节点可以是指由于自然灾害(冰灾、火灾、龙卷风等)、人为因素以及其他原因(线路老化、设备老化、自然侵蚀等)导致的电力无法供应的节点。举例来说,供电异常节点可以是变电站。实际应用中,供电异常节点也可以命名为灾害事故点。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.

具体实现中,当供电异常节点因自然灾害、人为因素以及其他原因导致的电力无法供应时,为了对供电异常节点进行修复,供电异常节点需要请求获取用于修复该供电异常节点的抢修资源。举例来说,发生电力应急抢修事件之后,供电异常节点先进行统计,统计需要多少电力物资,以及什么种类等,统计好之后,将电力物资应急需求(即抢修资源需求信息)通过服务器发布到区块链上。实际应用中,供电异常节点可以根据抢修资源需求,向服务器发送抢修资源获取请求。服务器在接收到该抢修资源获取请求后,响应于该抢修资源获取请求,确定该供电异常节点所提交的抢修资源需求信息。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.

步骤S220,从目标区块链中读取各抢修资源供应端预上传的抢修资源供应信息,并根据抢修资源供应信息和抢修资源需求信息,确定针对供电异常节点的待匹配抢修资源;其中,各抢修资源供应端具有与资源供应属性对应的物资供应权重;资源供应属性包括执行资源转移操作所对应的资源消耗数量、资源转移距离和资源转移时效。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.

其中,抢修资源供应端可以是指供应抢修资源的用户账户所在的终端。实际应用中,抢修资源供应端可以包括仓储库的用户账户所在的终端(即资源仓储库端),还可以包括供应商的用户账户所在的终端(即资源供应商端)。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).

其中,各抢修资源供应端具有与资源供应属性对应的物资供应权重。资源供应属性可以包括执行资源转移操作所对应的资源消耗数量、资源转移距离和资源转移时效。举例来说,在抢修资源匹配过程中供给方(供货商、仓储库)的应急物资数量、距离、时效等都是需要考虑的属性,但是物资属性比重有所不同,可能物资数量是硬性要求,也可能物资时效是硬性要求,如公式(1)所示,对于需求方(灾难事故点),要最大化效益,因此对每个物资属性都设置权重。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.

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

其中,α为权重系数,不同的物资属性有不同的权重;bi表示供给方i的物资,然后Num(bi)表示供给方i物资的数量属性,D(bi)表示卖方i物资的距离属性,T(bi)表示为卖方i物资的时效属性,均为在电力应急物资供应中需要的考虑的属性。Among them, α is the weight coefficient, and different material attributes have different weights; bi represents the materials of supplier i, then Num( bi ) represents the quantity attribute of supplier i's materials, D( bi ) represents the distance attribute of seller i's materials, and T( bi ) represents the timeliness attribute of seller i's materials, all of which are attributes that need to be considered in the supply of power emergency materials.

具体实现中,服务器还可以从目标区块链中读取各抢修资源供应端预上传的抢修资源供应信息,并根据抢修资源供应信息和抢修资源需求信息,确定针对供电异常节点的待匹配抢修资源(即各个抢修资源供应端所能供应的,且满足供电异常节点的抢修资源需求的抢修资源)。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).

步骤S230,按照各抢修资源供应端的物资匹配权重,对待匹配抢修资源进行资源匹配处理,得到资源匹配结果;资源匹配结果包括各抢修资源供应端对供电异常节点的抢修资源转移量。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.

具体实现中,服务器按照各抢修资源供应端的物资匹配权重,对待匹配抢修资源进行资源匹配处理,得到资源匹配结果;资源匹配结果包括各抢修资源供应端对供电异常节点的抢修资源转移量。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.

例如,服务器可以按照预设的电力应急物资匹配算法,利用各抢修资源供应端的物资匹配权重,对待匹配抢修资源进行资源匹配处理,得到资源匹配结果;资源匹配结果包括各抢修资源供应端对供电异常节点的抢修资源转移量。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.

步骤S240,根据资源匹配结果,对各抢修资源供应端的物资匹配权重进行更新。Step S240: updating the material matching weights of each emergency repair resource supplier according to the resource matching result.

步骤S250,返回按照各抢修资源供应端的物资匹配权重,对待匹配抢修资源进行资源匹配处理,得到资源匹配结果的步骤,直至得到目标资源匹配结果;其中,执行目标资源匹配结果对应的资源转移操作的资源消耗数量、资源转移距离和资源转移时效满足预设条件。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.

具体实现中,由于在应急物资匹配的过程中,电力物资很难能够直接的完成完美匹配,所谓完美匹配可以是指只要一个仓储库或者一个供应商的物资既能够满足数量上的要求,又能够满足距离上的要求,还满足时效性上的要求。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.

因此服务器需要执行多次匹配算法,服务器每完成一次匹配之后,服务器可以按照根据资源匹配结果,对各抢修资源供应端的物资匹配权重进行更新。例如,服务器确定一些属性就不被纳入考虑范围内了,则对每种物资属性的权重重新设置,如一种电力应急物资在规定时间内能够送过来,但是数量上来说不够,下一批物资可以以稍晚的时间送到,时效属性的权重将降低。服务器针对灾害事故点只在每次匹配之后调整权重,匹配过程由区块链系统完成。在每次通过精准匹配智能合约完成匹配之后,就开始调用匹配结果上链智能合约,将这次匹配结果上链,用在区块链上保存,直至得到目标资源匹配结果;即执行目标资源匹配结果对应的资源转移操作后的资源消耗数量、资源转移距离和资源转移时效满足预设条件。例如,各个抢修资源供应端可以将规定数量的抢修资源,在规定时间内转移到供电异常节点。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.

为了便于本领域技术人员的理解,图3提供了一种基于智能合约的电力抢修资源分配方法的应用场景图。如图3所示,在进行电力应急物资供应时,会受到诸多属性的影响,如距离、物资的数量、价格等,因此在进行电力应急物资供应的时候,需要一种快速、高效且合理的匹配方法,使得电力应急物资能够得到充分的供应。其中,供应商和仓储库将通过应急物资数据上链智能合约自己的拥有的电力应急物资数据上传到区块链。发生电力应急抢修事件之后,电力事故地先进行统计,统计需要多少电力物资,以及什么种类等,统计好之后,将电力物资应急需求发布到区块链上。此时系统通过运行电力应急物资精准匹配算法,对电力物资精准匹配。在完成电力应急物资的匹配之后,对于供应商,需要支付一笔费用,此费用当在电力应急抢修过程结束之后进行结算,通过交易结算智能合约。在电力应急过程结束之后,利用灰色关联分析法分析每个仓储库的贡献度,然后调用贡献度清算智能合约完成对仓储库进行奖励。In order to facilitate the understanding of those skilled in the art, FIG3 provides an application scenario diagram of a method for allocating power repair resources based on smart contracts. As shown in FIG3, 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 required so that power emergency materials can be fully supplied. Among them, suppliers and warehouses 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 to count 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, a fee needs to be paid to the supplier, and this fee 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 by the gray correlation analysis method, and then the contribution settlement smart contract is called to complete the reward for the warehouse.

上述基于智能合约的电力抢修资源分配方法中,通过响应于针对供电异常节点的抢修资源获取请求,确定供电异常节点的抢修资源需求信息;从目标区块链中读取各抢修资源供应端预上传的抢修资源供应信息,并根据抢修资源供应信息和抢修资源需求信息,确定针对供电异常节点的待匹配抢修资源;其中,各抢修资源供应端具有与资源供应属性对应的物资供应权重;资源供应属性包括执行资源转移操作所对应的资源消耗数量、资源转移距离和资源转移时效;按照各抢修资源供应端的物资匹配权重,对待匹配抢修资源进行资源匹配处理,得到资源匹配结果;资源匹配结果包括各抢修资源供应端对供电异常节点的抢修资源转移量;根据资源匹配结果,对各抢修资源供应端的物资匹配权重进行更新;返回按照各抢修资源供应端的物资匹配权重,对待匹配抢修资源进行资源匹配处理,得到资源匹配结果的步骤,直至得到目标资源匹配结果;其中,执行目标资源匹配结果对应的资源转移操作的资源消耗数量、资源转移距离和资源转移时效满足预设条件;如此,通过利用资源匹配结果对各个抢修资源供应端对应的物资匹配权重进行动态调整,直至得到资源消耗数量、资源转移距离和资源转移时效满足预设条件的目标资源匹配结果,进而实现可以实现精准的完成抢修资源的按需匹配,提高了电力应急物资供应的效率。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.

在另一个实施例中,方法还包括:根据目标资源匹配结果,确定各抢修资源供应端对供电异常节点的目标抢修资源转移量;按照各抢修资源供应端对应的目标抢修资源转移量,发送抢修资源转移指令至各抢修资源供应端;抢修资源转移指令用于指示各抢修资源供应端按照对应的目标抢修资源转移量将抢修资源转移至供电异常节点。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.

具体实现中,服务器可以根据目标资源匹配结果,确定各抢修资源供应端对供电异常节点的目标抢修资源转移量。然后,服务器按照各抢修资源供应端对应的目标抢修资源转移量,发送抢修资源转移指令至各抢修资源供应端,以指示各抢修资源供应端按照对应的目标抢修资源转移量将抢修资源转移至供电异常节点。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.

本实施例的技术方案,通过根据目标资源匹配结果,确定各抢修资源供应端对供电异常节点的目标抢修资源转移量,并按照各抢修资源供应端对应的目标抢修资源转移量,发送抢修资源转移指令至各抢修资源供应端,从而实现准确地指示各抢修资源供应端按照对应的目标抢修资源转移量将抢修资源转移至供电异常节点。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.

在另一个实施例中,若抢修资源供应端为资源供应商端,在按照各抢修资源供应端对应的目标抢修资源转移量,发送抢修资源转移指令至各抢修资源供应端的步骤之后,方法还包括:根据抢修资源供应端对供电异常节点的目标抢修资源转移量,确定供电异常节点对抢修资源供应端的虚拟资源转移量;按照虚拟资源转移量,将虚拟资源转移至抢修资源供应端对应的虚拟资源账户中,并按照虚拟资源转移量,扣除供电异常节点对应的虚拟资源账户中的虚拟资源。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.

在完成电力应急物资的匹配之后,对于供应商,需要支付一笔费用,此费用当在电力应急抢修过程结束之后进行结算,通过交易结算智能合约。具体来说,若抢修资源供应端为资源供应商端,服务器在按照各抢修资源供应端对应的目标抢修资源转移量,发送抢修资源转移指令至各抢修资源供应端的步骤之后,服务器还可以根据抢修资源供应端对供电异常节点的目标抢修资源转移量,确定供电异常节点对抢修资源供应端的虚拟资源转移量;按照虚拟资源转移量,将虚拟资源转移至抢修资源供应端对应的虚拟资源账户中,并按照虚拟资源转移量,扣除供电异常节点对应的虚拟资源账户中的虚拟资源。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.

本实施例的技术方案,通过根据抢修资源供应端对供电异常节点的目标抢修资源转移量,确定供电异常节点对抢修资源供应端的虚拟资源转移量,并按照虚拟资源转移量,将虚拟资源转移至抢修资源供应端对应的虚拟资源账户中,并按照虚拟资源转移量,扣除供电异常节点对应的虚拟资源账户中的虚拟资源,从而提高了虚拟资源的利用率。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.

在另一个实施例中,若抢修资源供应端为资源仓储库端,在按照各抢修资源供应端对应的目标抢修资源转移量,发送抢修资源转移指令至各抢修资源供应端的步骤之后,方法还包括:获取各抢修资源供应端在目标资源匹配结果中的资源转移贡献度;资源转移贡献值用于表征各抢修资源供应端在目标资源匹配结果中的资源转移程度;根据各抢修资源供应端的资源转移贡献度,生成对各抢修资源供应端的虚拟资源奖励量;按照虚拟资源奖励量,将虚拟资源转移至抢修资源供应端对应的虚拟资源账户中。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.

其中,获取抢修资源供应端转移至供电异常节点的虚拟资源与待匹配抢修资源之间的关联系数;根据各抢修资源供应端的关联系数,确定各抢修资源供应端在目标资源匹配结果中的资源转移贡献度。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.

具体实现中,服务器通过匹配结果下载智能合约调用链上存储的匹配结果数据,对于每一个供应商,都会提供若干种电力应急物资,统一使用向量表示,如Xi=(xi,1,xi,2...,xi,n)标识第i个供应商,里面的xi,m表示第i个供应商的第m种货物,在本申请中,我们称之为指标,将所有的仓储库联合起来,可以得到一个指标矩阵(xi,j)n×m,如下所示: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, which are uniformly represented by vectors, such as Xi = (xi ,1 ,xi ,2 ...,xi ,n ) to identify the i-th supplier, and the x i,m inside represents the m-th type of goods of the i-th supplier. In this application, we call it an indicator. By combining all the warehouses, we can get an indicator matrix (xi ,j ) n×m , as shown below:

子步骤一:确定参考指标序列,参考指标序列是一个比较标准,通过参考指标序列,可以衡量一个仓储库的贡献度,从而发放奖励,本申请方案选取各指标的最低值构成参考序列,记作: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:

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

其中x'0(j)为指标j的最小值。Where x' 0 (j) is the minimum value of index j.

子步骤二:由于对于不同的仓储库来说,各指标的物理意义不同,导致数据不便于比较,或在比较时难以得到正确的结论。因此在进行灰色关联度分析时,一般都要进行数据归一化处理。逐个计算每个被评价仓储库指标序列与参考序列对应元素的绝对差值。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.

即:|Xi-X0′|(i=1,2,…,n)(4)That is: |X i -X 0 ′|(i=1,2,…,n)(4)

子步骤三:求最值,通过下述两个公式Sub-step 3: Find the maximum value by the following two formulas

子步骤四:计算关联度系数Sub-step 4: Calculate the correlation coefficient

通过公式(7),分别计算每个仓储库指标序列与参考序列对应元素的关联系数The correlation coefficient between each warehouse index sequence and the corresponding element of the reference sequence is calculated by formula (7):

其中ρ为分辨系数0<ρ<1。若ρ越小,关联系数间差异越大,区分能力越强,本申请方案中将ρ取0.5。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.

子步骤五:计算各仓储库贡献关联度Sub-step 5: Calculate the contribution correlation of each warehouse

其中,n为参与此次电力应急物资供应匹配且匹配成功的仓储库总数。Among them, n is the total number of warehouses that participated in the power emergency material supply matching and were successfully matched.

子步骤六:计算各仓储库的贡献度和分别可得收益Sub-step 6: Calculate the contribution and revenue of each warehouse

根据公式(9)分别计算出各仓储库的贡献度:According to formula (9), the contribution of each warehouse is calculated:

则各仓储库得到的奖励为:The rewards for each warehouse are:

其中,Benefiti表示仓储库i的奖励;Bonustotal表示为总奖励。Among them, Benefit i represents the reward of warehouse i; Bonus total represents the total reward.

通过上述步骤,综合考虑了所有指标和各仓储库之间贡献度的关联度,能够比较公平的计算出仓储库的贡献度,进行合理的奖励分配。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.

在另一个实施例中,在响应于针对供电异常节点的抢修资源获取请求,确定供电异常节点的抢修资源需求信息的步骤之前,方法还包括:接收各抢修资源供应端发送的初始抢修资源供应数据;对初始抢修资源供应数据进行数据预处理,得到抢修资源供应信息;抢修资源供应信息的数据格式满足预设条件;将各抢修资源供应端对应的抢修资源供应信息上传至目标区块链。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.

为了便于本领域技术人员的理解,图4提供了一种抢修资源的上链图。如图4所述,服务器在响应于针对供电异常节点的抢修资源获取请求,确定供电异常节点的抢修资源需求信息之后,服务器还可以接收各抢修资源供应端发送的初始抢修资源供应数据;然后,服务器对初始抢修资源供应数据进行数据预处理,以使得到的抢修资源供应信息的数据格式满足预设条件;最后,服务器通过应急物资数据上链智能合约,将各抢修资源供应端对应的抢修资源供应信息上传至目标区块链。To facilitate the understanding of those skilled in the art, Figure 4 provides a diagram of the chain of emergency repair resources. As shown in Figure 4, 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.

本实施例的技术方案,实现了在将抢修资源供应数据进行上链前的数据预处理,进而实现对抢修资源供应数据的规范化处理,提高服务器后续对抢修资源供应数据的处理效率,提高抢修资源的分配效率。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.

在另一个实施例中,对初始抢修资源供应数据进行数据预处理,得到抢修资源供应信息,包括:对初始抢修资源供应信息进行数据清洗处理,得到清洗后数据;清先后数据具有预设的数据格式;对清洗后数据进行数据分类处理,得到分类后数据;分类后数据包括按照不同抢修资源类型对清洗后数据进行分类后得到的数据;对分类后数据中的缺失数据进行数据补足处理,得到补足后数据,作为抢修资源供应信息。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.

具体实现中,供应商和仓储库将通过应急物资数据上链智能合约自己的拥有的电力应急物资数据上传到区块链。在数据上传的过程中,并不是从仓储库或者供应商的本地数据库直接将数据上传到区块链中,直接上传的数据会比较杂,且数据格式不统一,在发生电力物资供应的过程中,如果电力物资数据格式不统一且杂乱,在进行精准匹配的过程中,就会花费较长的时间去匹配,甚至可能造成匹配失败,导致电力物资供应慢,不能及时完成电力的抢修。在电力应急物资数据上链时,首先对数据进行处理,其目的是统一数据格式,对物资分类等,在后续进行物资精准匹配的时候能够快速完成匹配,其数据包括物资数量、物资价格(供应商将上传价格、仓储库中物资没有价格)、物资存放地点以及物资时效等。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.

本实施例的技术方案,通过对初始抢修资源供应信息进行数据清洗处理,得到清洗后数据;清先后数据具有预设的数据格式;对清洗后数据进行数据分类处理,得到分类后数据;分类后数据包括按照不同抢修资源类型对清洗后数据进行分类后得到的数据;对分类后数据中的缺失数据进行数据补足处理,得到补足后数据,作为抢修资源供应信息,实现了对抢修资源供应数据的规范化处理,提高服务器后续对抢修资源供应数据的处理效率,提高抢修资源的分配效率。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.

为了便于本领域技术人员的理解,图5提供了一种基于智能合约的电力抢修资源分配方法的系统框架图。如图5所述,其中包含应用层、区块链层、数据层、以及涉及主体,具体描述如下所示:To facilitate the understanding of those skilled in the art, FIG5 provides a system framework diagram of a power emergency repair resource allocation method based on a smart contract. As shown in FIG5, it includes an application layer, a blockchain layer, a data layer, and related entities, and the specific description is as follows:

涉及主体是在电力应急物资供应过程中涉及到的各个主体,包括仓储库、供应商、以及灾害事故点。仓储库为电力应急物资仓储库,存储了电力应急物资,当发生电力事故的时候,能够从仓储库调用物资,从而保证电力应急物资的供应,减少因为物资供应不足导致的电力抢修慢问题;供应商为电力应急物资供应商,当仓储库中的电力物资不足时,或者需要的电力应急物资仓储库没有的时候,需要向供应商及时采购,以满足电力应急物资的供应;灾害事故点是由于自然灾害(冰灾、火灾、龙卷风等)、人为因素以及其他原因(线路老化、设备老化、自然侵蚀等)导致的电力无法供应的地点,如变电站等。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.

数据层负责数据整理功能,包括数据清洗、数据分类、以及数据补足。数据清洗是为了数据格式的统一化,当供应商和仓储库上传自己的物资数据时,由于自己的数据格式不统一,会导致在后续电力物资供应时匹配花费很大的时间;数据分类是将数据按照不同的物资进行分类,不同的仓储库和供应商会有不同的应急物资,需要对这些物资分类,进一步的就是对这些物资的数据分类;数据补足也是针对供应商和仓储库的数据格式不统一,需要对数据缺失的部分进行补足,保证数据的一致性。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.

区块链层是为电力应急物资供应提供区块链服务支撑,包括智能合约,分布式存储和激励制度。本申请涉及多个智能合约,如应急物资数据上链智能合约、精准匹配智能合约、匹配结果上链智能合约、交易结算智能合约、贡献度清算智能合约等,通过智能合约提高电力应急物资供应的效率,加快电力印记物资供应,使得事故能够更快被抢修;激励制度是为仓储库准备的,在完成电力应急物资供应链,电网企业将对仓储库进行奖励,通过激励制度完成奖励;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;

业务层则是完成电力应急物资供应涉及到的业务,包括精准匹配模块、利益清算和过程溯源。精准匹配模块是发生电力事故的时候,灾害事故点需要向供应商购买或者向仓储库调用物资时候采取的算法,保证物资的供应;利益清算模块是在完成电力应急物资供应之后,需要向供应商支付物资货款,利用利益清算模块完成付款;过程溯源模块是完成对电力应急物资供应的整个过程的全流程存证和溯源。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.

在另一个实施例中,如图6所示,提供了一种基于智能合约的电力抢修资源分配方法,以该方法应用于图1中的服务器为例进行说明,包括以下步骤:In another embodiment, as shown in FIG6 , a method for allocating power repair resources based on a smart contract is provided, which is described by taking the method applied to the server in FIG1 as an example, and includes the following steps:

步骤S610,响应于针对供电异常节点的抢修资源获取请求,确定所述供电异常节点的抢修资源需求信息。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.

步骤S620,从目标区块链中读取各抢修资源供应端预上传的抢修资源供应信息,并根据所述抢修资源供应信息和所述抢修资源需求信息,确定针对所述供电异常节点的待匹配抢修资源;其中,各所述抢修资源供应端具有与资源供应属性对应的物资供应权重;所述资源供应属性包括执行资源转移操作所对应的资源消耗数量、资源转移距离和资源转移时效。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.

步骤S630,按照各所述抢修资源供应端的物资匹配权重,对所述待匹配抢修资源进行资源匹配处理,得到资源匹配结果;所述资源匹配结果包括各所述抢修资源供应端对所述供电异常节点的抢修资源转移量。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.

步骤S640,根据所述资源匹配结果,对各所述抢修资源供应端的物资匹配权重进行更新。Step S640: updating the material matching weight of each of the emergency repair resource suppliers according to the resource matching result.

步骤S650,返回所述按照各所述抢修资源供应端的物资匹配权重,对所述待匹配抢修资源进行资源匹配处理,得到资源匹配结果的步骤,直至得到目标资源匹配结果;其中,执行所述目标资源匹配结果对应的资源转移操作的资源消耗数量、资源转移距离和资源转移时效满足预设条件。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.

步骤S660,根据所述目标资源匹配结果,确定各所述抢修资源供应端对所述供电异常节点的目标抢修资源转移量。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.

步骤S670,按照各所述抢修资源供应端对应的目标抢修资源转移量,发送抢修资源转移指令至各所述抢修资源供应端;所述抢修资源转移指令用于指示各所述抢修资源供应端按照对应的目标抢修资源转移量将抢修资源转移至所述供电异常节点。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.

需要说明的是,上述步骤的具体限定可以参见上文对一种基于智能合约的电力抢修资源分配方法的具体限定。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.

应该理解的是,虽然图2和图6的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2和图6中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that, although the various steps in the flowcharts of Fig. 2 and Fig. 6 are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in Fig. 2 and Fig. 6 may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

在一个实施例中,如图7所示,提供了一种基于智能合约的电力抢修资源分配装置,包括:In one embodiment, as shown in FIG7 , a power repair resource allocation device based on a smart contract is provided, comprising:

响应模块710,用于响应于针对供电异常节点的抢修资源获取请求,确定所述供电异常节点的抢修资源需求信息;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;

确定模块720,用于从目标区块链中读取各抢修资源供应端预上传的抢修资源供应信息,并根据所述抢修资源供应信息和所述抢修资源需求信息,确定针对所述供电异常节点的待匹配抢修资源;其中,各所述抢修资源供应端具有与资源供应属性对应的物资供应权重;所述资源供应属性包括执行资源转移操作所对应的资源消耗数量、资源转移距离和资源转移时效;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;

匹配模块730,用于按照各所述抢修资源供应端的物资匹配权重,对所述待匹配抢修资源进行资源匹配处理,得到资源匹配结果;所述资源匹配结果包括各所述抢修资源供应端对所述供电异常节点的抢修资源转移量;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;

更新模块740,用于根据所述资源匹配结果,对各所述抢修资源供应端的物资匹配权重进行更新;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;

返回模块750,用于返回所述匹配模块,直至得到目标资源匹配结果;其中,执行所述目标资源匹配结果对应的资源转移操作的资源消耗数量、资源转移距离和资源转移时效满足预设条件。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.

在其中一个实施例中,所述装置还包括:抢修资源确定模块,用于根据所述目标资源匹配结果,确定各所述抢修资源供应端对所述供电异常节点的目标抢修资源转移量;发送模块,用于按照各所述抢修资源供应端对应的目标抢修资源转移量,发送抢修资源转移指令至各所述抢修资源供应端;所述抢修资源转移指令用于指示各所述抢修资源供应端按照对应的目标抢修资源转移量将抢修资源转移至所述供电异常节点。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.

在其中一个实施例中,若抢修资源供应端为资源供应商端,所述装置还包括:虚拟资源确定模块,用于根据所述抢修资源供应端对所述供电异常节点的目标抢修资源转移量,确定所述供电异常节点对所述抢修资源供应端的虚拟资源转移量;第一转移模块,用于按照所述虚拟资源转移量,将虚拟资源转移至所述抢修资源供应端对应的虚拟资源账户中,并按照所述虚拟资源转移量,扣除所述供电异常节点对应的虚拟资源账户中的虚拟资源。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.

在其中一个实施例中,若抢修资源供应端为资源仓储库端,所述装置还包括:贡献度确定模块,用于获取各所述抢修资源供应端在所述目标资源匹配结果中的资源转移贡献度;所述资源转移贡献值用于表征各所述抢修资源供应端在所述目标资源匹配结果中的资源转移程度;生成模块,用于根据各所述抢修资源供应端的资源转移贡献度,生成对各所述抢修资源供应端的虚拟资源奖励量;第二转移模块,用于按照所述虚拟资源奖励量,将虚拟资源转移至所述抢修资源供应端对应的虚拟资源账户中。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.

在其中一个实施例中,所述贡献度确定模块,具体用于获取所述抢修资源供应端转移至所述供电异常节点的虚拟资源与所述待匹配抢修资源之间的关联系数;根据各所述抢修资源供应端的关联系数,确定各所述抢修资源供应端在所述目标资源匹配结果中的资源转移贡献度。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.

在其中一个实施例中,所述装置还包括:接收模块,用于接收各所述抢修资源供应端发送的初始抢修资源供应数据;预处理模块,用于对所述初始抢修资源供应数据进行数据预处理,得到所述抢修资源供应信息;所述抢修资源供应信息的数据格式满足预设条件;上传模块,用于将各所述抢修资源供应端对应的抢修资源供应信息上传至所述目标区块链。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.

在其中一个实施例中,所述预处理模块,还用于对所述初始抢修资源供应信息进行数据清洗处理,得到清洗后数据;所述清先后数据具有预设的数据格式;对所述清洗后数据进行数据分类处理,得到分类后数据;所述分类后数据包括按照不同抢修资源类型对所述清洗后数据进行分类后得到的数据;对所述分类后数据中的缺失数据进行数据补足处理,得到补足后数据,作为所述抢修资源供应信息。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.

关于基于智能合约的电力抢修资源分配装置的具体限定可以参见上文中对于基于智能合约的电力抢修资源分配方法的限定,在此不再赘述。上述基于智能合约的电力抢修资源分配装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。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.

在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图8所示。该计算机设备包括通过系统总线连接的处理器、存储器和网络接口。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于存储执行基于智能合约的电力抢修资源分配方法的数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种基于智能合约的电力抢修资源分配方法。In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in FIG8. The computer device includes a processor, a memory, and a network interface connected via 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 method for allocating power repair resources based on smart contracts. 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 method for allocating power repair resources based on smart contracts is implemented.

本领域技术人员可以理解,图8中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art will understand that the structure shown in FIG. 8 is merely a block diagram of a partial 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.

在一个实施例中,提供了一种计算机设备,包括存储器和处理器,存储器存储有计算机程序,计算机程序被处理器执行时,使得处理器执行上述一种基于智能合约的电力抢修资源分配方法的步骤。此处一种基于智能合约的电力抢修资源分配方法的步骤可以是上述各个实施例的一种基于智能合约的电力抢修资源分配方法中的步骤。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.

在一个实施例中,提供了一种计算机可读存储介质,存储有计算机程序,计算机程序被处理器执行时,使得处理器执行上述一种基于智能合约的电力抢修资源分配方法的步骤。此处一种基于智能合约的电力抢修资源分配方法的步骤可以是上述各个实施例的一种基于智能合约的电力抢修资源分配方法中的步骤。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.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-Only Memory,ROM)、磁带、软盘、闪存或光存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或外部高速缓冲存储器。作为说明而非局限,RAM可以是多种形式,比如静态随机存取存储器(Static Random Access Memory,SRAM)或动态随机存取存储器(Dynamic Random Access Memory,DRAM)等。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).

以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。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.

以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。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 (8)

1.一种基于智能合约的电力抢修资源分配方法,其特征在于,包括:1. A method for allocating power repair resources based on smart contracts, characterized by comprising: 响应于针对供电异常节点的抢修资源获取请求,确定所述供电异常节点的抢修资源需求信息;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, the emergency repair resources to be matched are processed 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.根据权利要求1所述的方法,其特征在于,若抢修资源供应端为资源仓储库端,在所述按照各所述抢修资源供应端对应的目标抢修资源转移量,发送抢修资源转移指令至各所述抢修资源供应端的步骤之后,所述方法还包括: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 comprises: 获取各所述抢修资源供应端在所述目标资源匹配结果中的资源转移贡献度;所述资源转移贡献度用于表征各所述抢修资源供应端在所述目标资源匹配结果中的资源转移程度;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.根据权利要求2所述的方法,其特征在于,所述获取各所述抢修资源供应端在所述目标资源匹配结果中的资源转移贡献度,包括:3. The method according to claim 2, characterized in that the step of obtaining the resource transfer contribution of each of the emergency repair resource suppliers in the target resource matching result comprises: 获取所述抢修资源供应端转移至所述供电异常节点的虚拟资源与所述待匹配抢修资源之间的关联系数;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.根据权利要求1所述的方法,其特征在于,在所述响应于针对供电异常节点的抢修资源获取请求,确定所述供电异常节点的抢修资源需求信息的步骤之前,所述方法还包括: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 comprises: 接收各所述抢修资源供应端发送的初始抢修资源供应数据;Receiving initial emergency repair resource supply data sent by each emergency repair resource supply end; 对所述初始抢修资源供应数据进行数据预处理,得到所述抢修资源供应信息;所述抢修资源供应信息的数据格式满足预设条件;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.根据权利要求4所述的方法,其特征在于,所述对所述初始抢修资源供应数据进行数据预处理,得到所述抢修资源供应信息,包括:5. The method according to claim 4, characterized in that the step of performing data preprocessing on the initial emergency repair resource supply data to obtain the emergency repair resource supply information comprises: 对所述初始抢修资源供应信息进行数据清洗处理,得到清洗后数据;所述清洗后数据具有预设的数据格式;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.一种基于智能合约的电力抢修资源分配装置,其特征在于,所述装置包括: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.一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1至5中任一项所述的方法的步骤。7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein the processor implements the steps of the method according to any one of claims 1 to 5 when executing the computer program. 8.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至5中任一项所述的方法的步骤。8. A computer-readable storage medium having a computer program stored thereon, wherein 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.
CN202111082040.1A 2021-09-15 2021-09-15 Intelligent contract-based power rush-repair resource allocation method, device and equipment Active CN113971504B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111082040.1A CN113971504B (en) 2021-09-15 2021-09-15 Intelligent contract-based power rush-repair resource allocation method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111082040.1A CN113971504B (en) 2021-09-15 2021-09-15 Intelligent contract-based power rush-repair resource allocation method, device and equipment

Publications (2)

Publication Number Publication Date
CN113971504A CN113971504A (en) 2022-01-25
CN113971504B true CN113971504B (en) 2024-10-15

Family

ID=79586518

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111082040.1A Active CN113971504B (en) 2021-09-15 2021-09-15 Intelligent contract-based power rush-repair resource allocation method, device and equipment

Country Status (1)

Country Link
CN (1) CN113971504B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116388112B (en) * 2023-05-26 2023-09-12 北京国电通网络技术有限公司 Abnormal supply end power-off method, device, electronic equipment and computer readable medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109754095A (en) * 2018-12-24 2019-05-14 广州供电局有限公司 Deployment information generation method, device, computer equipment and storage medium
CN112396327A (en) * 2020-11-20 2021-02-23 城云科技(中国)有限公司 Block chain-based flood prevention and control station command and scheduling method, system and server

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10785168B2 (en) * 2019-07-15 2020-09-22 Alibaba Group Holding Limited Allocating virtual resource based on block chain
CN112580911B (en) * 2019-09-29 2025-02-07 北京国双科技有限公司 Resource management method, device, computer equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109754095A (en) * 2018-12-24 2019-05-14 广州供电局有限公司 Deployment information generation method, device, computer equipment and storage medium
CN112396327A (en) * 2020-11-20 2021-02-23 城云科技(中国)有限公司 Block chain-based flood prevention and control station command and scheduling method, system and server

Also Published As

Publication number Publication date
CN113971504A (en) 2022-01-25

Similar Documents

Publication Publication Date Title
US10873209B2 (en) System and method for dynamic energy storage system control
JP6079215B2 (en) Power demand forecasting device, program
CN111563703B (en) Project management system, project management method, computer device, and computer-readable storage medium
CN112070301A (en) Method, system and equipment for adjusting power consumption of user
CN111932314A (en) Method, device and equipment for pushing recommended content and readable storage medium
CN113971504B (en) Intelligent contract-based power rush-repair resource allocation method, device and equipment
CN117829881A (en) Charging, discharging and battery swapping optimization method of battery swapping station and storage medium and terminal equipment
CN111625583B (en) Business data processing method and device, computer equipment and storage medium
CN108429260A (en) Sale of electricity company Multiple Time Scales transaction electricity decision-making technique and system
JP6507734B2 (en) Power trading volume determination system, power trading volume determining method and program
CN114140252A (en) Resource allocation method and related device for a target object
JP2019046467A (en) Power transaction support device and power transaction support method
CN111523083A (en) Method and device for determining power load declaration data
CN111144634A (en) Method and device for predicting power price
CN113076302B (en) Power grid data management method, device, equipment and medium
JP7226581B2 (en) Control device, control method and program
CN114066642A (en) Risk prediction method, terminal and storage medium for electricity retailing
TWI700596B (en) Information integrating system and information integrating method
US20240311934A1 (en) Intermediary system, transaction system, and requesting method
CN117853024A (en) Stock material management method, apparatus, computer device, and storage medium
Okpako et al. Optimization of community based virtual power plant with embedded storage and renewable generation
CN118134274A (en) Electric quantity estimation and monitoring method for electric power consumer and related equipment
CN114638529A (en) Method and device for evaluating material demand planning accuracy
JP2024135406A (en) Information processing device, information processing method, and computer program
CN117132157A (en) Performance data processing method, system, terminal and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Lin Junchang

Inventor after: Deng Xinghua

Inventor after: Li Ranran

Inventor after: Zhou Shaodan

Inventor before: Zhou Shaodan

Inventor before: Deng Xinghua

Inventor before: Li Ranran

GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: Room 401A, South Software Building, Guangzhou Nansha Information Technology Park, No. 2 Huanshi Avenue South, Nansha District, Guangzhou, Guangdong Province, 510000

Patentee after: China Southern Power Grid Supply Chain Group Co.,Ltd.

Country or region after: China

Address before: No. 225, Huanshi Avenue West, Nansha District, Guangzhou City, Guangdong Province

Patentee before: China Southern Power Grid Materials Co.,Ltd.

Country or region before: China