CN111553594B - Resource allocation method, device, computer equipment and computer readable storage medium - Google Patents

Resource allocation method, device, computer equipment and computer readable storage medium Download PDF

Info

Publication number
CN111553594B
CN111553594B CN202010347364.2A CN202010347364A CN111553594B CN 111553594 B CN111553594 B CN 111553594B CN 202010347364 A CN202010347364 A CN 202010347364A CN 111553594 B CN111553594 B CN 111553594B
Authority
CN
China
Prior art keywords
demand
resource
target
level
information
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
CN202010347364.2A
Other languages
Chinese (zh)
Other versions
CN111553594A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010347364.2A priority Critical patent/CN111553594B/en
Publication of CN111553594A publication Critical patent/CN111553594A/en
Application granted granted Critical
Publication of CN111553594B publication Critical patent/CN111553594B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/26Government or public services
    • G06Q50/265Personal security, identity or safety
    • 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Abstract

The application relates to a resource allocation method, a resource allocation device, computer equipment and a storage medium. The method comprises the following steps: acquiring a resource allocation request, and acquiring the demand information of a resource demand party, the resources provided by a resource supply party and the corresponding supply total amount from a block chain according to the resource allocation request; determining a demand grade corresponding to the resource demand party according to the demand information; determining a target demand side and a corresponding distribution amount in the resource demand sides according to the total supply amount and the demand level corresponding to the resource demand side, and determining a corresponding target supply side from the resource supply sides; and generating a distribution order according to the target demand side, the corresponding distribution amount and the target supply side, writing the distribution order into the block chain to generate a block, wherein the distribution order is used for indicating the target supply side to distribute resources to the target demand side according to the distribution amount. By adopting the method, unreasonable resource allocation can be avoided, and the accuracy of resource allocation is improved.

Description

