CN116455979A - Resource allocation method - Google Patents

Resource allocation method Download PDF

Info

Publication number
CN116455979A
CN116455979A CN202310145630.7A CN202310145630A CN116455979A CN 116455979 A CN116455979 A CN 116455979A CN 202310145630 A CN202310145630 A CN 202310145630A CN 116455979 A CN116455979 A CN 116455979A
Authority
CN
China
Prior art keywords
service
contract
intelligent contract
target
user
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.)
Pending
Application number
CN202310145630.7A
Other languages
Chinese (zh)
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.)
Beijing Sankuai Online Technology Co Ltd
Digital Currency Institute of the Peoples Bank of China
Original Assignee
Beijing Sankuai Online Technology Co Ltd
Digital Currency Institute of the Peoples Bank of China
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 Beijing Sankuai Online Technology Co Ltd, Digital Currency Institute of the Peoples Bank of China filed Critical Beijing Sankuai Online Technology Co Ltd
Publication of CN116455979A publication Critical patent/CN116455979A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • 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
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The method comprises the steps that a business server determines intelligent contract content of business activities to be executed, generates an intelligent contract creation request according to the intelligent contract content, sends the intelligent contract creation request to block chain node equipment, and the block chain node equipment creates a target intelligent contract according to the intelligent contract content carried in the intelligent contract creation request, further calls the target intelligent contract when received business data of a user executing business, does not determine business meeting contract conditions according to the received business data through operating the target intelligent contract, and distributes business resources for the user according to the business meeting the contract conditions when the resource distribution time of the target intelligent contract is reached. Therefore, the allocation of the resources is automatically completed by utilizing the target intelligent contracts in the blockchain, contract conditions and allocation links are relatively transparent, and users can monitor fairness of resource allocation and avoid uneven allocation of service resources by service providers.

Description