Resource allocation method, device, computer equipment and computer readable storage medium
Technical Field
The present application relates to the field of internet technologies, and in particular, to a resource allocation method, apparatus, computer device, and computer-readable storage medium.
Background
Resource allocation is a common scenario in people's daily life. With the development of internet technology, the phenomenon of resource allocation through computer devices is more and more common. Currently, computer devices can integrate and allocate resources provided by suppliers by scheduling the resources according to the resources needed by the demanders.
However, due to the supply information, the asymmetry of the allocation information and the limitation of resource supply, the conventional resource allocation technology often has a problem of low allocation accuracy.
Disclosure of Invention
In view of the foregoing, it is necessary to provide a resource allocation method, an apparatus, a computer device and a computer readable storage medium capable of improving the accuracy of resource allocation.
A method of resource allocation, the method comprising:
acquiring a resource allocation request, and acquiring demand information of a resource demand party, resources provided by a resource supply party and a corresponding supply total amount from a block chain according to the resource allocation request;
determining a demand grade corresponding to the resource demand party according to the demand information;
determining a target demand side and a corresponding allocation amount of the resource demand sides according to the supply total amount and the demand level corresponding to the resource demand side, and determining a corresponding target supply side from the resource supply sides;
and generating a distribution order according to the target demand party, the corresponding distribution amount and the target supply party, and writing the distribution order into a block chain to generate a block, wherein the distribution order is used for indicating the target supply party to distribute the resources to the target demand party according to the distribution amount.
An apparatus for resource allocation, the apparatus comprising:
the information acquisition module is used for acquiring a resource allocation request, and acquiring the demand information of a resource demand party, the resources provided by a resource provider and the corresponding total supply amount from a block chain according to the resource allocation request;
the grade determining module is used for determining the requirement grade corresponding to the resource demander according to the requirement information;
the allocation module is used for determining a target demand side and a corresponding allocation amount in the resource demand sides according to the supply total amount and the demand grades corresponding to the resource demand sides, and determining a corresponding target supply side from the resource supply sides;
and the information uplink module is used for generating a distribution order according to the target demand side, the corresponding distribution amount and the target supplier, and writing the distribution order into a block chain to generate a block, wherein the distribution order is used for indicating the target supplier to distribute the resources to the target demand side according to the distribution amount.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
acquiring a resource allocation request, and acquiring demand information of a resource demand party, resources provided by a resource supply party and a corresponding supply total amount from a block chain according to the resource allocation request;
determining a demand grade corresponding to the resource demand party according to the demand information;
determining a target demand side and a corresponding distribution amount in the resource demand side according to the supply total amount and the demand level corresponding to the resource demand side, and determining a corresponding target supply side from the resource supply side;
and generating a distribution order according to the target demand party, the corresponding distribution amount and the target supply party, and writing the distribution order into a block chain to generate a block, wherein the distribution order is used for indicating the target supply party to distribute the resources to the target demand party according to the distribution amount.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring a resource allocation request, and acquiring demand information of a resource demand party, resources provided by a resource supply party and a corresponding supply total amount from a block chain according to the resource allocation request;
determining a demand grade corresponding to the resource demand party according to the demand information;
determining a target demand side and a corresponding allocation amount of the resource demand sides according to the supply total amount and the demand level corresponding to the resource demand side, and determining a corresponding target supply side from the resource supply sides;
and generating a distribution order according to the target demand party, the corresponding distribution amount and the target supply party, and writing the distribution order into a block chain to generate a block, wherein the distribution order is used for indicating the target supply party to distribute the resources to the target demand party according to the distribution amount.
According to the resource allocation method, the resource allocation device, the computer equipment and the computer readable storage medium, when the resource allocation request is obtained, the demand information of the resource demander, the resources used by the resource supplier and the supply total amount can be obtained from the block chain, so that the corresponding demand level is determined according to the demand information of the resource demander, the target demander, the corresponding allocation amount and the target supplier are determined according to the supply total amount of the resources provided by the resource supplier, the allocation order is generated according to the target demander, the corresponding allocation amount and the target supplier, the allocation order is written into the block chain to generate the block, the transparency of the allocation information can be ensured, unreasonable resource allocation is avoided, and the accuracy of the resource allocation is improved.
Drawings
FIG. 1 is a diagram of an exemplary environment in which a method for allocating resources may be implemented;
FIG. 2 is a block diagram illustrating an alternative block structure according to one embodiment;
FIG. 3 is a flow diagram illustrating a method for resource allocation in one embodiment;
FIG. 4 is a flowchart illustrating a resource allocation method according to another embodiment;
FIG. 5 is a flowchart illustrating a resource allocation method according to another embodiment;
FIG. 6 is a flow diagram that illustrates the updating of the provisioning amount of a resource, according to one embodiment;
FIG. 7 is a block diagram showing the structure of a resource allocation apparatus according to an embodiment;
FIG. 8 is a block diagram showing the construction of a resource allocation apparatus according to another embodiment;
FIG. 9 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The system related to the embodiment of the present invention may be a distributed system formed by connecting a client, a plurality of nodes (any form of computing devices in an access network, such as a server and a mobile terminal, where the mobile terminal may specifically be at least one of a desktop terminal, a mobile phone, a tablet computer, a notebook computer, and the like) in a network communication form.
Taking a distributed system as an example of a blockchain system, referring To fig. 1, fig. 1 is an optional structural schematic diagram of a blockchain system To which a distributed system 100 provided by an embodiment of the present invention is applied, where the system is formed by a plurality of nodes 200 (computer devices in any form in an access network, such as servers and user terminals) and a client 300, a Peer-To-Peer (P2P) network is formed between the nodes, and the P2P Protocol is an application layer Protocol operating on a Transmission Control Protocol (TCP). In a distributed system, any computer device such as a server, a mobile terminal, etc. can join to become a node, which includes a hardware layer, an intermediate layer, an operating system layer, and an application layer.
Referring to the functions of each node in the blockchain system shown in fig. 1, the functions involved include:
1) Routing, a basic function that a node has, is used to support communication between nodes.
Besides the routing function, the node can also have the following functions:
2) The application is used for being deployed in a block chain, realizing specific services according to actual service requirements, recording data related to the realization functions to form recording data, carrying a digital signature in the recording data to represent a source of task data, and sending the recording data to other nodes in the block chain system, so that the other nodes add the recording data to a temporary block when the source and integrity of the recording data are verified successfully.
For example, the services implemented by the application include:
2.1 Wallet) for providing functions of conducting transactions of electronic money, including initiating transactions (i.e. sending transaction records of current transactions to other nodes in the blockchain system, and storing the record data of the transactions in temporary blocks of the blockchain as a response for acknowledging that the transactions are valid after the other nodes are successfully verified; of course, the wallet also supports the querying of the remaining electronic money in the electronic money address;
2.2 Shared account book) is used for providing functions of operations such as storage, query and modification of account data, record data of the operations on the account data are sent to other nodes in the block chain system, and after the other nodes verify that the record data are valid, the record data are stored in a temporary block as a response for acknowledging that the account data are valid, and confirmation can be sent to the node initiating the operations.
2.3 Smart contracts, computerized agreements) that can enforce the terms of a contract, implemented by code deployed on a shared ledger for execution when certain conditions are met, for completing automated transactions according to actual business requirement code, e.g. querying the logistics status of goods purchased by a buyer, transferring the buyer's electronic money to the merchant's address after the buyer signs for goods; of course, smart contracts are not limited to executing contracts for trading, but may also execute contracts that process received information.
3) And the Block chain comprises a series of blocks (blocks) which are mutually connected according to the generated chronological order, new blocks cannot be removed once being added into the Block chain, and the blocks record the record data submitted by the nodes in the Block chain system.
Referring to fig. 2, fig. 2 is an optional schematic diagram of a Block Structure (Block Structure) according to an embodiment of the present invention, where each Block includes a hash value of a transaction record stored in the Block (hash value of the Block) and a hash value of a previous Block, and the blocks are connected by the hash values to form a Block chain. The block may also include information such as a time stamp at the time of block generation. A block chain (Blockchain), which is essentially a decentralized database, is a string of data blocks associated by using cryptography, and each data block contains related information for verifying the validity (anti-counterfeiting) of the information and generating a next block.
In this embodiment, resource suppliers, information distribution terminals of a scene to which the resource is applied, and resource demanders such as individuals, enterprises, and institutions may all serve as nodes in the distributed system. Taking a resource demander as an example, the resource demander can be added into a distributed system through a mobile terminal to become a node, and the resource demand can upload corresponding demand information through the node, and store and synchronize the demand information through a block structure; optionally, the resource demander may also join the distributed system through a server to become a node, and the server node may receive the demand information uploaded by each mobile terminal, and store and synchronize the summarized demand information through a block structure of the block chain.
The computer equipment can obtain the demand information of the resource demander, the resources provided by the resource supplier and the corresponding supply total amount from the blocks of the block chain, determine the demand level corresponding to the resource demander according to the demand information, determine the target demander and the corresponding allocation amount in the resource demander according to the supply total amount and the demand level corresponding to the resource demander, determine the corresponding target supplier from the resource supplier, write the target demander and the corresponding allocation amount and the target supplier into the block chain to generate the blocks, the generated blocks can be broadcasted to other nodes of the distributed system, and the resource supplier can allocate the resources to the target demander according to the target demander and the allocation amount contained in the generated blocks. Optionally, the resource supplier may also obtain the target demand side and the corresponding allocation amount from the block by accessing the block chain.
In one embodiment, a method for resource allocation is provided, as shown in fig. 3. The embodiment is described by taking the method applied to the computer device as an example. Referring to fig. 3, the resource allocation method specifically includes the following steps:
step 302, obtaining a resource allocation request, and obtaining requirement information of a resource demander, resources provided by a resource supplier, and a corresponding total supply amount from a block chain according to the resource allocation request.
The resource allocation request is a request for instructing the computer device to perform resource allocation. Specifically, the resource allocation request may be a resource allocation request sent by the terminal and acquired by the computer device, or may be a resource allocation request generated by the computer device according to the acquired operation information input by the user, or may be a resource allocation request generated according to a preset allocation rule. The preset allocation rule may be set according to an actual application requirement, and is not limited herein.
For example, in an embodiment, the preset allocation rule may be that resource allocation is performed once every preset time duration, the computer device may obtain a time when resource allocation was performed last time according to the preset allocation rule, and when it is detected that a time duration between the current time and the time when resource allocation was performed last time exceeds the preset time duration, the resource allocation request is generated; in another embodiment, the preset allocation rule may be that resource allocation is performed when the total supply amount reaches a preset amount, and the computer device may obtain, according to the preset allocation rule, the resources provided by the resource provider and the corresponding total supply amount from the block chain in real time, and generate the resource allocation request when the total supply amount is greater than or equal to the preset amount.
The resource demander may be an individual, an enterprise, an organization, etc. The resource provider may be a resource producer, a resource selling merchant, or the like. The resource demander can send the demand information to the block chain node, the resource supplier can send the resources that can be provided and the corresponding total amount of supply to the block chain node, and the block chain node summarizes the received information and generates the block. According to different application scenes, the resources can be any physical articles such as food, masks, vaccines and the like, and can also be virtual resources such as consumption tickets, cash red packages, house purchase names and the like. The total provisioning amount is the total amount of resources provided by all resource providers.
Specifically, the computer device may be used as a node of the block chain, and when acquiring the resource allocation request, acquire the requirement information of the resource demander, the resource provided by the resource supplier, and the corresponding total supply amount from the block of the block chain according to the resource allocation request.
And step 304, determining the requirement level corresponding to the resource demander according to the requirement information.
Demand information is information related to a resource demander. The requirement information may include an identity, an identity type, location information, etc. of the resource demander. For example, for a business, the demand information may include at least one of location of the business, nature of the business, size of personnel, etc.; for an individual, the demand information may include at least one of a residence address, an age, a number of family population, and the like of the individual.
And the computer equipment determines the demand level corresponding to the resource demander according to the demand information. The demand level is used for representing the demand degree of the resource demander for the resource. Generally, the higher the demand level, the more stringent the demand for the resource by the resource demander. Specifically, the computer device may preset an association relationship between the requirement level and the requirement information, and determine the corresponding requirement level according to the association relationship and the requirement information of the resource demander. Optionally, the computer device may also preset scores of various demand information, determine a score of the resource demand party according to the demand information, and match the score to a corresponding demand level according to the score.
For example, when the resource includes an epidemic prevention resource, the computer device may determine a corresponding demand level according to a rework degree of an enterprise included in the demand information, and may also determine a corresponding demand level according to an organization type included in the demand information, for example, the demand level of a medical care organization may be higher than the demand level of a community service organization; when the resource includes a consumption coupon, the computer device may determine the corresponding demand level according to the information of the enterprise scale, the enterprise operating profit, and the like included in the demand information, or may determine the corresponding demand level according to the information of the personal income, the consumption level, and the like included in the demand information.
Step 306, according to the total supply amount and the corresponding demand level of the resource demand party, determining a target demand party and a corresponding allocation amount of the resource demand party, and determining a corresponding target supply party from the resource supply party.
A target claimant refers to a resource claimant that qualifies for resource allocation. The target supplier corresponding to the resource demander refers to the resource supplier for resource allocation for the resource demander.
In general, when a resource is allocated, the resource cannot be allocated to all resource consumers at the same time because the resource supply amount is insufficient and the number of consumers is large. In this embodiment, the computer device may determine a target demand side and a corresponding allocation amount of the resource demand sides according to the total supply amount and the demand level corresponding to the resource demand side.
Specifically, the computer device may obtain a preset allocation amount, determine the number of distributable demanders by combining the total supply amount, and determine a target demander corresponding to the number of demanders from the resource demanders. The preset allocation amount refers to the preset amount of resources allocated to each target demand side. Optionally, in an embodiment, the computer device may also preset allocation amounts corresponding to different demand levels, so that the computer device may obtain the allocation amounts corresponding to different demand levels, determine, by combining the total supply amount, the number of allocable demanders corresponding to each demand level, and determine, from the resource demanders belonging to the demand levels, target demanders corresponding to the number. For example, the first demand level may be allocated an amount of 10, the second demand level may be allocated an amount of 7, the third demand level may be allocated an amount of 5, and so on. The computer device may determine the target demander by using a shaking number, random extraction, and the like, which is not limited herein.
Optionally, in an embodiment, the computer device may also obtain a preset distributable number of the demanders, determine a target demander corresponding to the number of the demanders from the resource demanders, and determine a corresponding distribution amount by combining the total supply amount.
After determining the target demand party and the corresponding allocation amount, the computer device may determine a target supplier corresponding to the target demand party from among the resource suppliers. And the resource allocation amount required to be allocated by the target supplier is less than or equal to the resource supply amount of the target supplier. For example, when the resource supply amount provided by the target supplier is 100 and the allocation amount of each target demand side is 10, the number of target demand sides allocated to the target supplier should be less than or equal to 10.
In one embodiment, the computer device may determine a target supply amount corresponding to a target demand party from the resource suppliers on a near basis based on the resource supply amount and the location of the resource supplier.
Step 308, generating an allocation order according to the target demander, the corresponding allocation amount and the target supplier, and writing the allocation order into the block chain to generate a block, wherein the allocation order is used for instructing the target supplier to allocate resources to the target demander according to the allocation amount.
The distribution order comprises a target demand side, a corresponding distribution amount and a target supply side; may be used to instruct the target supplier to allocate resources to the target demander in accordance with the allocation amount. The computer device generates the allocation order according to the target demand party, the corresponding allocation amount and the target supplier, and specifically, the computer device may generate the allocation order corresponding to the target demand party according to the allocation amount and the target supplier, which are obtained corresponding to each target demand party.
In one embodiment, the computer device may also obtain all target demanders allocated to the target suppliers, and generate allocation orders corresponding to the target suppliers according to all the target demanders and corresponding allocation amounts.
Further, the computer device writes the generated allocation order into the block chain to generate a block, specifically, the computer device may input the allocation order as input information into one of the nodes in the data sharing system, verify the allocation order by the node, generate a block header according to the verification information after the verification is passed, and generate a block body according to the allocation order to obtain the generated block. The blocks generated by the block chains can be synchronized to other nodes in a broadcasting mode, and the target supplier can obtain the corresponding allocation order through the block chain link points, and then carry out resource allocation to the target supplier according to the target supplier and the allocation amount contained in the allocation order.
In the embodiment provided by the application, when a resource allocation request is obtained, demand information of a resource demand side, resources provided by a resource provider and a corresponding total supply amount can be obtained from a block chain according to the resource allocation request, so that a corresponding demand level is determined according to the demand information of the resource demand side, a target demand side and an allocation amount in the resource demand side are determined according to the resources provided by the resource provider, the corresponding total supply amount and the demand level of the resource demand side, a corresponding target provider is determined from the resource provider, an allocation order is generated according to the target demand side, the corresponding allocation amount and the target provider and written into the block chain to generate a block, and the allocation order can allocate the resources to the target demand side according to the allocation amount. That is, the synchronization of the resource information and the allocation information can be realized through the block chain, and the resource allocation is performed in combination with the demand level, so that the transparency of the allocation information can be ensured, the unreasonable resource allocation can be avoided, and the accuracy of the resource allocation can be improved.
In one embodiment, the process of determining a target demand side and a corresponding allocation amount of resource demand sides according to a total supply amount and a demand level corresponding to the resource demand side in the provided resource allocation method includes: acquiring scene information applied by resources; determining the allocation amount of the resource demand party belonging to the demand grade according to the scene information; and determining the target demand party from the resource demand parties belonging to the demand grades according to the distribution amount and the supply total amount.
The scenario information is information related to a scenario to which the resource is applied. The scenarios applied by different resources differ. The scene information can be used for analyzing the quantity and the degree of demand of resources in different regions or different demand levels. The computer device can acquire scene information applied by the resource, and determine the allocation amount of the resource demander belonging to the demand level according to the scene information.
Specifically, the computer device may obtain target scene information corresponding to the resource demander of the demand level in the scene information, and determine the corresponding allocation amount according to the target scene information. For example, when the resource is a consumption coupon, the corresponding scenario information is consumption information, and the consumption information may include a regional per-capita consumption level, a regional income level, the number of consumable merchants, and the like; and the computer equipment determines the distribution amount corresponding to the demand grade according to the consumption information corresponding to the demanders with different demand grades.
When the resource is epidemic prevention resource, the corresponding scene information includes epidemic situation information, the epidemic situation information can include but is not limited to information such as confirmed diagnosis and suspected case quantity of a region or a community, the number of patients receiving diagnosis by a medical institution, the probability of contact between a demand party and a case, the population density of the region, the population mobility degree and the like, the distribution amount corresponding to different demand levels can be determined according to the epidemic situation information, and it can be understood that the confirmed diagnosis and suspected case quantity of the region or the community, the number of patients receiving diagnosis by the medical institution, the probability of contact between the demand party and the case, the population density of the region, the population mobility degree and the distribution amount are positively correlated, namely the distribution amount is higher when the epidemic situation of the scene where the resource demand party of the demand level is determined according to the epidemic situation information is more serious.
Further, the computer equipment determines the quantity of the demand parties corresponding to the demand level according to the distribution amount and the supply total amount, and determines target demand parties corresponding to the quantity of the demand parties from the resource demand parties belonging to the demand level.
Optionally, the computer device may also perform resource allocation according to the total supply amount and the allocation amount of the highest demand level, and perform resource allocation according to the remaining total allocation amount and the allocation amount of the next demand level after the resource demand of the highest demand level is met.
By acquiring scene information applied by resources, determining the distribution amount of the resource demanders belonging to the demand grades according to the scene information, and determining the target demander from the resource demanders belonging to the demand grades according to the distribution amount and the supply total amount, namely determining the distribution amounts of different demand grades by combining the scene information, the resource waste and shortage are avoided, and the rationality and the accuracy of resource distribution can be improved.
FIG. 4 is a flow diagram of a method for resource allocation in one embodiment. As shown in fig. 4, in one embodiment, the provided resource allocation method may include:
step 402, obtaining a resource allocation request, and obtaining requirement information of a resource demander, resources provided by a resource supplier, and a corresponding total supply amount from a block chain according to the resource allocation request.
And step 404, determining a demand level corresponding to the resource demander according to the demand information.
Step 406, when the resource includes an epidemic prevention resource, epidemic situation information applied by the epidemic prevention resource is obtained.
Epidemic situation information refers to information related to the occurrence and development of an epidemic. Epidemic prevention resources are materials for preventing and slowing down epidemic disease infection. Specifically, the epidemic prevention resources can comprise resources such as masks, protective glasses, protective clothing, gloves, medicines and the like. The number of confirmed and suspected cases in the region or community, the number of patients in medical institution, the probability of the contact between the demander and the cases, the population density of the region, the degree of population mobility and the like.
And step 408, determining the allocation amount of the resource demand party belonging to the demand level according to the epidemic situation information.
And step 410, determining the severity level of the epidemic area according to the epidemic situation information.
The epidemic information can be used to assess the severity of the epidemic. In the embodiment of the application, the computer equipment can determine the severity level of the epidemic area according to the epidemic situation information. Wherein, according to the intensity and the scope that the epidemic situation spreads, the size of epidemic area division can be set for according to the practical application demand, does not do the restriction here. For example, the epidemic areas may be divided according to country level, provincial level, city level, ballast level, or community level.
Specifically, the computer equipment can obtain epidemic situation information corresponding to the epidemic area from the epidemic situation information according to preset epidemic area division, and the severity level of the epidemic area is determined according to the epidemic situation information corresponding to the epidemic area. It can be understood that the epidemic situation information contains the number of confirmed and suspected cases, the number of patients for medical institutions to receive a diagnosis, the probability of the contact between the demander and the cases, the regional population density, and the population mobility, which are positively correlated with the severity level of the epidemic area.
Step 412, determining the total distribution amount corresponding to the epidemic area according to the total supply amount and the severity level of the epidemic area.
In order to control the spread of epidemic situation, the higher the severity level of the epidemic area is, the stronger the epidemic prevention intensity corresponding to the epidemic area should be, and the required resource allocation amount can be relatively increased. I.e. the total amount of distribution of the epidemic area is positively correlated with the severity level.
The computer equipment can determine the distribution total amount corresponding to the epidemic area according to the supply total amount and the severity level of the epidemic area. Specifically, the computer device may preset distribution percentages corresponding to different severity levels, and take a product of the distribution percentage corresponding to the severity level of the epidemic area and the supply total amount as the distribution total amount corresponding to the epidemic area. Optionally, the computer device may also preset a default allocation amount, so that the default allocation amount is adjusted according to the severity level and the total supply amount of the epidemic area to obtain the total allocation amount corresponding to the epidemic area.
And step 414, determining a target demand party from the resource demand parties belonging to the epidemic area and the demand level according to the total distribution amount and the distribution amount of the epidemic area.
And the computer equipment determines the quantity of the demand parties of each demand level according to the distribution total quantity and the distribution quantity of the epidemic area, and determines target demand parties corresponding to the quantity of the demand parties from the resource demand parties belonging to the epidemic area and the demand level according to the data of the demand parties. Optionally, the number of demanders of different demand levels may be the same, or may be positively correlated with the demand level. The computer equipment can also determine the sub-distribution total amount corresponding to different demand grades in the epidemic area according to the distribution total amount of the epidemic area, and determine the quantity of the demand parties belonging to the epidemic area and the demand grade according to the sub-distribution total amount and the distribution amount corresponding to the demand grade.
For example, when the total allocation amount in the epidemic area is 1000, the allocation amount of the medical staff belonging to the first demand level is 25, the allocation amount of the bus driver belonging to the second demand level is 15, and the allocation amount of the common citizen belonging to the third demand level is 10, the computer device may determine that the number of the demand parties in each demand level is 20, and then determine 20 target demand parties from the medical staff, the bus driver and the common citizen in the epidemic area; the computer device may also divide the total allocation amount 1000 into sub-allocation total amounts of different demand levels, for example, the sub-allocation total amounts corresponding to the first demand level, the second demand level, and the third demand level are 600, 300, and 100, respectively; then 24 target demanders can be determined from the health care workers in the affected area, 20 target demanders can be determined from the bus drivers in the affected area, and 10 target demanders can be determined from the general citizens in the affected area.
Step 416, generating an allocation order according to the target demander, the corresponding allocation amount and the target supplier, and writing the allocation order into the block chain to generate a block, where the allocation order is used to instruct the target supplier to allocate resources to the target demander according to the allocation amount.
The severity grade of the epidemic area is determined according to the epidemic situation information, the total distribution quantity of the epidemic area is determined according to the total supply quantity and the severity grade of the epidemic area, and the target demand party is determined from the resource demand parties belonging to the epidemic area and the demand grade according to the total distribution quantity and the distribution quantity of the epidemic area, so that the accuracy of resource distribution can be further improved.
In an embodiment, in the resource allocation method provided in the embodiment of the present application, when the resource includes an epidemic prevention resource, the process of determining the demand level corresponding to the resource demander according to the demand information may include: determining the severity level of the epidemic area according to the epidemic situation information; and acquiring the identity type of the resource demand party, and determining the corresponding demand grade according to the severity grade and the identity type of the epidemic area where the resource demand party is located.
In this embodiment, the demand level of the resource demander can be determined by combining the severity level and the identity type of the epidemic area. The identity types can be divided according to the work categories, ages, contact degrees with people and other factors of resource demanders. For example, the identity types may include, but are not limited to, healthcare workers, community service workers, epidemic prevention volunteers, rework workers, home citizens, and the like.
Specifically, the computer device may preset scores of different identity types and scores of different severity levels, obtain a score of the resource demanding party according to the score of the identity type to which the resource demanding party belongs and the score of the severity level at which the resource demanding party is located, and determine a demand level corresponding to the resource demanding party according to a correspondence between the preset score and the demand level.
Optionally, the computer device may preset initial levels corresponding to different identity types, and determine a corresponding demand level by combining the initial levels and the severity level of the epidemic area where the computer device is located. Taking the initial grade and the severity grade as numbers, the demand grade is increased by letters according to the grade B, the grade A and the grade S in sequence, when the initial grade corresponding to the medical care personnel and the common citizen is the first initial grade and the second initial grade respectively, and the severity grade corresponding to the epidemic area A, B is the first severity grade and the second severity grade respectively, the demand grade of the medical care personnel in the epidemic area A is the grade S, the demand grade of the medical care personnel in the epidemic area B and the common citizen in the epidemic area A is the grade A, the demand grade of the common citizen in the epidemic area B is the grade B, and the like.
The severity grade of the epidemic area is determined through epidemic situation information, the corresponding demand grade is determined according to the identity type of the resource demand party and the severity grade of the epidemic area, and the accuracy of the demand grade can be improved.
FIG. 5 is a flowchart of a resource allocation method in another embodiment. As shown in fig. 5, in one embodiment, a resource allocation method is provided that includes:
step 502, obtaining a resource allocation request, and obtaining requirement information of a resource demander, resources provided by a resource supplier, and a corresponding supply total amount from a block chain according to the resource allocation request.
And step 504, determining a requirement grade corresponding to the resource demander according to the requirement information.
Step 506, according to the total supply amount and the demand level corresponding to the resource demand side, determining a target demand side and a corresponding allocation amount in the resource demand side, and determining a corresponding target supply side from the resource supply side.
Step 508, determining the epidemic prevention level of the resource distributed to the target demand party according to the demand level corresponding to the target demand party; wherein the demand level is positively correlated with the epidemic prevention level.
Epidemic prevention ratings are used to indicate the strength of a resource's ability to defend against an epidemic. The higher the epidemic prevention grade is, the stronger the epidemic prevention capability of the corresponding resource is. For example, as for masks, epidemic prevention grades of a common dustproof mask, a disposable medical mask, an N90 mask, an N93 mask and an N95 mask are sequentially increased; for the disinfectant, the higher the alcohol content of the disinfectant, the higher the epidemic prevention grade is.
The computer device can determine the epidemic prevention level of the resource allocated to the target demand party according to the demand level corresponding to the target demand party. The corresponding relation between the demand grade and the epidemic prevention grade can be preset, and the computer equipment can determine the epidemic prevention grade of the resource corresponding to the target demand party according to the corresponding relation.
In one embodiment, the epidemic prevention level of the resource allocated to the target demand party can be determined by combining the supply amount of the resource corresponding to different epidemic prevention levels; the computer equipment can determine the epidemic prevention level of the resources corresponding to the target demand in turn by combining the supply quantity of the resources corresponding to the epidemic prevention level according to the sequence of the epidemic prevention level from high to low. Specifically, if the supply amount of the resources of the first epidemic prevention level is satisfied with the allocation of the first demand level, the remaining resources of the first epidemic prevention level can be allocated to the target demand side of the second demand level, wherein the first epidemic prevention level is higher than the second epidemic prevention level. Optionally, when the resource of the epidemic prevention level corresponding to the demand level of the target demand party is insufficient, the next epidemic prevention level of the epidemic prevention level corresponding to the demand level may be used as the epidemic prevention level of the resource allocated to the target demand party.
For example, when the supply of the first epidemic prevention grade N95 respirator is 500, the supply of the second epidemic prevention grade N93 respirator is 2000, and the supply of the third epidemic prevention grade disposable protective respirator is 5000; if the total distribution amount of the target demanders belonging to the first demand level is higher than 500, the N93 mask of the second epidemic prevention level can be distributed to the target demanders of the first demand level; if the total amount of the N93 masks allocated to the first demand level and the target demand side plus the target demand side belonging to the second demand level is less than 2000, the remaining N93 masks may be allocated to the target demand side of the third demand level.
Step 510, generating a distribution order according to the target demand side and the corresponding distribution amount, epidemic prevention level and the target supply side, and writing the distribution order into a block chain to generate a block, wherein the distribution order is used for indicating the target supply side to distribute resources corresponding to the epidemic prevention level to the target demand side according to the distribution amount.
The computer equipment can generate a distribution order according to the target demand side, the corresponding distribution amount, the epidemic prevention level and the target supply side, the distribution order is written into the block chain to generate a block, the block can synchronize the distribution order to other nodes in a broadcasting mode, the target supply side can obtain the corresponding distribution order through the block chain nodes, and resources corresponding to the epidemic prevention level are distributed to the target demand side according to the distribution amount and the epidemic prevention level contained in the distribution order.
The epidemic prevention grade of the corresponding resource is determined according to the demand grade of the target demand party, the distribution order is generated according to the target demand party and the corresponding distribution amount, epidemic prevention grade and target supply party, and the distribution order is written into the block chain to generate the block, so that the target supply party is instructed to distribute the resource corresponding to the epidemic prevention grade to the target demand party according to the distribution amount, the epidemic prevention demands of different demand parties can be coordinated to distribute the resource, and the efficiency of epidemic prevention and the reasonability and accuracy of resource distribution are improved.
In one embodiment, the provided resource allocation method may further include: acquiring order information uploaded by a node of a block chain; the order information is generated after the target supplier performs distribution operation according to the distribution order; the order information is written into the block chain to generate blocks, so that the order information is synchronized to the target demand side.
The order information is generated after the target supplier performs allocation operation according to the allocation order, that is, the target supplier allocates resources to the target demand side according to the allocation amount included in the allocation order. The target demand side can pack and deliver the resources, and for the target demand side receiving the goods in a self-service mode, order information can be generated and sent to the block chain node after the packing is finished; for a target demand side receiving goods in an express delivery mode, order information and the like can be generated according to an express delivery order number of the delivery after the delivery is finished; and then the generated order information is sent to the node of the block chain, and the computer equipment can write the obtained order information into the block chain to generate the block.
In one embodiment, the computer device may analyze whether the order information matches information contained in the allocation order and, upon determining that the order information matches information contained in the allocation order, write the order information to the blockchain to generate the blocks. Specifically, the information included in the allocation order includes the target demand party and the allocation amount, and in some embodiments, may further include information such as epidemic prevention level of resources, receiving mode, and the like; the computer device may determine that the order information matches the information contained in the allocation order when it is determined that the order information is consistent with each item of information contained in the allocation order; and then writing the acquired order information as input information into the area block to generate a block, wherein the generated block can synchronize the order information to other nodes in a broadcasting manner, and a target demand side can acquire corresponding order information through the block link points.
In some embodiments, when the order information does not match the information contained in the allocation order, the computer device may send an allocation exception indication to the terminal corresponding to the target supplier, where the allocation exception indication is used to instruct the target supplier to perform the allocation operation again according to the information contained in the allocation order.
The target supplier obtains the order information generated after the allocation order is allocated, and writes the order information and the allocation order into the block chain to generate the block, so that the order information can be made public and transparent, and the target demander can receive goods according to the order information in time, thereby improving the efficiency of receiving resources.
FIG. 6 is a flow diagram that illustrates updating the provisioning amount of a resource, under an embodiment. As shown in fig. 6, in an embodiment, the provided resource allocation method may further include:
step 602, when the target supplier is determined to complete the distribution operation according to the order information, acquiring the resource information sent by the target supplier.
Step 604, the resources provided by the resource provider and the corresponding total amount of provisioning are updated according to the resource information.
Step 606, writing the updated resources provided by the resource provider and the corresponding total supply amount into the block chain to generate the block.
The resource information includes resources and supply amount that the target supplier can provide, and the computer device can obtain the total supply amount corresponding to the resources from the block corresponding to the time closest to the current time in the block chain, and add the supply amount and the total supply amount to obtain the updated total supply amount of the resources. Further, in some embodiments, the resource information further includes an epidemic prevention level corresponding to the resource, and the computer device may update the total supply amount of the resource corresponding to the epidemic prevention level according to the epidemic prevention level and the supply amount corresponding to the resource.
The order information may be used to characterize the target supplier completion of the corresponding dispensing operation. Specifically, when the computer device acquires the order information of all the target demand parties allocated to the target supplier, it may be determined that the target supplier completes the allocation operation; and updating the resources provided by the resource provider and the corresponding total supply amount according to the resource information sent by the target provider, and writing the updated resources provided by the resource provider and the corresponding total supply amount into the block chain to generate a new block, so that the computer equipment can perform next resource allocation according to the updated resources provided by the resource provider and the corresponding total supply amount. Alternatively, the computer device may clear the supply amount of the target supplier when the target supplier has not completed the corresponding allocation operation.
When the target supplier finishes the allocation operation, the resources provided by the resource supplier and the corresponding total supply amount are updated according to the resource information sent by the target supplier, the updated resources provided by the resource supplier and the corresponding total supply amount are written into the block chain to generate blocks, the resources and the total supply amount can be synchronized to other nodes in a broadcast mode through the blocks, the supply information of the resources can be updated in time, the transparency of the resource supply information is realized, and the fairness and the accuracy of the resource allocation are ensured.
In an embodiment, the resource allocation method is described as applied to an epidemic prevention scenario, and specifically, the resource allocation method is applied to the epidemic prevention scenario as follows:
first, the computer device obtains a resource allocation request, and obtains requirement information of a resource demander, resources provided by a resource supplier and a corresponding supply total amount from a blockchain according to the resource allocation request.
And then, the computer equipment determines the requirement grade corresponding to the resource demander according to the requirement information.
Optionally, the computer device may determine the severity level of the epidemic area according to the epidemic situation information; and acquiring the identity type of the resource demand party, and determining the corresponding demand grade according to the severity grade and the identity type of the epidemic area where the resource demand party is located.
Then, the computer equipment determines a target demand side and a corresponding distribution amount in the resource demand sides according to the total supply amount and the demand level corresponding to the resource demand side, and determines a corresponding target supply side from the resource supply sides.
Optionally, the computer device may obtain epidemic situation information, and determine the allocation amount of the resource demand party belonging to the demand level according to the epidemic situation information; and determining a target demand party from the resource demand parties belonging to the demand grades according to the distribution amount and the supply total amount.
Optionally, the computer device may also determine the severity level of the epidemic area according to the epidemic situation information; determining the distribution total amount corresponding to the epidemic area according to the supply total amount and the severity grade of the epidemic area; and determining a target demand party from the resource demand parties belonging to the epidemic area and the demand level according to the total distribution amount and the distribution amount of the epidemic area.
Then, the computer device generates an allocation order according to the target demand side, the corresponding allocation amount and the target supply side, writes the allocation order into the block chain to generate a block, and the allocation order is used for indicating the target supply side to allocate resources to the target demand side according to the allocation amount.
Optionally, the computer device may determine, according to the demand level corresponding to the target demand party, an epidemic prevention level of the resource allocated to the target demand party; wherein the demand level is positively correlated with the epidemic prevention level; and generating a distribution order according to the target demand party and the corresponding distribution amount, the epidemic prevention level and the target supply party, writing the distribution order into the block chain to generate a block, wherein the distribution order can indicate the target supply party to distribute the resources corresponding to the epidemic prevention level to the target demand party according to the distribution amount.
Optionally, the computer device may obtain order information uploaded by a node of the block chain; the order information is generated after the target supplier performs distribution operation according to the distribution order; the order information is written into the block chain to generate blocks, so that the order information is synchronized to the target demand side. Alternatively, the computer device may write the order information to the block chain to generate the block when it is determined that the order information matches information contained in the allocation order.
Optionally, when it is determined that the target supplier completes the allocation operation according to the order information, the computer device may obtain resource information sent by the target supplier, and update the resources provided by the resource supplier and the corresponding supply total amount according to the resource information; and writing the updated resources provided by the resource provider and the corresponding total supply amount into the block chain to generate the blocks.
It should be understood that although the various steps in the flow charts of fig. 3-6 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not limited to being performed in the exact order illustrated and, unless explicitly stated herein, may be performed in other orders. Moreover, at least some of the steps in fig. 3-6 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps.
In one embodiment, as shown in fig. 7, there is provided a resource allocation apparatus, which may be a part of a computer device using a software module or a hardware module, or a combination of the two, and specifically includes: an information acquisition module 702, a rank determination module 704, an allocation module 706, and an information uplink module 708, wherein:
an information obtaining module 702 is configured to obtain the resource allocation request, and obtain, according to the resource allocation request, the requirement information of the resource demanding party, the resource provided by the resource supplying party, and the corresponding total supply amount from the blockchain.
A level determining module 704, configured to determine a demand level corresponding to the resource demander according to the demand information.
The allocating module 706 is configured to determine a target demand side and a corresponding allocation amount of the resource demand sides according to the total supply amount and the demand level corresponding to the resource demand side, and determine a corresponding target supply side from the resource supply sides.
The information chaining module 708 is configured to generate an allocation order from the target demander, the corresponding allocation amount, and the target supplier, and write the allocation order into the block chain to generate a block, where the allocation order is used to instruct the target supplier to allocate resources to the target demander according to the allocation amount.
The resource allocation device provided by the embodiment of the application can realize the synchronization of the resource information and the allocation information through the block chain, and perform resource allocation by combining the demand level, thereby ensuring the transparency of the allocation information, avoiding unreasonable resource allocation, and improving the accuracy of resource allocation.
In one embodiment, the allocation module 706 may be further configured to obtain context information to which the resource applies; determining the allocation amount of the resource demander belonging to the demand grade according to the scene information; and determining the target demand party from the resource demand parties belonging to the demand grades according to the distribution amount and the supply total amount.
By acquiring scene information applied by resources, determining the distribution amount of the resource demanders belonging to the demand grades according to the scene information, and determining the target demander from the resource demanders belonging to the demand grades according to the distribution amount and the supply total amount, namely determining the distribution amounts of different demand grades by combining the scene information, the resource waste and shortage are avoided, and the rationality and the accuracy of resource distribution can be improved.
In one embodiment, the allocation module 706 may be further configured to determine a severity level of the epidemic area according to the epidemic situation information; determining the distribution total amount corresponding to the epidemic area according to the supply total amount and the severity grade of the epidemic area; and determining a target demand party from the resource demand parties belonging to the epidemic area and the demand level according to the total distribution amount and the distribution amount of the epidemic area.
The severity grade of the epidemic area is determined according to the epidemic situation information, the total distribution quantity of the epidemic area is determined according to the supply total quantity and the severity grade of the epidemic area, and the target demand party is determined from the resource demand parties belonging to the epidemic area and the demand grade according to the total distribution quantity and the distribution quantity of the epidemic area, so that the accuracy of resource distribution can be further improved.
In one embodiment, the level determining module 704 may be further configured to obtain epidemic situation information of the epidemic prevention resources; determining the severity level of the epidemic area according to the epidemic situation information; and acquiring the identity type of the resource demand party, and determining the corresponding demand grade according to the severity grade and the identity type of the epidemic area where the resource demand party is located.
The severity grade of the epidemic area is determined through the epidemic situation information, the corresponding demand grade is determined according to the identity type of the resource demand party and the severity grade of the epidemic area, and the accuracy of the demand grade can be improved.
In one embodiment, the allocating module 706 may further be configured to determine, according to the demand level corresponding to the target demand party, an epidemic prevention level of the resource allocated to the target demand party; wherein the demand level is positively correlated with the epidemic prevention level; the information uplink module 708 is further configured to generate an allocation order according to the target demand party and the corresponding allocation amount, epidemic prevention level, and target supply party, and write the allocation order into the block chain to generate a block, where the allocation order is used to instruct the target supply party to allocate resources corresponding to the epidemic prevention level to the target demand party according to the allocation amount.
The epidemic prevention level of the corresponding resource is determined according to the demand level of the target demand party, the distribution order is generated according to the target demand party, the corresponding distribution amount, the epidemic prevention level and the target supply party, and the distribution order is written into the block chain to generate the block, so that the target supply party is instructed to distribute the resource corresponding to the epidemic prevention level to the target demand party according to the distribution amount, the epidemic prevention demands of different demand parties can be coordinated to distribute the resource, and the efficiency of epidemic prevention and the reasonability and accuracy of resource distribution are improved.
In one embodiment, the information obtaining module 702 may be further configured to obtain order information uploaded by a node of the blockchain; the order information is generated after the target supplier distributes resources to the target demand side according to the distribution quantity; the information chaining module 708 is further configured to write the order information into the block chain to generate blocks, so as to synchronize the order information to the target requesting party. In one embodiment, the information chaining module 708 may be further configured to write the order information into a block chain to generate a block when it is determined that the order information matches the information included in the allocation order, so as to synchronize the order information to the target requesting party.
The order information generated after the target supplier distributes the resources to the target demander according to the distribution amount is written into the block chain to generate the block, so that the order information can be made to be public and transparent, and the target demander can receive goods in time according to the order information, so that the efficiency of receiving the resources can be improved.
As shown in fig. 8, in an embodiment, the provided resource allocation apparatus may further include an information updating module 710, where the information updating module 710 is configured to, when it is determined that the target supplier completes the allocation operation according to the order information, acquire resource information sent by the target supplier, and update the resources provided by the resource supplier and the corresponding total supply amount according to the resource information; the information uplink module 708 is further configured to write the updated resources provided by the resource provider and the corresponding total amount of provisioning into the block chain to generate the block.
When the target supplier finishes the allocation operation, the resources provided by the resource supplier and the corresponding total supply amount are updated according to the resource information sent by the target supplier, the updated resources provided by the resource supplier and the corresponding total supply amount are written into the block chain to generate blocks, the resources and the total supply amount can be synchronized to other nodes in a broadcast mode through the blocks, the supply information of the resources can be updated in time, the transparency of the resource supply information is realized, and the fairness and the accuracy of resource allocation are ensured.
For specific limitations of the resource allocation apparatus, reference may be made to the above limitations of the resource allocation method, which is not described herein again. The modules in the resource allocation apparatus may be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent of a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 9. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile 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 operating system and the computer program to run on the non-volatile storage medium. The database of the computer device is for storing resource allocation data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a resource allocation method.
Those skilled in the art will appreciate that the architecture shown in fig. 9 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In an embodiment, a computer device is further provided, which includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method embodiments when executing the computer program.
In an embodiment, a computer-readable storage medium is provided, in which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above examples only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent application shall be subject to the appended claims.

Claims (10)

1. A method for resource allocation, the method comprising:
acquiring a resource allocation request, and acquiring demand information of a resource demand party, resources provided by a resource supply party and a corresponding supply total amount from a block chain according to the resource allocation request;
determining a demand grade corresponding to the resource demand party according to the demand information;
determining a target demand side and a corresponding distribution amount in the resource demand side according to the supply total amount and the demand level corresponding to the resource demand side, and determining a corresponding target supply side from the resource supply side;
determining the epidemic prevention level of the resources distributed to the target demand side according to the demand level corresponding to the target demand side; wherein the demand level is positively correlated with the epidemic prevention level; the epidemic prevention grade is used for expressing the capability strength of the resources for epidemic disease defense, and the higher the epidemic prevention grade is, the stronger the epidemic prevention capability of the corresponding resources is; the epidemic prevention grades of the resources corresponding to the target demands are sequentially determined by combining the supply quantity of the resources corresponding to the epidemic prevention grades according to the sequence of the epidemic prevention grades from high to low; when the resources of the epidemic prevention level corresponding to the demand level of the target demand party are insufficient, taking the next epidemic prevention level of the epidemic prevention level corresponding to the demand level as the epidemic prevention level of the resources distributed to the target demand party;
and generating a distribution order according to the target demand party and the corresponding distribution amount, epidemic prevention level and target supply party, and writing the distribution order into a block chain to generate a block, wherein the distribution order is used for indicating the target supply party to distribute the resources corresponding to the epidemic prevention level to the target demand party according to the distribution amount.
2. The method of claim 1, wherein determining a target one of the resource consumers and a corresponding allocation amount according to the total supply amount and the demand level corresponding to the resource consumer comprises:
acquiring scene information applied by the resource;
determining the allocation amount of the resource demand party belonging to the demand grade according to the scene information;
and determining target demanders from the resource demanders belonging to the demand level according to the distribution amount and the supply total amount.
3. The method of claim 2, wherein the resources comprise epidemic prevention resources, and the scene information applied by the epidemic prevention resources comprises epidemic situation information;
the determining a target demand party from the resource demand parties belonging to the demand level according to the allocation amount and the total supply amount includes:
determining the severity level of the epidemic area according to the epidemic situation information;
determining the distribution total amount corresponding to the epidemic area according to the supply total amount and the severity grade of the epidemic area;
and determining a target demand party from the resource demand parties belonging to the epidemic area and the demand level according to the total distribution amount and the distribution amount of the epidemic area.
4. The method according to claim 1, wherein the determining the demand level corresponding to the resource demander according to the demand information comprises:
when the resources comprise epidemic prevention resources, epidemic situation information of the epidemic prevention resources is obtained;
determining the severity level of the epidemic area according to the epidemic situation information;
and acquiring the identity type of the resource demand party, and determining the corresponding demand grade according to the severity grade of the epidemic area where the resource demand party is located and the identity type.
5. The method according to any one of claims 1 to 4, further comprising:
acquiring order information uploaded by nodes of a block chain; the order information is generated after the target supplier performs distribution operation according to the distribution order;
and when the order information is determined to be matched with the information contained in the distribution order, writing the order information into a block chain to generate a block so as to synchronize the order information to the target demand side.
6. The method of claim 5, further comprising:
when the target supplier is determined to finish the allocation operation according to the order information, acquiring resource information sent by the target supplier, and updating the resources provided by the resource supplier and the corresponding supply total amount according to the resource information;
and writing the updated resources provided by the resource supplier and the corresponding supply total amount into a block chain to generate a block.
7. An apparatus for resource allocation, the apparatus comprising:
the information acquisition module is used for acquiring a resource allocation request, and acquiring the demand information of a resource demand party, the resources provided by a resource supplier and the corresponding supply total amount from a block chain according to the resource allocation request;
the grade determining module is used for determining the requirement grade corresponding to the resource demander according to the requirement information;
the allocation module is used for determining a target demand side and a corresponding allocation amount in the resource demand sides according to the supply total amount and the demand grades corresponding to the resource demand sides, and determining a corresponding target supply side from the resource supply sides; determining the epidemic prevention level of the resources distributed to the target demand side according to the demand level corresponding to the target demand side; wherein the demand level is positively correlated with the epidemic prevention level; the epidemic prevention grade is used for expressing the capability strength of the resources for epidemic disease defense, and the higher the epidemic prevention grade is, the stronger the epidemic prevention capability of the corresponding resources is; the epidemic prevention grades of the resources corresponding to the target demands are sequentially determined according to the sequence of the epidemic prevention grades from high to low and by combining the supply quantity of the resources corresponding to the epidemic prevention grades; when the resources of the epidemic prevention level corresponding to the demand level of the target demand party are insufficient, taking the next epidemic prevention level of the epidemic prevention level corresponding to the demand level as the epidemic prevention level of the resources distributed to the target demand party;
and the information uplink module is used for generating a distribution order according to the target demand side and the corresponding distribution amount, epidemic prevention level and target supply side, and writing the distribution order into a block chain to generate a block, wherein the distribution order is used for indicating the target supply side to distribute resources corresponding to the epidemic prevention level to the target demand side according to the distribution amount.
8. The apparatus of claim 7, wherein the assignment module is further configured to:
acquiring scene information applied by the resource;
determining the allocation amount of the resource demander belonging to the demand grade according to the scene information;
and determining target demanders from the resource demanders belonging to the demand level according to the distribution amount and the supply total amount.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 6.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 6.
CN202010347364.2A 2020-04-28 2020-04-28 Resource allocation method, device, computer equipment and computer readable storage medium Active CN111553594B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010347364.2A CN111553594B (en) 2020-04-28 2020-04-28 Resource allocation method, device, computer equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010347364.2A CN111553594B (en) 2020-04-28 2020-04-28 Resource allocation method, device, computer equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN111553594A CN111553594A (en) 2020-08-18
CN111553594B true CN111553594B (en) 2023-04-14