Resource allocation method
The present application claims priority from the application filed on day 17 11, 2022 by the national intellectual property agency, application number 202211441624.8, entitled "a resource allocation method", the entire contents of which are incorporated herein by reference.
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a resource allocation method.
Background
With the development of internet technology, online services have been rapidly developed and have been widely focused. In the process of executing the online service, corresponding service resources can be allocated according to the service executed by the user.
Currently, an allocation scheme of service resources is generally formulated by a service provider, and the service provider determines the service resources allocated to each user according to the allocation scheme formulated by itself at the time of allocation.
However, the allocation of service resources may involve a large number of users, and it is difficult for a service provider to ensure that the allocation scheme can be accurately performed. Moreover, the current allocation scheme is not sufficiently transparent, and users cannot monitor fairness of resource allocation.
Disclosure of Invention
The present specification provides a resource allocation method to partially solve the above-mentioned problems existing in the prior art.
The technical scheme adopted in the specification is as follows:
the specification provides a resource allocation method, which comprises the following steps:
the business server is used for determining intelligent contract content of business activities to be executed, generating an intelligent contract creation request carrying the intelligent contract content and sending the intelligent contract creation request to the block chain link point equipment;
The blockchain node device is used for responding to the intelligent contract creation request, creating a target intelligent contract according to intelligent contract content carried in the intelligent contract creation request, and storing the target intelligent contract into a blockchain;
the client is used for sending service data of the user execution service to the service server;
the service server is used for receiving the service data and forwarding the service data to the block link point device when the target intelligent contract uplink storage is determined;
the block chain node device is used for calling the target intelligent contract according to the received service data; determining a business meeting the contract conditions of the target intelligent contract according to the business data by operating the target intelligent contract; and when the resource allocation time of the target intelligent contract is reached, allocating service resources for the users executing the service meeting the contract conditions according to the determined service meeting the contract conditions.
Optionally, the client is further configured to generate a participation request according to the identifier of the user in response to the operation of the user, and send the participation request to the service server;
The business server is further configured to respond to the participation request, obtain an activity contract template, generate an activity contract according to the identifier of the user carried by the participation request and the activity contract template, and send the activity contract to the client, where the activity contract is used to prompt the user to participate in a business activity corresponding to the target intelligent contract;
the client is further used for displaying the activity contract; responding to the operation of the user, and sending a signing request to the service server;
the service server is further configured to send, according to the subscription request, the identifier of the user to the block link point device;
the block chain link point device is further configured to receive the identifier of the user, establish a correspondence between the identifier of the user and the target intelligent contract, and store the correspondence in the block chain.
Optionally, the service data of the user execution service includes: a target identifier of the user;
the block chain link point device is further configured to invoke the target intelligent contract when it is determined that the target identifier has a correspondence with the target intelligent contract according to the correspondence between the identifier of the user and the target intelligent contract stored in the block chain.
Optionally, the smart contract content includes a specified time period and a specified keyword of the business activity to be performed; the service data comprises service execution time and service text;
the block link point device is configured to determine, by running the target intelligent contract, whether an execution time included in the service data falls within the specified time period, and whether a service text included in the service data hits the specified keyword; and if the judgment results are yes, determining that the service corresponding to the service data is the service meeting the contract conditions of the target intelligent contract.
Optionally, the block link point device is configured to store the service meeting the contract condition in a block chain; when the resource allocation time of the target intelligent contract is reached, the target intelligent contract is called, the business which is stored in the blockchain and meets the contract conditions is determined by operating the target intelligent contract, and business resources are respectively allocated for users who execute the business which meets the contract conditions.
Optionally, the block link point device is further configured to invoke the target smart contract when the resource allocation time of the target smart contract is reached, and send a data acquisition request to the service server by running the target smart contract;
The service server is used for responding to the data acquisition request and sending the service meeting the contract conditions to the block chain link point equipment;
the block chain node device is further configured to allocate service resources for users executing services conforming to the contract conditions according to the received services conforming to the contract conditions.
Optionally, the smart contract content further includes a first amount of business resources;
the block chain link point device is further used for executing the target intelligent contract, generating a freezing instruction according to the first service resource quantity and sending the freezing instruction to a resource platform;
and the resource platform is used for responding to the freezing instruction and freezing the business resource corresponding to the first business resource amount in the account corresponding to the business server in the resource platform.
Optionally, the smart contract content further includes a second amount of business resources;
the block chain node device is used for calling the target intelligent contract when the resource allocation time of the target intelligent contract is reached, and determining each target user for executing the business conforming to the contract conditions according to each business conforming to the contract conditions by operating the target intelligent contract; for each target user, determining a target resource allocation amount allocated to the target user according to the service which is executed by the target user and meets the contract conditions and the second service resource amount; and distributing service resources to the target user according to the target resource distribution amount.
Optionally, the blockchain node device is specifically configured to generate an allocation instruction according to the target resource allocation amount, and send the allocation instruction to a resource platform;
the resource platform is specifically configured to respond to the allocation instruction, and allocate the service resource corresponding to the target resource allocation amount in the account corresponding to the service server to the account corresponding to the target user.
Optionally, the service resource is digital rmb.
The present specification provides a resource allocation apparatus, the apparatus being applied to a client, the apparatus comprising:
the service data determining module is used for determining service data according to the service executed by the user;
and the first sending module is used for sending the service data to a service server, so that the service server forwards the service data to the blockchain node equipment, the blockchain node equipment judges whether the service data accords with a contract condition based on a target intelligent contract stored in a pre-uplink mode, and when the service data accords with the contract condition, the target service resource allocated to the user is determined and allocated.
The present specification provides a resource allocation apparatus, the apparatus being applied to a service server, the apparatus comprising:
An intelligent contract content determining module for determining intelligent contract content of the business activity to be executed;
the second sending module is used for generating an intelligent contract creation request carrying the intelligent contract content and sending the intelligent contract creation request to the block chain link point equipment, so that the block chain node equipment responds to the intelligent contract creation request, creates a target intelligent contract according to the intelligent contract content carried in the intelligent contract creation request and stores the target intelligent contract into a block chain;
the first receiving module is used for receiving service data of user execution service sent by the client;
and the third sending module is used for forwarding the service data to a block chain node device when determining the uplink storage of the target intelligent contract, so that the block chain node device calls the target intelligent contract according to the received service data, so as to determine the service meeting the contract conditions of the target intelligent contract according to the service data by operating the target intelligent contract, and when the resource allocation time of the target intelligent contract is reached, allocating service resources for users executing the service meeting the contract conditions according to the determined service meeting the contract conditions.
The present specification provides a resource allocation apparatus, the apparatus being applied to a blockchain node device, the apparatus comprising:
the system comprises a creating module, a block chain and a service server, wherein the creating module is used for responding to an intelligent contract creating request sent by the service server, creating a target intelligent contract according to intelligent contract content carried in the intelligent contract creating request and storing the target intelligent contract into the block chain; the intelligent contract creation request is generated by the business server according to intelligent contract content of the business activities to be executed;
the second receiving module is used for receiving service data of user execution service sent by the service server;
the calling module is used for calling the target intelligent contract according to the service data;
the business determining module is used for determining business meeting contract conditions of the target intelligent contract according to the business data by running the target intelligent contract;
and the allocation module is used for allocating service resources for users executing the service meeting the contract conditions according to the determined service meeting the contract conditions when the resource allocation time of the target intelligent contract is reached.
The present specification provides a computer readable storage medium storing a computer program which when executed by a processor implements the above-described resource allocation method.
The present specification provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the above-mentioned resource allocation method when executing the program.
The above-mentioned at least one technical scheme that this specification adopted can reach following beneficial effect:
in the resource allocation method provided by the specification, a business server determines intelligent contract content of business activities to be executed, generates an intelligent contract creation request according to the intelligent contract content, and sends the intelligent contract creation request to a block chain node device, the block chain node device creates a target intelligent contract according to the intelligent contract content carried in the intelligent contract creation request, when receiving business data of a user executing business, the target intelligent contract is called, business meeting contract conditions is not determined according to the received business data by operating the target intelligent contract, and when the resource allocation time of the target intelligent contract is reached, business resources are allocated to the user according to the business meeting the contract conditions. Therefore, the allocation of the resources is automatically completed by utilizing the target intelligent contracts in the blockchain, contract conditions and allocation links are relatively transparent, and users can monitor fairness of resource allocation and avoid uneven allocation of service resources by service providers.
Drawings
The accompanying drawings, which are included to provide a further understanding of the specification, illustrate and explain the exemplary embodiments of the present specification and their description, are not intended to limit the specification unduly. In the drawings:
fig. 1 is a schematic flow chart of a resource allocation method in the present specification;
FIG. 2 is a schematic flow chart of a resource allocation method in the present specification;
FIG. 3 is a schematic diagram of a resource allocation device provided in the present specification;
FIG. 4 is a schematic diagram of a resource allocation device provided in the present specification;
FIG. 5 is a schematic diagram of a resource allocation apparatus provided in the present specification;
fig. 6 is a schematic view of the electronic device corresponding to fig. 1 provided in the present specification.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the present specification more apparent, the technical solutions of the present specification will be clearly and completely described below with reference to specific embodiments of the present specification and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, of the embodiments of the present specification. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are intended to be within the scope of the present disclosure.
In addition, it should be noted that, all actions of acquiring signals, information or data are performed under the condition of conforming to the corresponding data protection rule policy of the country of the location and obtaining the authorization given by the owner of the corresponding device.
With the development of internet technology, more and more users begin to perform online services. In the process of online service, the service platform can allocate corresponding service resources according to the service executed by the user. In different application scenarios, the problem of allocating service resources may be involved in the process of executing different online services by the user.
For example, when the service platform provides a platform for a cloud disk that provides cloud disk storage resources for enterprise users, the users may store data in a network disk provided by the cloud disk providing platform for a storage resource demander. When the user is a power demand party, the service executed by the user needs to be executed through power resources, the service platform can reasonably allocate the power resources for the next executed service of the user according to the historical power required by the historical service executed by the user, so that the service can be normally executed without wasting the power resources. For another example, when the user is in a power resource demand mode and the service executed by the user needs to use the power resource, the service platform can predict the actual power load of the service executed by the user and allocate the power resource for the user so as to ensure that the user has sufficient power resource to normally execute the service. For another example, in an electronic money based transaction scenario, the business platform may assign electronic money to a user based on the user's historical transactions.
Therefore, the problem of allocating service resources widely exists in various different service scenarios, and how to improve the rationality of resource allocation becomes a problem to be solved.
Currently, an allocation scheme of service resources is generally formulated by a service provider, and the service provider determines the service resources allocated to each user according to the allocation scheme formulated by itself at the time of allocation. However, the allocation of service resources may involve a large number of users, and it is difficult for a service provider to ensure that the allocation scheme can be accurately performed. Moreover, the current allocation scheme is not sufficiently transparent, and users cannot monitor fairness of resource allocation.
Based on this, in the resource allocation method provided in the present specification, by creating the target intelligent contract in the block link point device, the block link point device executes the target intelligent contract, determines the service according to the contract condition of the target intelligent contract according to the service data of the service executed by the user, and further allocates the service resource according to the service according to the contract condition when the resource allocation event arrives. The intelligent contracts created in the block chain node equipment are adopted to carry out public and transparent allocation on the service resources, so that the situation that a service provider falsifies interaction rules in the process of activity or the allocation is not public is avoided.
The following describes in detail the technical solutions provided by the embodiments of the present specification with reference to the accompanying drawings.
In the resource allocation method provided in the present specification, the interaction process of the resource allocation method may be performed jointly by the service server, the client, and the blockchain node device. The service server may be implemented by a stand-alone server or a server cluster formed by a plurality of servers. The client may be any form of existing electronic device that supports receiving service server information, such as a notebook computer, a smart phone, a tablet computer, a portable wearable device, and the like. The service server may interact with the client over a wireless network to accept or send information.
Fig. 1 is a schematic flow chart of a resource allocation method in the present specification, which specifically includes the following steps:
s100: the business server determines the intelligent contract content of the business activity to be performed and generates an intelligent contract creation request carrying the intelligent contract content.
In practical application, the service server can be used as a service provider to initiate service activities, and when a user executes a service through the client, the service server can participate in the service activities initiated by the service server, and meanwhile, the service server can allocate service resources, such as storage resources, computing resources, power resources, digital currency and other existing allocable service resources, for the user participating in the service activities. In order to ensure the transparency of the allocation scheme and the allocation process of the business activity and improve the accuracy of allocation, the business resources can be allocated based on the blockchain technology.
Thus, the business server can determine the intelligent contract content of the business activity to be executed, and generate an intelligent contract creation request according to the intelligent contract content, wherein the intelligent contract content can comprise the resource allocation scheme, the intelligent contract condition and the resource allocation time of the business activity, and can also comprise the content of the business resource quantity to be allocated, the appointed time period and the like of the business activity. The intelligent contract content may be stored in the service server in advance, or may be input into the service server by an operator, which is not limited in this specification.
In one or more embodiments provided in the present disclosure, a service server is taken as a cloud disk server, a user is a storage resource demand party, and a service executed by the user is illustrated as storing data in the cloud disk server.
In this scenario, the cloud disk server may provide a certain storage resource for the user to upload and store data. And if the storage resources provided by the current cloud disk server do not meet the storage requirements of the user, the cloud disk server can allocate the storage resources for the user again. A specific implementation may be to automatically allocate storage resources through a target smart contract created and executed by a block link point device. At this time, the smart contract content may include an allocation scheme of storage resources, an amount of storage resources to be allocated, and the like.
S102: the business server sends an intelligent contract creation request to the block link point device.
In practical application, the intelligent contract is recorded by replacing legal language with computer language and is automatically executed by a program on a blockchain network, and because the contract content of the intelligent contract is disclosed as transparent and non-tamperable, in the embodiment of the specification, a business server creates and stores a target intelligent contract by a blockchain point device in a way of sending an intelligent contract creation request to the blockchain point device, and the business resource allocation in the embodiment of the specification is executed by the target intelligent contract, so that the allocation of the business resource can be automatically executed economically and efficiently according to the resource allocation scheme written in the contract based on trust of codes in an egg taking chain. Once the target intelligent contract is created and stored in the uplink, the service server cannot tamper the content of the target intelligent contract and interfere the resource allocation process, and users participating in the service activity can monitor the allocation process without third party arbitration, so that the possibility of disputes in each link is reduced.
S104: and the blockchain node equipment responds to the intelligent contract creation request, creates a target intelligent contract according to the intelligent contract content carried in the intelligent contract creation request, and stores the target intelligent contract into the blockchain.
The intelligent contract content can be program codes required by executing the intelligent contract, the blockchain node equipment in the blockchain receives the intelligent contract creation request, analyzes the intelligent contract content from the request, takes the program codes required by executing the intelligent contract as transaction content, creates the transaction of the consensus target intelligent contract, enables each node equipment in the blockchain to consensus the intelligent contract content by initiating the transaction, and realizes the storage of the intelligent contract in the blockchain after the consensus is passed.
The target smart contracts are stored in the blockchain and may be automatically executed by individual blockchain link point devices on the blockchain.
S106: and the client sends the service data of the user executing service to the service server.
In practical application, when the target user executes the service, the client may generate service data according to the service executed by the target user, where the service data may include data such as time of service execution, service text, transaction objects in the service, and identification of the user executing the service.
The service server is taken as a cloud disk server, the user is taken as a storage resource demand party, the service executed by the user is data stored in the cloud disk, and the scene of occupying storage resources is taken as an example, and the service data can be determined to comprise the data such as the storage time, the data volume and the name of the storage data, the identification of the user and the like according to the service of storing the data in the cloud disk by the user. Wherein in this scenario the business text in the business data may be a name derived from the stored data. For example, in a scenario that a user uploads a file to a cloud disk, the cloud disk server may allocate additional storage space to the user who shares the knowledge file, so if the name of the file uploaded by the user includes a text such as "science popularization data" that can indicate that the file is a shared knowledge file, the additional storage space may be allocated to the user, so as to avoid that the user is limited by the number of storage resources when sharing the knowledge file.
The client sends the service data to the service server, and the service server records the data of the service executed by the user on one hand, and forwards the service data to the block link point device to participate in the service activity on the other hand.
S108: and the service server receives the service data sent by the client.
In practical application, the service server can store the service data of the user execution service, so that when the details of the user execution service need to be queried in other subsequent services, the service data can be invoked for query.
In the embodiment of the present disclosure, after receiving the service data sent by the client, the service server may store the service data and forward the service data to the blockchain node device, so that the blockchain node device executes the target intelligent contract according to the service data.
S110: and when the business server determines the uplink storage of the target intelligent contract, forwarding business data to the blockchain node equipment.
In general, the target smart contract may be stored in the uplink as a timing when the target smart contract starts to take effect, and at this time, the blockchain node device can execute the target smart contract only when the service server forwards the service data to the blockchain node device. In practical applications, the target smart contract is deployed on the blockchain and automatically executed by the blockchain node device, and the execution timing of the target smart contract can be written in the smart contract content, such as the execution time node of the target smart contract included in the smart contract content.
Of course, in one or more embodiments of the present description, to prevent data leakage caused by service data upbound storage, a digest of the service data may be stored in the blockchain.
S112: and the block chain node equipment invokes the target intelligent contract according to the received service data, and determines the service meeting the contract conditions of the target intelligent contract according to the service data by operating the target intelligent contract.
At present, the traditional resource allocation scheme is easy to cause information asymmetry, information separation, difficult tracing and other conditions in the process of formulating the resource allocation scheme, for example, an activity initiator does not execute according to a preset allocation scheme when allocating resources, which results in lower reliability of resource allocation.
In view of the above problems, in the embodiments of the present disclosure, by using the non-repudiation and traceability characteristics of the blockchain in a manner that the blockchain node device determines whether to conform to the contract conditions of the target intelligent contract according to the service data, the previously agreed allocation scheme can be made transparent, and meanwhile, the accuracy and the reliability of allocation are ensured to be improved in the resource allocation process based on the intelligent contract.
Specifically, the target intelligent contract includes contract conditions, and only when the business data meets the conditions of the target intelligent contract, the business corresponding to the business data can be determined to be the business meeting the contract conditions of the target intelligent contract. Taking the service executed by the user as an example of storing data in the cloud disk, if the contract condition in the target intelligent contract specifies that the execution time of the service is between 0 and 20 hours per day, when the storage time of the data stored in the cloud disk by the user is 21 nights, it can be determined that the service of storing the data in the cloud disk by the user does not meet the contract condition.
S114: and when the resource allocation time of the target intelligent contract is reached, the block chain node equipment allocates service resources for the users executing the service meeting the contract conditions according to the determined service meeting the contract conditions.
Specifically, the block link point device may determine, according to a preset service resource allocation rule in the target intelligent contract, a target resource amount allocated to each user of the service meeting the contract condition, and allocate a resource corresponding to the target resource amount to the user. For example, based on the remaining storage resources in the storage resource account of the user, the storage resource corresponding to the target resource amount is increased.
The opportunity for the blockchain node device to determine whether the service data meets the contract condition may be a preset resource allocation time, for example, when 19 days are required, the blockchain node device may start to determine services meeting the contract condition one by one according to the received service data. In the above example, the resource allocation time to trigger the block link point device to execute the target smart contract is 19 hours per day. It should be noted that, the resource allocation time is a time node for executing the target intelligent contract by the block link point device, the execution time in the contract condition is a rule for judging whether the service data accords with the contract condition, and the two are not necessarily related, that is, the resource allocation time may be earlier, later or equal to the execution time, which is not limited in the present specification.
Based on the resource allocation method shown in fig. 1, a business server determines intelligent contract content of a business activity to be executed, generates an intelligent contract creation request according to the intelligent contract content, sends the intelligent contract creation request to a block chain node device, and the block chain node device creates a target intelligent contract according to the intelligent contract content carried in the intelligent contract creation request, further calls the target intelligent contract when the received business data of a user executing business, does not determine business meeting contract conditions according to the received business data by operating the target intelligent contract, and allocates business resources for the user according to the business meeting contract conditions when the resource allocation time of the target intelligent contract is reached. Therefore, the allocation of the resources is automatically completed by utilizing the target intelligent contracts in the blockchain, contract conditions and allocation links are relatively transparent, and users can monitor fairness of resource allocation and avoid uneven allocation of service resources by service providers.
In one or more embodiments of the present disclosure, since the execution of the target smart contract needs to be based on the service data of the user executing the service, to ensure that the execution of the target smart contract is performed under the permission of the user, the user signs up for the target smart contract to ensure compliance of the block link point device to invoke the service data of the user to execute the target smart contract, which is specifically implemented through the following steps, as shown in fig. 2.
S200: and the client responds to the operation of the user and generates a participation request according to the identification of the user.
After the target smart contract is created and stored in the blockchain as shown in step S104 of fig. 1, the blockchain link point device may send a create response to the business server to alert the business server that the target smart contract has been created. At this time, the service server may send a service activity message to the client to prompt the user to participate in the resource allocation of the service activity by executing the service.
Still taking the user as a storage resource demand party, taking the example that the service executed by the user is data stored in the cloud disk, the cloud disk server can send a service activity message to the client so as to prompt the user to allocate the service activity to the storage resource. The user can select whether to participate in the business activity according to the self requirement, and further, the client can respond to the operation of the user and generate a participation request according to the identification of the user, and the participation request can characterize the participation of the user in the business activity.
Optionally, the contract conditions of the target smart contract may also be carried in the business activity message, so that the user supervises the execution of the target smart contract. Of course, the user can also access the blockchain to find the stored target smart contract to achieve the above objective. The present description does not limit the manner in which a user oversees a target smart contract.
The user may send a participation request to the service server via the client, wherein the participation request may be generated according to the identity of the user to indicate which participation request was sent by which user via the client.
S202: the participation request is sent to the service server.
S204: and the business server responds to the participation request, acquires an activity contract template, and generates an activity contract according to the identification of the user carried by the participation request and the activity contract template.
Specifically, the business server stores an activity contract template corresponding to the business activity in advance, and an activity contract generated through the activity contract template is used for requesting to acquire business data of the user to execute the target intelligent contract so as to participate in the business activity. The identification of the user corresponds to the activity contracts one by one in a mode of generating the activity contracts according to the identification of the user and the activity contract template.
S206: the activity contract is returned to the client.
S208: the client exposes the activity contracts.
The activity contract can agree with the type and rule of the business activity, and also agree with what data of the user needs to be acquired, for example agree to acquire only the business data corresponding to the business executed by the user, but not acquire other types of data.
S210: and responding to the operation of the user, and sending a signing request to the service server by the client.
Specifically, the input interface of the client may include a control for prompting the user to sign an activity contract and a control for canceling the sign of the activity contract, so as to prompt the user to perform operations on the displayed activity contract. When the user operates a control for prompting the user to sign an activity contract, the client side can generate a signing request according to the operation and send the signing request to the service server so that the service server can execute subsequent operation according to the signing request. When a user operates a control for prompting the user to cancel signing an active contract, the client can generate a signing canceling request according to the operation and send the signing canceling request to the service server, so that the service server determines that the user does not sign a contract on the active contract according to the signing canceling request, and further, the authority of the blockchain node equipment to acquire the service data of the user is canceled, and the data leakage caused by illegal calling of the service data of the user is avoided.
S212: and the service server sends the identification of the user to the blockchain node equipment according to the subscription request.
S214: and the blockchain node equipment receives the identification of the user, establishes the corresponding relation between the identification of the user and the target intelligent contract and stores the corresponding relation in the blockchain.
Through the scheme, before the blockchain node device executes the target intelligent contract based on the service data, the user sends the signing request through the client on the premise of knowing the activity contract through interaction between the service server and the client, and when the blockchain node device receives the signing request, the corresponding relation between the identification of the user and the target intelligent contract exists in the blockchain, the signing of the user on the target intelligent contract is marked, and the compliance of the blockchain node device executing the target intelligent contract is ensured.
In one or more embodiments of the present disclosure, based on an interaction flow of a resource allocation method shown in fig. 2, when the blockchain node device executes the target smart contract on the premise of ensuring compliance of the blockchain node device to execute the target smart contract, it may be first determined that a user executing a service corresponding to current service data has contracted with the target smart contract according to a target identifier included in service data of the user executing the service.
First, the target identifier of the user can be parsed from the service data of the user execution service.
Specifically, as described in step S106 of fig. 1, the service data recorded when the user executes the service may include the user identifier, where the user identifier may be used as the unique identifier for characterizing the user identity.
And secondly, according to the target identification of the user, searching whether the corresponding relation between the target identification and the target intelligent contract exists or not from the corresponding relation between the identification of the user stored in the blockchain and the target intelligent contract.
To ensure compliance of blockchain node devices to execute target smart contracts based on business data, in one or more embodiments of the present disclosure, a target smart contract can be executed using a subscriber's business data when the subscriber signs up for the target smart contract. This requires the block link point device to determine whether the user performing the service corresponding to the service data has contracted before invoking the target smart contract.
Based on the interactive flow of the resource allocation method shown in fig. 2, the identifier of the user who has contracted to the target intelligent contract is already stored in the blockchain, and the corresponding relationship with the target intelligent contract. The blockchain node device can invoke the service data of the users to execute the target intelligent contract as long as the user identification exists in the corresponding relationship.
Then, when it is determined that there is a correspondence between the target identifier and the target smart contract, the target smart contract is invoked and executed.
In one or more embodiments of the present disclosure, in determining, according to the service data, a service meeting the contract condition of the target smart contract, as shown in step S112 of fig. 1, specifically, when the smart contract content includes a specified time period and a specified keyword of the service activity to be performed, and the service data includes the execution time of the service and a service text, the block link point device may determine, according to the data, whether the service corresponding to the service data meets the contract condition.
Specifically, the blockchain node device runs the target intelligent contract, judges whether the execution time contained in the service data falls into the specified time period, and judges whether the service text contained in the service data hits the specified keyword.
In practical applications, the contract conditions of the target smart contract may be: the execution time of the service falls within a specified time period and the service text hits a specified keyword. When the two contract conditions are met, the business can be determined to be the business meeting the contract conditions of the target intelligent contract.
Still take the user as a storage resource demand party, the service executed by the user is taken as an example of storing data in a cloud disk, in the intelligent contract content of the target intelligent contract, the appointed time period of the service activity is 0 to 20 times per day, the appointed keyword is science popularization data, the execution time recorded in the service data is within 0 to 20 times, and the service corresponding to the service data can be determined to be the service meeting the contract condition of the target intelligent contract when the science popularization data is contained in the service text. When one of the two conditions is not satisfied, the business data corresponding business does not accord with the contract condition of the target intelligent contract.
Based on the above example, if the execution time of the service included in the service data is 17 and the service text is "environmental protection science popularization material", it may be determined that the execution time included in the service data falls within a specified time period and the service text hits a specified keyword, at this time, it may be determined that the service corresponding to the service data meets the contract condition of the target intelligent contract. On the contrary, if the execution time of the service included in the service data is 21, the service text is "environmental protection science popularization data", and since the execution time does not fall into the specified time period, even if the service text hits the specified keyword, it is determined that the service corresponding to the service data does not meet the contract condition.
Of course, the above-mentioned specified time period and specified keywords included in the smart contract content are only examples given in one or more embodiments of the present specification, and other content, such as an upper frequency limit of service execution, may also be included in the smart contract content. The smart contract content may be determined before the service server sends the smart contract creation request to the block link point device, which is not limited in this specification.
In addition, it should be noted herein that the smart contract content is modifiable before the target smart contract is created by the blockchain node device, but is not modifiable after the target smart contract is created and stored on the blockchain.
In one or more embodiments of the present description, the manner in which the blockchain node device executes the target smart contract based on the business data is two:
one is to store the business meeting the contract conditions in the blockchain, and when the resource allocation time is reached, the target intelligent contract is directly operated through the business stored in the blockchain.
In the scheme, data related to the user is required to be stored in the blockchain, and because the uplink storage of the service data possibly has the problem of privacy security, only the abstract of the service data and the user account identifier can be stored, and when the blockchain node equipment distributes service resources, the user account identifier is searched, and the follow-up verification can be performed according to the abstract, so that the link storage of the service data per se is not required, and the leakage of the privacy data is avoided.
Secondly, the service data are stored in a service server, and when the resource allocation time is reached, the block chain node equipment accesses the service server to call the service data, determines the service which is stored in the block chain and accords with the contract condition, and allocates service resources for users who execute the service which accords with the contract condition respectively.
Specifically, in this scheme, the service data is stored in the service server, and when the service server sends the service data, the block link point device may first determine, according to the service data, whether the service corresponding to the service data meets the contract condition, and return the identification of the determination result of each service data to the service server, where the service server binds the service data and the determination result thereof. When the resource allocation time of the target intelligent contract is reached, the block chain node equipment invokes the target intelligent contract, generates a data acquisition request for requesting to acquire service data corresponding to a service meeting the contract conditions according to the determined judgment result by operating the target intelligent contract, and sends the data acquisition request to a service server. And the service server responds to the data acquisition request and transmits the service meeting the contract conditions to the block link point equipment so that the block link point equipment allocates service resources for users executing the service meeting the contract conditions according to the received service meeting the contract conditions.
In an optional embodiment of the present disclosure, when the blockchain node device creates a target smart contract according to the smart contract content carried in the smart contract creation request and stores the smart contract in the blockchain as shown in step S104 of fig. 1, the business server may freeze, in an account in the resource platform, a business resource corresponding to the first business resource according to the first business resource amount included in the smart contract content, so as to avoid an insufficient resource amount when the blockchain node device allocates the business resource.
Specifically, the block link point device executes the target intelligent contract, generates a freezing instruction according to the first service resource amount, and sends the freezing instruction to the resource platform, and after receiving the freezing instruction, the resource platform responds to the freezing instruction to freeze the service resource corresponding to the first service resource amount in the account corresponding to the service server in the resource platform. Optionally, the service resource corresponding to the frozen first service resource amount can only be called and allocated by the block link point device at the designated time node, such as the resource allocation time contained in the intelligent contract content. Of course, other trigger times may be written in the smart contract content, which is not limited in this specification.
In one or more embodiments of the present disclosure, the blockchain node device allocates, according to the determined service meeting the contract condition, a service resource for a user executing the service meeting the contract condition, as shown in step S114 of fig. 1, where the service resource allocated by the blockchain node device may be a second service resource amount included in the intelligent contract content, and may be implemented specifically in the following manner;
firstly, when the resource allocation time of the target intelligent contract is reached, the block chain node equipment invokes the target intelligent contract, and determines each user executing the business conforming to the contract conditions according to each business conforming to the contract conditions by operating the target intelligent contract.
Specifically, since the service data may include the identifier of the user, and the identifier of the user may be an identifier for characterizing the identity of the user, each target user who executes the service conforming to the contract condition may be determined by the identifier of the user in the service data corresponding to the service conforming to the contract condition. Typically, a service is performed by a user, but a user may perform a plurality of contractual services.
And secondly, determining the target resource allocation amount allocated to each target user according to the business which is executed by the target user and meets the contract conditions and the second business resource amount.
Further, the target resource allocation amount not allocated to the target user may be determined according to the resource allocation scheme in the smart contract content of the target smart contract. The resource allocation scheme is preset in the intelligent contract content and cannot be changed in the execution process of the target intelligent contract. The resource allocation scheme may be an average allocation according to the number of services, or an sequential allocation according to the execution time, or may be any other allocation scheme, which may be preset in the content of the intelligent contract according to a specific application scenario, and this description is not limited to this.
Taking the user as a storage resource demand party, taking the service executed by the user as an example of storing data in a cloud disk, aiming at all the services which are executed within a specified time period and meet the contract conditions, each service corresponds to one storage resource, if 100 services are in total and meet the contract conditions, a certain target user executes 10 services which meet the storage data of the contract conditions within the specified time period, and then the target user can be allocated with storage resources corresponding to 10% of the second service resource quantity.
And then, distributing service resources to the target user according to the target resource distribution amount.
Specifically, the client may also send the resource account identifier of the user and the user identifier of the user to the service server together with the service data. The purpose of the client sending the resource account identification of the user is that when the blockchain node device allocates resources, the resources allocated to the target user can be allocated to the resource account of the user. And the user identification of the user can be used for verifying the validity of the user participating in resource allocation when the block link point device allocates the resource.
In addition, the user's resource account may be an electronic account opened in the resource platform or an electronic account in the blockchain, and the specification does not limit the type of the user's resource account.
In an alternative embodiment of the present disclosure, when the blockchain node device allocates service resources for the users executing the service meeting the contract conditions as shown in step S114 of fig. 1, the allocation of service resources may also be performed through interaction between the blockchain node device and the resource platform, specifically by the following two ways.
The first way is to perform interactive service resource allocation between the service server and the resource platform:
The block chain node equipment generates a first allocation instruction according to the target resource allocation amount, the first allocation instruction is sent to the service server, the service server responds to the first allocation instruction, generates a second allocation instruction according to the target resource allocation amount carried by the first allocation instruction, and sends the second allocation instruction to the resource platform, and the resource platform responds to the second allocation instruction, allocates the service resources corresponding to the target resource allocation amount to the account corresponding to the target user in the account corresponding to the service server.
The second way is to perform service resource allocation for the interaction between the block link point device and the resource platform:
the block chain node equipment generates an allocation instruction according to the target resource allocation amount, the allocation instruction is sent to the resource platform, the resource platform responds to the allocation instruction, and business resources corresponding to the target resource allocation amount are allocated to the accounts corresponding to the target users in the accounts corresponding to the business servers.
In an optional embodiment of the present disclosure, before the user performing the service meeting the contract conditions allocates the service resource as shown in step S114 of fig. 1, the allocation result obtained by the blockchain node device may be further identified by the identifying node device on the blockchain to verify that the service allocation performed by the blockchain node device to perform the target intelligent contract is accurately and reliably implemented by the following scheme:
First, the target resource allocation amount is broadcast on the blockchain by a blockchain node device.
Wherein the target resource allocation amount is a traffic resource amount allocated to each target user determined by the blockchain node device based on the traffic meeting the contract condition.
And secondly, executing the target intelligent contract by the consensus node equipment to obtain the designated resource allocation amount allocated to the target user.
And then, the consensus node equipment performs consensus verification according to the designated resource allocation amount and the received target resource allocation amount, and obtains a verification result and broadcasts the verification result on the block chain.
And finally, the block chain node equipment receives the verification result, and allocates service resources to the target user according to the target resource allocation amount when the verification result is verification passing.
In addition, the type of the service resource is not limited in the present specification, and the service resource may be any existing service resource that can be allocated, such as a storage resource, an algorithm resource, an electric resource, and a digital currency.
In one or more embodiments of the present description, the business resource may be digital RMB.
Wherein the digital RMB is a legal digital currency issued by a central office, which is operated by a designated operating institution (such as a digital RMB platform) and redeemed to the public, equivalent to paper money and coins.
It will be appreciated that the type of service resource described above for the "digital rmb" is only an alternative to the present description, and the embodiments of the present description are not limited to the form of currency being dispensed. But as embodiments of the present description may be used in the context of an online transaction for a user, the business resource may be digital currency, such as digital rmb, available to the user when performing an online transaction.
In the present specification, "digital money" refers to money in digital form, which corresponds to cash and coins in circulation. "currency" herein refers to currency in the true sense, not tokens. The technical solution of the present specification based on "digital money" refers in particular to "legal money" with a national basis for authority information, such as digital rmb. The description is not limited in that it can be extended to other credit-based virtual digital currencies, such as bitcoin.
Based on the above-mentioned service resource is the scene of digital RMB, the user can use digital RMB to make commodity trade service through the customer end, the service server can be the server supporting the trade platform of commodity trade made of digital RMB, the user can have account in digital RMB platform, when making commodity trade service, call digital RMB in account of digital RMB platform to make payment.
Based on this scenario, the business server may initiate a business activity related to the digital RMB, which the user may engage in to participate in the allocation of the digital RMB. Accordingly, in the smart contract content in which the service server determines the service activity to be performed as shown in step S100 of fig. 1, the smart contract determined by the service server may include an allocation scheme of the digital rmb, an allocation time, a total amount of the digital rmb to be allocated, contract conditions, and the like. Wherein the contract conditions limit conditions of a service or a user capable of participating in the allocation of the digital RMB.
Further, in step S106 of fig. 1, the client sends the service data of the user executing service to the service server, and in combination with the scenario of the service resource being digital rmb, the transaction service data may be determined according to the digital rmb transaction service executed by the user, where the transaction service data may include data such as time of transaction, name of the transaction object, identification of the user executing the transaction, and amount of the digital rmb used.
Still further, in the blockchain node device determines, according to the service data, a service meeting the contract conditions of the target intelligent contract by running the target intelligent contract as shown in step S112 of fig. 1, in combination with the scenario that the service resource is a digital rmb, the digital rmb transaction service meeting the contract conditions may be determined according to the transaction service data of the user executing the digital rmb transaction service. Specifically, according to contract conditions agreed in the intelligent contract content of the target intelligent contract, only when all types of data contained in the transaction service data meet the contract conditions, determining that the digital RMB transaction corresponding to the transaction service data is a digital RMB transaction service conforming to the contract conditions.
For example, taking a time period in which a transaction is contracted in a contract condition as an example, if an execution time period of a transaction service contracted in a contract condition in a target smart contract is 0 to 20 hours per day, it can be determined that the purchase service meets the contract condition when a purchase time of a user using a digital RMB for the purchase service is 19 hours. And if the user uses the digital RMB to make a purchase service when the purchase time is 21, determining that the purchase service does not meet the contract condition.
Finally, when the blockchain node device allocates service resources for the user executing the service according to the determined service according to the contract condition as shown in step S114 of fig. 1, the blockchain link point device may determine the amount of the digital rmb allocated to the user in combination with the scenario of the digital rmb for the service resources, then generate an allocation instruction according to the amount and send the allocation instruction to the digital rmb platform, and the digital rmb issues the amount of the digital rmb in the allocation instruction to the digital rmb account of the user.
In one or more embodiments of the present description, to ensure that execution of the target smart contract is under the permission of the user, the user may sign up for the target smart contract to ensure compliance of the block link point device invoking the user's business data to execute the target smart contract. Based on this, in the generation of the participation request by the client according to the user' S identification as shown in step S200 of fig. 2, the transaction server may send a business activity message to the client in combination with the scenario of the business resource as the digital rmb, prompting the user to melon the digital rmb by participating in the business activity. The user can select whether to participate in the business activity of the melon digital RMB according to the self requirement, and further, the client can respond to the operation of the user and generate a participation request according to the identification of the user, and the participation request can characterize the participation of the user in the business activity.
In addition, in an alternative embodiment of determining a business meeting the contract conditions of the target smart contract as shown in step S112 of fig. 1, a business meeting the contract conditions of the target smart contract may be determined using a specified time period and a specified keyword of a business activity to be performed included in the smart contract content. In the above embodiment, in combination with the scenario that the service resource is digital rmb, the block link point device may determine the transaction service according to the transaction data of the purchase service performed by the user using the digital rmb, and the transaction event period and the transaction keyword included in the smart contract content. Specifically, the block link point device runs the target intelligent contract, judges whether the transaction time contained in the transaction data falls into the transaction time period, and judges whether the transaction text contained in the transaction data hits the transaction keyword. And when both conditions are satisfied, the transaction service is regarded as a service conforming to the contract conditions.
For example, in the intelligent contract content, when the transaction time period of the business activity is 0 to 20 hours per day, the transaction keyword is "digital RMB", and when the transaction time recorded in the transaction data is 0 to 20 hours and the transaction text contains "digital RMB", the digital RMB transaction business corresponding to the transaction data can be determined to be the business meeting the contract condition. When one of the two conditions is not satisfied, the digital RMB transaction service does not conform to the contract condition.
Based on the above example, if the transaction time contained in the transaction data is 17, the transaction text is "shopping with digital RMB", it may be determined that the execution time contained in the transaction data falls within the transaction time period, and the transaction text hits the transaction keyword, at which time it may be determined that the digital RMB transaction service meets the contract condition of the target smart contract. On the contrary, if the execution time of the service included in the transaction data is 21, the transaction text is "shopping with digital RMB", and since the transaction time does not fall within the transaction time period, even if the transaction text hits the transaction keyword, it is determined that the digital RMB transaction service does not meet the contract condition.
Further, in an alternative embodiment of the present disclosure, when the blockchain node device allocates the service resource for the user performing the service meeting the contract condition as in step S114 of fig. 1, the allocation may be performed according to the second service resource amount included in the smart contract content. In combination with the scenario that the service resource is digital RMB, the content of the intelligent contract can be the total amount of the digital RMB to be distributed. Specifically, the block link point apparatus first determines each target user who performs a business conforming to the contract conditions, and then determines, for each target user, the amount of digital rennet money allocated to that target user. For example, the blockchain node device allocates digital RMB to a total of 1000 RMB. If 100 business accords with the contract condition, a certain target user executes 10 business of stored data which accords with the contract condition in a specified time period, the blockchain node device executes the target intelligent contract, and the amount of the digital RMB allocated to the target user is determined to be 100 yuan.
Further, after the blockchain node device determines the amount of the digital rmb allocated to each target user, the blockchain link node device may generate an allocation instruction according to the amount of the digital rmb allocated to the target user, where the object of sending the allocation instruction by the blockchain link node device may be a transaction server or a digital rmb platform. Of course, after the blockchain node device sends the allocation instruction to the transaction server, the transaction server also forwards the allocation instruction to the digital RMB platform. And then, the digital RMB platform distributes the digital RMB to the digital RMB account of the target user according to the amount in the distribution instruction.
The above resource allocation method provided for one or more embodiments of the present disclosure further provides a corresponding resource allocation device based on the same concept, as shown in fig. 3, 4 and 5.
Fig. 3 is a schematic diagram of a resource allocation apparatus provided in the present specification, where the apparatus is applied to a client, and specifically includes:
a service data determining module 300, configured to determine service data according to a service executed by a user;
and the first sending module 302 is configured to send the service data to a service server, so that the service server forwards the service data to the blockchain node device, and the blockchain node device determines whether the service data meets a contract condition based on a target intelligent contract stored in a pre-uplink manner, and determines and allocates a target service resource allocated to the user when the service data meets the contract condition.
Optionally, the apparatus further comprises:
the signing module 304 is specifically configured to respond to an operation of a user, and generate a participation request according to an identifier of the user; the participation request is sent to the service server, so that the service server responds to the participation request, obtains an activity contract template, and generates and returns an activity contract according to the identification of the user carried by the participation request and the activity contract template; displaying the received activity contracts, wherein the activity contracts are used for prompting the user to participate in business activities corresponding to the target intelligent contracts; and responding to the operation of the user, sending a signing request to the service server, so that the service server sends the identification of the target user to block chain link point equipment according to the signing request, and the block chain node equipment stores the corresponding relation between the identification of the user and the target intelligent contract in the block chain.
Optionally, the apparatus further comprises:
a response receiving module 306, configured to specifically receive a first resource allocation response sent by the service server; the first resource allocation response is used for prompting the user service resource allocation result, the first resource allocation response is generated by the service server according to a second resource allocation response sent by the block chain node device, and the second resource allocation response is generated by the block chain node device after service resource allocation is carried out and is sent to the service server.
Fig. 4 is a schematic diagram of a resource allocation device provided in the present specification, where the device is applied to a service server, and specifically includes:
an intelligent contract content determining module 400 for determining intelligent contract content of a business activity to be performed;
a second sending module 402, configured to generate an intelligent contract creation request carrying the intelligent contract content, and send the intelligent contract creation request to a blockchain link point device, so that the blockchain node device responds to the intelligent contract creation request, creates a target intelligent contract according to the intelligent contract content carried in the intelligent contract creation request, and stores the target intelligent contract into a blockchain;
a first receiving module 404, configured to receive service data of a user execution service sent by a client;
and a third sending module 406, configured to forward, when determining that the target intelligent contract is stored in a uplink manner, the service data to the block link node device, so that the block link node device invokes the target intelligent contract according to the received service data, so as to determine, by running the target intelligent contract, a service meeting the contract conditions of the target intelligent contract according to the service data, and when reaching the resource allocation time of the target intelligent contract, allocate, according to the determined service meeting the contract conditions, a service resource for a user executing the service meeting the contract conditions.
Optionally, the apparatus further comprises:
the activity contract generating module 408 is specifically configured to obtain an activity contract template in response to a participation request sent by the client, and generate an activity contract according to the user identifier carried by the participation request and the activity contract template; wherein the participation request is generated by the client in response to the operation of a user according to the identification of the user; the activity contract is used for prompting the user to participate in the business activity corresponding to the target intelligent contract; sending the activity contract to the client so that the client displays the activity contract; and responding to the signing request sent by the client, and sending the identification of the user to the blockchain link point device, so that the blockchain node device stores the corresponding relation between the identification of the user and the target intelligent contract in the blockchain.
Optionally, the third sending module 406 is specifically configured to send, in response to a data acquisition request sent by the blockchain node device, service data corresponding to a service meeting the contract condition of the target intelligent contract to the blockchain node device, so that the blockchain node device allocates service resources for a user executing each service meeting the contract condition according to the received service data corresponding to each service meeting the contract condition; the data acquisition request is sent by the blockchain node device by calling the target intelligent contract when the resource allocation time of the target intelligent contract is reached.
Fig. 5 is a schematic diagram of a resource allocation apparatus provided in the present specification, where the apparatus is applied to a block link point device, and specifically includes:
the creating module 500 is configured to respond to an intelligent contract creating request sent by the service server, create a target intelligent contract according to intelligent contract content carried in the intelligent contract creating request, and store the target intelligent contract into a blockchain; the intelligent contract creation request is generated by the business server according to intelligent contract content of the business activities to be executed;
a second receiving module 502, configured to receive service data of a user execution service sent by the service server;
a calling module 504, configured to call the target intelligent contract according to the service data;
a service determining module 506, configured to determine, by running the target smart contract, a service that meets a contract condition of the target smart contract according to the service data;
and the allocation module 508 is configured to allocate service resources for the user executing the service meeting the contract conditions according to the determined service meeting the contract conditions when the resource allocation time of the target intelligent contract is reached.
Optionally, the apparatus further comprises:
The storage module 510 is specifically configured to receive an identifier of a user sent by a service server, establish a correspondence between the identifier of the user and the target intelligent contract, and store the correspondence in the blockchain; wherein the user identification is sent by the service server in response to a subscription request sent by a client; the signing request is sent by the client side in response to the operation of the user when the activity contract is displayed; the activity contract is a participation request generated by the business server in response to the client according to the operation of the user and the identification of the user, and is generated and sent to the client according to the identification of the user and the activity contract template carried in the participation request.
The present specification also provides a computer readable storage medium storing a computer program operable to perform the resource allocation method provided in fig. 1 above.
The present specification also provides a schematic structural diagram of the electronic device shown in fig. 6. At the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile storage, as illustrated in fig. 6, although other hardware required by other services may be included. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs to implement the resource allocation method described above with respect to fig. 1. Of course, other implementations, such as logic devices or combinations of hardware and software, are not excluded from the present description, that is, the execution subject of the following processing flows is not limited to each logic unit, but may be hardware or logic devices.
In the 90 s of the 20 th century, improvements to one technology could clearly be distinguished as improvements in hardware (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) or software (improvements to the process flow). However, with the development of technology, many improvements of the current method flows can be regarded as direct improvements of hardware circuit structures. Designers almost always obtain corresponding hardware circuit structures by programming improved method flows into hardware circuits. Therefore, an improvement of a method flow cannot be said to be realized by a hardware entity module. For example, a programmable logic device (Programmable Logic Device, PLD) (e.g., field programmable gate array (Field Programmable Gate Array, FPGA)) is an integrated circuit whose logic function is determined by the programming of the device by a user. A designer programs to "integrate" a digital system onto a PLD without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Moreover, nowadays, instead of manually manufacturing integrated circuit chips, such programming is mostly implemented by using "logic compiler" software, which is similar to the software compiler used in program development and writing, and the original code before the compiling is also written in a specific programming language, which is called hardware description language (Hardware Description Language, HDL), but not just one of the hdds, but a plurality of kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), lava, lola, myHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog are currently most commonly used. It will also be apparent to those skilled in the art that a hardware circuit implementing the logic method flow can be readily obtained by merely slightly programming the method flow into an integrated circuit using several of the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable logic controllers, and embedded microcontrollers, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic of the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller in a pure computer readable program code, it is well possible to implement the same functionality by logically programming the method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. Such a controller may thus be regarded as a kind of hardware component, and means for performing various functions included therein may also be regarded as structures within the hardware component. Or even means for achieving the various functions may be regarded as either software modules implementing the methods or structures within hardware components.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. One typical implementation is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functions of each element may be implemented in one or more software and/or hardware elements when implemented in the present specification.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
It will be appreciated by those skilled in the art that embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the present specification may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present description can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing is merely exemplary of the present disclosure and is not intended to limit the disclosure. Various modifications and alterations to this specification will become apparent to those skilled in the art. Any modifications, equivalent substitutions, improvements, or the like, which are within the spirit and principles of the present description, are intended to be included within the scope of the claims of the present description.