Family

ID=72003302

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010347364.2A Active CN111553594B (en) 2020-04-28 2020-04-28 Resource allocation method, device, computer equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111553594B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113077154A (en) * 2021-04-06 2021-07-06 河南博元电力科技股份有限公司 Distribution method and system of power engineering resource data
CN113284362A (en) * 2021-05-19 2021-08-20 中国联合网络通信集团有限公司 Bus scheduling method, device, equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3301945A1 (en) * 2016-09-28 2018-04-04 Yiannos Kryftis A system and method for forecasting the demand for multimedia content and for selecting the optimal delivery methods (forecasting middleware scheduler - fms)
CN109087210A (en) * 2018-08-27 2018-12-25 中国联合网络通信集团有限公司 A kind of animal epidemic prevention processing method and system based on block chain technology
CN109327548A (en) * 2018-11-27 2019-02-12 北京瑞卓喜投科技发展有限公司 A kind of block chain update method and block chain more new system
CN109377308A (en) * 2018-09-25 2019-02-22 深圳市元征科技股份有限公司 A kind of supply-demand mode method, system and block chain node device and storage medium
CN110162992A (en) * 2019-05-31 2019-08-23 联想(北京)有限公司 Data processing method, data processing equipment and computer system
CN110557403A (en) * 2019-09-26 2019-12-10 腾讯科技(深圳)有限公司 Resource allocation method and device based on block chain, storage medium and node equipment
CN110659519A (en) * 2019-11-18 2020-01-07 陕西品漠农牧科技发展有限公司 Voucher manufacturing method based on block chain, timestamp and geographic position

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3301945A1 (en) * 2016-09-28 2018-04-04 Yiannos Kryftis A system and method for forecasting the demand for multimedia content and for selecting the optimal delivery methods (forecasting middleware scheduler - fms)
CN109087210A (en) * 2018-08-27 2018-12-25 中国联合网络通信集团有限公司 A kind of animal epidemic prevention processing method and system based on block chain technology
CN109377308A (en) * 2018-09-25 2019-02-22 深圳市元征科技股份有限公司 A kind of supply-demand mode method, system and block chain node device and storage medium
CN109327548A (en) * 2018-11-27 2019-02-12 北京瑞卓喜投科技发展有限公司 A kind of block chain update method and block chain more new system
CN110162992A (en) * 2019-05-31 2019-08-23 联想(北京)有限公司 Data processing method, data processing equipment and computer system
CN110557403A (en) * 2019-09-26 2019-12-10 腾讯科技(深圳)有限公司 Resource allocation method and device based on block chain, storage medium and node equipment
CN110659519A (en) * 2019-11-18 2020-01-07 陕西品漠农牧科技发展有限公司 Voucher manufacturing method based on block chain, timestamp and geographic position

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
胡卿汉 等.区块链架构下医用防疫紧急物资供应信息管理研究——以我国新型冠状病毒肺炎防疫物资定向捐赠为例.《卫生经济研究》.2020,第37卷(第4期),10-14. *

Also Published As

Publication number Publication date
CN111553594A (en) 2020-08-18

Similar Documents

Publication Publication Date Title
JP7139499B6 (en) A method for secure peer-to-peer communication on the blockchain
CN110599181B (en) Data processing method, device and equipment based on block chain and storage medium
CN109242681B (en) Asset data storage method, device, equipment and system
CN109360135B (en) Server, public service data processing method based on block chain and storage medium
CN111444209B (en) Data processing method, device, equipment and medium based on block chain
US20220180990A1 (en) System and method for rewarding healthy behaviors and exchanging health related data
CN110599263A (en) User interaction data processing method and device, storage medium and computer equipment
CN111325581B (en) Data processing method and device, electronic equipment and computer readable storage medium
CN110599348B (en) Method, device, equipment and storage medium for stock right incentive
CN111553594B (en) Resource allocation method, device, computer equipment and computer readable storage medium
CN111209113B (en) Resource allocation method, device, equipment and storage medium based on intelligent contract
CN110599331B (en) Liability collection system, method, equipment and storage medium based on blockchain
CN112200571A (en) Resource distribution method and device based on block chain and electronic equipment
JP7430191B2 (en) Financial product recommendation methods, devices, electronic devices and programs
CN110597919B (en) Block chain-based data management method, device, equipment and storage medium
Westerink‐Duijzer et al. Core allocations for cooperation problems in vaccination
KR20200121114A (en) Block chain-based crytography donation server and donation method without limitation to donation target
CN112200568A (en) Block chain based account creation method and device and electronic equipment
JP2010066806A (en) Advertisement medium information transmission amount distribution evaluation apparatus, method, and program thereof
CN113194143B (en) Block chain account creating method and device and electronic equipment
CN110602215B (en) Resource processing method based on alliance block chain and alliance block chain system
CN110727735B (en) Method, device and equipment for cooperatively completing task event based on block chain technology
US20210064681A1 (en) Entity mapping based on incongruent entity data
KR20190130827A (en) Method for providing block-chain based verified customer review sharing service
CN110610322A (en) Clue data processing method, device and equipment based on block chain 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
GR01 Patent grant
GR01 Patent grant