Claims (10)

1. A method for resource allocation, comprising:
the business server is used for determining intelligent contract content of business activities to be executed, generating an intelligent contract creation request carrying the intelligent contract content and sending the intelligent contract creation request to the block chain link point equipment;
the blockchain node device is used for responding to the intelligent contract creation request, creating a target intelligent contract according to intelligent contract content carried in the intelligent contract creation request, and storing the target intelligent contract into a blockchain;
The client is used for sending the service data of the user execution service to the service server;
the service server is used for receiving the service data and forwarding the service data to the block link point device when the target intelligent contract uplink storage is determined;
the block chain node device is used for calling the target intelligent contract according to the received service data; determining a business meeting the contract conditions of the target intelligent contract according to the business data by operating the target intelligent contract; and when the resource allocation time of the target intelligent contract is reached, allocating service resources for the users executing the service meeting the contract conditions according to the determined service meeting the contract conditions.
2. The method of claim 1, wherein the client is further configured to generate a participation request according to the identity of the user in response to the operation of the user, and send the participation request to the service server;
the business server is further configured to respond to the participation request, obtain an activity contract template, generate an activity contract according to the identifier of the user carried by the participation request and the activity contract template, and send the activity contract to the client, where the activity contract is used to prompt the user to participate in a business activity corresponding to the target intelligent contract;
The client is further used for displaying the activity contract; responding to the operation of the user, and sending a signing request to the service server;
the service server is further configured to send, according to the subscription request, the identifier of the user to the block link point device;
the block chain link point device is further configured to receive the identifier of the user, establish a correspondence between the identifier of the user and the target intelligent contract, and store the correspondence in the block chain.
3. The method of claim 2, wherein the service data of the user-performed service comprises: a target identifier of the user;
the block chain link point device is further configured to invoke the target intelligent contract when it is determined that the target identifier has a correspondence with the target intelligent contract according to the correspondence between the identifier of the user and the target intelligent contract stored in the block chain.
4. The method of claim 1, wherein the smart contract content includes a specified time period and a specified keyword for the business activity to be performed; the service data comprises service execution time and service text;
The block link point device is configured to determine, by running the target intelligent contract, whether an execution time included in the service data falls within the specified time period, and whether a service text included in the service data hits the specified keyword; and if the judgment results are yes, determining that the service corresponding to the service data is the service meeting the contract conditions of the target intelligent contract.
5. The method of claim 1, wherein the blockchain node device is to store traffic in a blockchain that meets the contract condition; when the resource allocation time of the target intelligent contract is reached, the target intelligent contract is called, the business which is stored in the blockchain and meets the contract conditions is determined by operating the target intelligent contract, and business resources are respectively allocated for users who execute the business which meets the contract conditions.
6. The method of claim 1, wherein the block link point device is further configured to invoke the target smart contract when a resource allocation time of the target smart contract is reached, and send a data acquisition request to the business server by running the target smart contract;
The service server is used for responding to the data acquisition request and sending the service meeting the contract conditions to the block chain link point equipment;
the block chain node device is further configured to allocate service resources for users executing services conforming to the contract conditions according to the received services conforming to the contract conditions.
7. The method of claim 1, wherein the smart contract content further includes a first amount of business resources;
the block chain link point device is further used for executing the target intelligent contract, generating a freezing instruction according to the first service resource quantity and sending the freezing instruction to a resource platform;
and the resource platform is used for responding to the freezing instruction and freezing the business resource corresponding to the first business resource amount in the account corresponding to the business server in the resource platform.
8. The method of claim 1, wherein the smart contract content further includes a second amount of business resources;
the block chain node device is used for calling the target intelligent contract when the resource allocation time of the target intelligent contract is reached, and determining each target user for executing the business conforming to the contract conditions according to each business conforming to the contract conditions by operating the target intelligent contract; for each target user, determining a target resource allocation amount allocated to the target user according to the service which is executed by the target user and meets the contract conditions and the second service resource amount; and distributing service resources to the target user according to the target resource distribution amount.
9. The method of claim 8, wherein the blockchain node device is specifically configured to generate an allocation instruction according to the target resource allocation amount, and send the allocation instruction to a resource platform;
the resource platform is specifically configured to respond to the allocation instruction, and allocate the service resource corresponding to the target resource allocation amount in the account corresponding to the service server to the account corresponding to the target user.
10. The method according to any one of claims 1 to 9, wherein the service resource is digital rmb.
CN202310145630.7A 2022-11-17 2023-02-21 Resource allocation method Pending CN116455979A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211441624 2022-11-17
CN2022114416248 2022-11-17

Publications (1)

Publication Number Publication Date
CN116455979A true CN116455979A (en) 2023-07-18

Family

ID=87120955

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310145630.7A Pending CN116455979A (en) 2022-11-17 2023-02-21 Resource allocation method

Country Status (1)

Country Link
CN (1) CN116455979A (en)

Similar Documents

Publication Publication Date Title
EP3673608B1 (en) Data storage method, data query method and apparatuses
CN107196900B (en) Consensus checking method and device
CA3051025C (en) Blockchain system and data storage method and apparatus
CN113409045B (en) Data processing method and device based on block chain and electronic equipment
CN110032598B (en) Method and device for updating field and electronic equipment
KR20200034171A (en) Distributed computing resources sharing system and computing apparatus thereof providing reward based on block chain
CN113821817B (en) Data processing method, device, equipment and system based on block chain
CN111738737A (en) Method, device and equipment for generating digital property right certificate
US20200014632A1 (en) Resource path monitoring
CN111163132A (en) Service providing method, device, equipment and system based on block chain
CN111899008B (en) Resource transfer method, device, equipment and system
CN111681071B (en) Sub-fee data generation system and method, storage medium and electronic device
CN110020846A (en) A kind of transferred account service processing method and system
CN107147610B (en) Resource processing method and device
CN113194143B (en) Block chain account creating method and device and electronic equipment
CN107528822B (en) Service execution method and device
CN113256426B (en) Data processing method, device, equipment and medium
CN114548963B (en) Payment interaction processing method and device
CN116455979A (en) Resource allocation method
CN107301550B (en) Acquisition method of credit information and establishment method and device of credit management and control rule
CN115018499A (en) Block chain-based digital certificate issuing method, device and system
CN111339208B (en) Method and device for calling intelligent contract
CN106548331B (en) Method and device for determining release sequence
CN111062814A (en) Resource transfer method, device and system based on block chain
CN113327115B (en) Rental business processing method, device, equipment and system

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