Disclosure of Invention
One or more embodiments of the present specification describe a service processing method and system based on a block chain, so as to solve one or more problems mentioned in the background art.
According to a first aspect, a service processing method based on a block chain is provided, which is applicable to a service processing system, wherein the service processing system comprises a service server, a message center, a rights and interests server, and a block chain network, wherein the block chain network is pre-deployed with a first intelligent contract, the first intelligent contract is used for processing a transaction of a user rights and interests change event, and a processing result is stored in the block chain network; the method comprises the following steps: the service server sends first data related to a first service to the message center based on the first service aiming at a first user; the message center provides the first data to the equity service end under the condition of processing the first data based on the sequential processing of the received various data; the interest server side submits a transaction for calling the first intelligent contract to a blockchain network, wherein the transaction comprises an incoming parameter of the first intelligent contract determined according to the first data; the blockchain network executes the first intelligent contract, altering entitlement data for the first user in the blockchain network in accordance with the incoming parameters.
In one embodiment, the first service is a creation service of a first order, and the first data includes creation information of the first order; the incoming parameters of the first smart contract comprise the creation information; said altering entitlement data for said first user in a blockchain network in accordance with said incoming parameters comprises: determining a first equity share corresponding to the first order according to the creating information; pre-allocating the first equity share to the first user.
In one embodiment, the first service is a creation service of a first order, and the first data includes creation information of the first order; the incoming parameters of the first intelligent contract comprise a first equity share determined by the equity server according to the creation information; said altering entitlement data for said first user in a blockchain network in accordance with said incoming parameters comprises: pre-allocating the first equity share to the first user.
In one embodiment, the first service is an order cancellation service of a second order, and the first data includes cancellation information of the second order; the incoming parameters of the first smart contract comprise the revocation information; said altering entitlement data for said first user in a blockchain network in accordance with said incoming parameters comprises: revoking a second equity share pre-allocated for the second order for the first user.
In one embodiment, the first service is an order completion service of a third order, and the first data includes completion information of the third order; the incoming parameters of the first smart contract comprise the completion information; said altering entitlement data for said first user in a blockchain network in accordance with said incoming parameters comprises: issuing a third equity share reserved for the third order for the first user.
In one embodiment, the first service is a rights and benefits verification service, and the first data at least comprises rights and benefits information to be verified and verified; the incoming parameters of the first intelligent contract comprise entitlement information of the to-be-checked-out; said altering entitlement data for said first user in a blockchain network in accordance with said incoming parameters comprises: determining a fourth equity share to be checked and sold according to the equity information to be checked and sold; verifying the fourth equity share for the first user.
In one embodiment, the first service is a rights and benefits verification service, and the first data at least comprises rights and benefits information to be verified and verified; the incoming parameters of the first intelligent contract comprise a fourth equity share determined by the equity server according to the equity information to be checked and cancelled; said altering entitlement data for said first user in a blockchain network in accordance with said incoming parameters comprises: verifying the fourth equity share for the first user.
In one embodiment, in the process of sequentially processing various received data by the message center, the frequency of sending data to the equity service end does not exceed a preset threshold value.
According to a second aspect, a service processing method based on a block chain is provided, which is applicable to a service processing system based on the block chain, and the service processing system includes a service server, a message center, a rights and interests server, and a block chain network, wherein a first intelligent contract is deployed in advance in the block chain network, the first intelligent contract is used for processing a transaction of a user rights and interests change event, and a processing result is stored in the block chain network; the method is executed by the rights server and comprises the following steps: receiving first data related to a first service from the message center, wherein the first service is provided by the service server to a first user, the first data is sent to the message center by the service server, and is provided to the equity server in a message form under the condition that the first data is processed by the message center based on the sequential processing of the received various data; submitting a transaction invoking the first intelligent contract to a blockchain network in accordance with the first data for execution by the blockchain network of the first intelligent contract to alter the entitlement data for the first user in the blockchain network in accordance with incoming parameters for the first intelligent contract determined based on the first data.
According to a third aspect, a service processing method based on a block chain is provided, which is applicable to a service processing system based on a block chain, and the service processing system includes a service server, a message center, a rights and interests server, and a block chain network, wherein a first intelligent contract is deployed in advance in the block chain network, the first intelligent contract is used for processing a transaction of a user rights and interests change event, and a processing result is stored in the block chain network; the method is executed by the service end and comprises the following steps: generating first data related to a first service provided to a first user; and sending the first data to the message center, so that the message center provides the first data to the equity service terminal based on the sequential processing of the received various data, and submitting a transaction for calling the first intelligent contract to change the equity data of the first user to a blockchain network by the equity service terminal under the condition that the first data is processed, wherein the transaction comprises the incoming parameters of the first intelligent contract determined according to the first data.
According to a fourth aspect, a block chain-based service processing system is provided, which includes a service server, a message center, a rights and interests server, and a block chain network, where the block chain network is pre-deployed with a first intelligent contract, the first intelligent contract is used to process a transaction of a user rights and interests change event, and a processing result is stored in the block chain network; wherein:
the service server is configured to send first data related to a first service to the message center based on the first service for a first user;
the message center is configured to sequentially process various received data, and provide the first data to the interest server in a message form under the condition of processing the first data;
the interest server is configured to submit a transaction for calling the first intelligent contract to a blockchain network, wherein the transaction comprises an incoming parameter of the first intelligent contract determined according to the first data;
the blockchain network is configured to execute the first intelligent contract to alter the entitlement data for the first user in the blockchain network in accordance with the first data.
According to a fifth aspect, a block chain-based service processing apparatus is provided, where the apparatus is disposed at a rights and interests server in a block chain-based service processing system, and the service processing system includes a service server, a message center, the rights and interests server, and a block chain network, where the block chain network is pre-deployed with a first intelligent contract, the first intelligent contract is used to process a transaction of a user rights and interests change event, and a processing result is stored in the block chain network; the device comprises:
a receiving unit, configured to receive first data related to a first service from the message center, where the first service is provided by the service end to a first user, the first data is sent to the message center by the service end, and is provided to the interest server in a form of a message by the message center based on sequential processing of the received various data when the first data is processed;
a request unit configured to submit a transaction invoking the first intelligent contract to a blockchain network according to the first data for the blockchain network to execute the first intelligent contract, thereby altering the rights and interests data of the first user in the blockchain network according to the incoming parameters of the first intelligent contract determined based on the first data.
According to a sixth aspect, a service processing apparatus based on a block chain is provided, where the apparatus is located at a service server in a service processing system based on a block chain, and the service processing system includes the service server, a message center, a rights and interests server, and a block chain network, where the block chain network is pre-deployed with a first intelligent contract, the first intelligent contract is used to process a transaction of a user rights and interests change event, and a processing result is stored in the block chain network; the device comprises:
the device comprises a generating unit, a processing unit and a processing unit, wherein the generating unit is configured to generate first data related to a first service based on the first service provided to a first user;
and the sending unit is configured to send the first data to the message center, so that the message center provides the first data to the equity service terminal based on sequential processing of various received data, and submits a transaction for calling the first intelligent contract to change the equity data of the first user to a blockchain network by the equity service terminal under the condition that the first data is processed, wherein the transaction comprises an incoming parameter of the first intelligent contract determined according to the first data.
According to a seventh aspect, there is provided a computing device comprising a memory and a processor, wherein the memory has stored therein executable code, and the processor, when executing the executable code, implements the process involved in the method of the first aspect, wherein one or more of the ends are involved.
Through the system and the method provided by the embodiment of the specification, the service server is responsible for the service data processing process, and the message center controls the data transmission from the service server to the block chain, the rights and interests issue and other accessory matters in a message form, so that the data processing capacity of the service system is reduced, the service throughput of the service server in unit time and the total service processing capacity of the whole service system in the service system based on the block chain can be effectively improved under the condition of large short-time service capacity, and the concurrent processing capacity and the system stability of the system are improved.
Detailed Description
The scheme provided by the specification is described below with reference to the accompanying drawings.
As known to those skilled in the art, a blockchain network is a distributed storage and record system, which includes a plurality of nodes, and the nodes can communicate with each other and trade data. The Blockchain Technology (BT) is a brand new distributed infrastructure and computing paradigm that uses Blockchain data structures to verify and store data, uses distributed node consensus algorithms to generate and update data, uses cryptography to secure data transmission and access, uses intelligent contracts composed of automated script codes to program and operate data, and uses the distributed accounts concatenated by Blockchain technology to enable two parties to effectively record transactions and to permanently verify transactions. The block chain technology has the characteristics of being not falsifiable, decentralized and the like, so that the block chain technology is more and more widely applied to various fields.
Fig. 1 depicts a system architecture for issuing business benefits through blockchains as described herein. Referring to fig. 1, the implementation architecture relates to a blockchain network, a service end, a message center and a rights and interests server end. The service server is used for providing service support for the user side. The supported services may also be different according to different actual scenarios, for example, shopping services (such as meal ordering, ticket ordering, transaction, etc.), page browsing services, information submitting services (such as completing user information), and so on.
The network user can interact with the service server through the user side, so that service processing is performed. During the course of a business process, a number of different business states may arise, which may include, for example, for a transaction business, order creation, order completion, order withdrawal, and so forth. Those skilled in the art will appreciate that each of these business states can be independently performed by one interaction of the user side and the business server side. For example, orders created on the first day, orders canceled before orders completed on the next day, or default orders completed on the fifteenth day, and so on. Therefore, in this embodiment of the present specification, an associated whole service process (for example, the same order) may be referred to as a service, or a process in which a user side and a service side interact with each other in sequence to change a service state may be referred to as a specific service. In the basic business process flow, only the interaction between the user side and the business server side is usually involved. In the service scenario shown in fig. 1, in order to expand the service user group or increase the service volume, some equity reward mechanisms may be introduced, for example, a certain network platform rewards related equity interests according to a predetermined rule, a browsing webpage rewards related equity interests according to a predetermined rule, and the like. Meanwhile, in order to avoid data loss or confusion, a block chain technology is introduced, and service data is uploaded to a block chain network by a server. As such, the amount of data to be processed by the service side for a single service increases. Accordingly, the traffic service end will suffer from overall traffic throughput. For some scenarios such as limited-time rush-purchase, the service throughput is reduced, and the user experience is affected.
In order to solve the problem, the technical architecture proposed in the present specification is that, by using a message center, for a scenario in which a right benefit reward does not need to be paid in real time, the message center orchestrates and processes message tasks, and data uplink is driven by a message of the message center. In a specific scenario, a user may interact with a service end through a user end, and perform related services, such as ordering a certain commodity or service, on a network platform providing services at the service end. After the service server creates the service, on one hand, the service server can continue to complete subsequent services through operations (such as completion, order removal, and the like) of the user side by the user, and on the other hand, related service data can be sent to the message center, and the message center drives the equity service terminal to perform operations such as data uplink and the like. For example, the message center performs task planning on the generated services uniformly, and uploads the tasks to the blockchain network through the rights and interests server, so that operations such as relevant reward issuing and the like are completed and recorded in a matching manner by using an intelligent contract issued in the blockchain network in advance.
It will be appreciated that the message center may orchestrate tasks based on data local to the device, such as processing various tasks in turn, processing various tasks according to a predetermined priority, and so forth. The message center may also control the frequency of message transmissions. For example, the frequency of sending data to the equity server does not exceed a predetermined threshold. As a specific example, assuming that the data processing capacity of the equity server is at most 20 ten thousand per minute, the message center may control the number of messages sent to the equity server per minute to be no more than 20 ten thousand. Therefore, even if the traffic received by the service end reaches 100 ten thousand per minute, the data processing amount of the right service end can be prevented from exceeding the bearing capacity of the system. In this way, the throughput of traffic per unit time of the entire system can be increased.
Under the technical concept of the present specification, since the service end only needs to transmit information related to the current service to the equity service end, the data uplink operation is driven by the message center, the services generated by each user end are uniformly arranged in a task manner, and the frequency of the messages sent to the equity service end is controlled, so that the situation that a large amount of messages are processed instantaneously and exceed the bearable data volume of the equity service end is avoided. Therefore, the service throughput of the service server can be greatly improved, and the concurrent processing capacity and the system stability of the service are enhanced.
As an example, in the above system architecture, the service end may be a service party providing services for the terminal service, for example, a service party of a certain ticket purchasing platform, which may provide services for the user, for example, a ticket purchasing service. The message center can be a message system of the service party, a message system set by a third party, or a message system provided by the rights and interests server, and is used as a middleware for message control. Typically, message centers may provide larger scale message services. In the case that the message center is a message system provided in a third party or a rights and interests server, the message center can also process messages of services provided by various other service terminals (for example, data traffic services of a certain telecommunication service party). The right and interest server can provide related rights and interests for the user. In one embodiment, the rights server and the business server belong to the same server. In another embodiment, the rights server may also be a server providing a service platform for a plurality of service servers, and the service provided by the service server may also correspond to a sub-application (such as an applet or a micro-application) embedded in the service platform. For example, the equity service end is a service end for providing services for various services on a certain financial platform, the service end can provide ticket-buying services, and the equity service end can provide related equity for corresponding services of the service end corresponding to the ticket-buying applet embedded in the financial platform. For another example, the business server is a merchant of the takeout platform, and the equity server is a server of the takeout platform, and so on.
The technical idea of the present specification is described in detail below with reference to a flow of business processing using the system architecture shown in fig. 1.
Referring to fig. 2, a block chain based service processing flow according to an embodiment is shown. The process can be applied to a business processing system comprising a business server, a message center, a rights and interests server and a block chain network. The association relationship between the ends may be as shown in fig. 1. A first intelligent contract may be pre-deployed in a blockchain network. Here, the first intelligent contract may be an intelligent contract issued by a corresponding service provider, such as a service provider, a rights server, or the like, in the blockchain network for processing a service related to the user rights (e.g., a transaction for processing a user rights change event). For example, intelligent contracts for handling order equity issuance services. The intelligent contracts may be invoked in a transactional form and executed by various nodes in the blockchain network through a consensus mechanism. Generally, the intelligent contract corresponds to a contract address, and the calling of the intelligent contract is performed through the contract address. The service processing flow in fig. 2 is described by taking the first service performed by the first user as an example.
The flow shown in fig. 2 includes: step 201, a service server sends first data related to a first service to a message center based on the first service for a first user; step 202, the message center provides the first data to the equity service side based on the sequential processing of the received various data under the condition of processing the first data; step 203, submitting a transaction for calling a first intelligent contract to the blockchain network by the interest server, wherein the transaction comprises an incoming parameter of the first intelligent contract determined according to the first data; in step 204, the blockchain network executes the first intelligent contract, thereby changing the entitlement data of the first user in the blockchain network according to the incoming parameters.
First, in step 201, a service server sends first data related to a first service for a first user to the message center based on the first service. The first service may be various services, such as an order placing service, an order canceling service, a credit exchange service, and the like of a certain online shopping platform, according to different specific service scenarios. The first service may be any service generated for the first user. The first user may be any user providing services by the service server, and the "first" in the first service is used for representing a corresponding relationship with the "first" in the first user, without limiting the substance of the service.
It is understood that the first service may be generated by the first user through an interactive operation with the service end via the user end, or may be generated based on the satisfaction of the predetermined service condition. For example, the order placing service may be generated by an operation that a user submits an order placing page to a service end through a user end, and for example, the order completing service is triggered when service conditions such as verification of sales, receipt confirmation or unprocessed due to longest time are met by the user in a physical store. The user terminal may also be referred to herein as a terminal or a client.
When the first service is generated, the service end can determine service data related to the first service, for example, referred to as first data. The first data is different according to the first service. For example, in the case that the first service is an order related service, the first service may be order creation, order cancellation, order completion, order maintenance, and the like, and accordingly, the first data may be order creation, cancellation, completion, after-sales related data, and the like, respectively. The first service may also be right exchange, withdrawal, etc., and the corresponding first service state may be right verification and cancellation related data, etc.
On one hand, the service end can record service data and provide corresponding data to the user end according to conventional operations, for example, ordering service, and can return ordering success information to the user end. On the other hand, the service end can send the data related to the first service to the message center for subsequent processing, such as uplink of data and issuance of rights and interests.
Wherein the first data is different according to different services. For example, in the order related service, the first data may include at least an order identifier (e.g., an order number), in the order creation service, the first data may further include one or more of an order creation time, an order amount, and the like, and in the equity underwriting service, the first data may include a type of underwriting equity (e.g., points, cash points, and the like), an underwriting equity share (e.g., a number of points used, an embodied amount, and the like), and the like.
Next, in step 202, the message center provides the first data to the equity server side when the first data is processed based on the sequential processing of the received various data. The message center may be configured as a device side that processes data messages of the upload blockchain. The message center may interface with one or more service servers. The message center itself may have some data processing tasks, such as periodically checking and killing viruses, and may also receive data tasks related to various services. The message center can process various tasks in turn according to a preset task processing mode. For example, the predetermined task processing mode is to process each piece of received data according to the receiving time sequence, and for example, process each piece of received data according to the priority order, and process each piece of data according to the receiving time sequence when the plurality of pieces of data have the same priority. According to such a predetermined processing rule, when the message center processes the first data, the first data can be provided to the equity server through a wired network, a wireless network, a data interface, and the like.
Further, the equity services side submits a transaction to the blockchain network invoking the first intelligent contract, via step 203. The transaction that invokes the first intelligent contract may include parameters required by the first intelligent contract to execute the rights change logic, referred to as incoming parameters of the first intelligent contract.
In one embodiment, the first service is a creation service of the first order, and the first data may include at least creation information of the first order. The creation information of the first order is used to describe that the current service is an order creation service, for example, including but not limited to one or more of a user identification of the first user, an order identification (e.g., order number) of the first order, an order creation status, a creation time, an order nature, a quantity of goods involved in the order, an order source, a user identification of a sharer, a rights item ID, and the like.
The equity server may determine incoming parameters of the first intelligent contract based on the creation information to request a pre-allocation of respective equity shares to the blockchain network via the transaction. Thus, in one embodiment, the equity server may submit the creation information as an incoming parameter to the blockchain network for the first intelligent contract for the transaction. In another embodiment, the equity services side may also determine the equity shares pre-allocated for the first user based on the creation information of the first order, and submit the transaction to the blockchain network with the respective equity shares pre-allocated for the first user as incoming parameters of the first intelligent contract.
In practice, how the incoming parameters of the first intelligent contract are determined is related to the business logic and other settings of the first intelligent contract. For example, where the business logic of the first intelligent contract includes pre-assigning equity shares by order quantity, a user identification of the first user, an order creation status identification (e.g., a predetermined number 1) may be used as the incoming parameters. For another example, where the business logic of the first intelligent contract includes pre-allocating equity shares in terms of the order amount, the user identification of the first user, the order amount, may be used as the incoming parameters. On the other hand, in the case that the business logic of the first intelligent contract only includes increasing and decreasing the equity shares, the equity server may determine a first equity share corresponding to the first order according to the creation information, and submit the transaction to the blockchain network using the first equity share as an incoming parameter of the first intelligent contract.
Alternatively, where the above creation information includes an order amount or a quantity of the item for the first order, the pre-allocated equity shares for the first user may be positively correlated with the order amount or the quantity of the item. For example, a single item is awarded the entitlement in 5 points, and in the case of 5 items contained in the first order, the entitlement share pre-allocated to the first user is 25 points.
In another embodiment, the first service is a revocation service of the second order, and the first data may include revocation information of the second order. The revocation information of the second order may include one or more of: a user identification of the first user, a revocation time, a revocation nature (e.g., fully revoked, partially revoked, etc.), a second order identification, and so on. At this point, the equity services side may submit a transaction to the blockchain network invoking the first intelligent contract to withdraw an equity share (e.g., a second equity share) reserved corresponding to the second order based on the first data. At this time, the revocation information of the second order may be used as the incoming parameter of the first intelligent contract.
In yet another embodiment, the first transaction may be an order completion transaction for a third order, and the first data may include completion information for the third order. The third order completion information may include one or more of an order identification, a completion time, a completion status, a user identification of the first user, and the like of the third order. At this point, the equity server submits a transaction to the blockchain network that invokes the first intelligent contract to withdraw an equity share (e.g., a third equity share) reserved corresponding to the third order. Similarly, the equity server may submit the completion information of the third order as the incoming parameters of the first intelligent contract to the transaction, which is not described herein again.
In yet another embodiment, the first service may be a rights cancellation service, and the first data may include at least rights information to be cancelled. The equity information to be credited may include, for example, one or more of an equity item identification (or credited equity category), an amount of equity to be credited, a user identification of equity to be credited, and the like. At this time, the equity server may request to cancel the corresponding equity share, for example, the fourth equity share, from the blockchain network based on the equity information to be canceled. Similar to the order creation service, the service logic set according to the first intelligent contract is not available, and when the rights and interests are checked and cancelled, the rights and interests server may use the rights and interests information to be checked and cancelled as the incoming parameters of the first intelligent contract, or determine the rights and interests share to be checked and cancelled as the incoming parameters of the first intelligent contract according to the rights and interests information to be checked and cancelled, which is not described herein again.
Those skilled in the art will appreciate that in an actual business implementation, the parameters passed may also take various possible forms when the entitlement server requests invocation of the first intelligent contract from the blockchain network. For example, in the case of an order creating scenario where an order reserves corresponding equity shares to multiple users for one order based on an order service shared among users, the user identifier and the order identifier of each user may be used as the incoming parameters of the first intelligent contract. The blockchain network may record the equity shares reserved for the plurality of users as per the order identification. Then in the order withdrawal scenario, the order may be identified only as an incoming parameter to the first intelligent contract, and so on. In a more traffic scenario, the incoming parameters of the first smart contract may also have more embodiments, which are not listed here.
It should be noted that the above first order, second order, and third order are used for the description of the differentiation of the business, and do not represent the definition or differentiation of the orders themselves. For example, the first order and the second order may be the same order.
At step 204, the blockchain network executes a first intelligent contract to alter the first user's entitlement data in the blockchain network based on the first data. Wherein each node may execute the first smart contract based on the aforementioned first transaction. As described above, the first transaction may be generated by the equity server or a node in the blockchain, and is not limited herein.
According to different specific service scenes, the incoming parameters of the first intelligent contract are different, and the service logic and the execution result executed by the blockchain network on the first intelligent contract are also different. The following description will be given taking each example in step 203 as an example.
In the case where the first service is a create service of the first order, the first result of the blockchain network executing the first intelligent contract may be: a equity share corresponding to the first order is reserved for the first user. The execution logic is dependent on the business logic settings of the first intelligent contract and the incoming parameters. For example, where the reserved equity shares are determined by the equity server, executing the first intelligent contract by the blockchain network to alter the equity shares of the first user may simply comprise: a first equity share in incoming parameters is pre-allocated for a first user. Whereas in the case where the incoming parameters submitted by the equity server in the transaction are order creation information, execution of the first intelligent contract by the blockchain network to alter the equity shares of the first user may only include: determining a first equity share corresponding to the first order according to the creating information; the first user is pre-assigned the equity of the first equity share.
In the case where the first transaction is an order withdrawal transaction for the second order, the service logic and the second result of the blockchain network executing the first intelligent contract may be: the second equity shares reserved for the first user for the second order are revoked.
In the case where the first service is an order completion service of a third order, the service logic and the third result of the blockchain network executing the first intelligent contract may be: the third equity share reserved for the third order is issued to the first user.
In the case that the first service is a rights-to-verify service, the fourth result of each node in the blockchain network executing the first intelligent contract may be: the fourth equity share is checked out for the first user. Wherein, in the case that the incoming parameters of the first intelligent contract include the right information to be checked and cancelled, the execution logic of the first intelligent contract is as follows: determining a fourth rights share of the to-be-checked and cancelled according to the rights information of the to-be-checked and cancelled; the fourth equity share is checked out for the first user. In the case that the incoming parameters of the first intelligent contract include a fourth equity share determined by the equity server according to the equity information to be checked out, the block chain network altering the equity data of the first user by executing the first intelligent contract comprises: the fourth equity share is checked out for the first user.
It should be noted that the service processing method shown in fig. 2 is applicable to the service processing system architecture shown in fig. 1, and therefore, the description related to fig. 1 is also applicable to the related content of the flow described in fig. 2, and is not described herein again.
In order to further clarify the effect of the embodiments of the present specification, referring to fig. 3, a flow of processing an order service by issuing a first intelligent contract in a blockchain network in advance is shown in a specific application scenario of the order service. The first intelligent contract may be an intelligent contract which is pre-deployed in the blockchain network and is used for processing the user interest service.
For convenience of description, it is assumed that the current order is the first order. The first order may be regarded as a first user submitting to the business server through the first client.
First, there is an order creation process A1-A4. The service end obtains the order creating service of the first order, and may send data related to the creating service to the message center through step a 1. The message center processes the received various messages and tasks in sequence according to its own data processing rules (such as message priority rules). When the business data corresponding to the first order is processed, the creation data (which may correspond to the creation information) about the first order is sent to the equity server through step a 2. Wherein the creation data of the first order may include: the first user identification, the order creation time, the order amount, the order containing one or more of the quantity of the item, the nature of the order, and the like. In step a3, the equity server may submit a transaction to the blockchain network for pre-allocating incentive points (e.g., points, cash back amount, red envelope amount, etc.) via a corresponding intelligent contract (e.g., still referred to as a first intelligent contract) based on the creation data of the first order to request the blockchain network to pre-allocate a corresponding equity share for the corresponding user for the first order.
Wherein, in step a4 of the current flow, the blockchain network may execute the first intelligent contract using the creation data regarding the first order as a parameter, thereby reserving a equity share corresponding to the first order for the first user. In specific implementation, the reserved equity shares may be predetermined or randomly determined. For example, the reserved equity shares may be positively correlated with the amount of the order, positively correlated with the number of items the order contains, mapped to the nature of the order, etc.
Next, if the first user cancels the first order, flow B1-B4 is performed, and if the first user does not cancel the first order, flow C1-C4 is performed when the order meets the completion condition. That is, the processes B1-B4 or C1-C4 may be different scenarios after the processes A1-A4, and they may alternatively occur for the same order. The flows D1-D4 may be independent of the flows A1-A4, B1-B4, and C1-C4, that is, the execution of the flows D1-D4 is not limited by whether a single flow A-A4, B1-B4, or C1-C4 is executed, but the data used in the flows D1-D4 may include a plurality of flows A-A4, and the total right share issued after the flows B1-B4 and/or C1-C4 are superimposed.
Specifically, for the above first order, if the user cancels the first order before the first order is completed, the business server may transmit data related to the cancelled business of the first order to the message center through B1. When the message center processes the revocation data corresponding to the first order, the message center sends the revocation data about the first order to the equity server through step B2. Wherein the undo data for the first order may include, but is not limited to, one or more of the following: order identification, first user identification, order creation time, order amount, order containing quantity of goods, order nature, order undo status, and the like. In step B3, the equity server may submit a transaction invoking the first intelligent contract to the blockchain network based on the revocation data of the first order, revoking the reserved equity shares corresponding to the first order. In step B4 of the current flow, the blockchain network may execute the first intelligent contract using the user identifier of the first user and the order identifier for the first order, or the user identifier of the first user and the revoked equity shares, etc. as parameters, thereby revoking the equity shares reserved for the first user corresponding to the first order. In an alternative embodiment, the incentive points may be revoked according to a predetermined proportion of incentive points reserved for the first user corresponding to the first order, for example, in addition to the reserved incentive points, incentive points 0.5 times of the reserved incentive points are revoked additionally, and so on.
It will be appreciated that the order may be completed depending on user actions, as well as other order completion criteria as predetermined. For example, the order completion condition may be that the user confirms receipt, that the order was not processed before a predetermined time (e.g., the movie ticket was not cancelled before the corresponding movie was started), that a predetermined time has arrived, and so on. In the case that the service end can confirm that the first order is completed, the service end can send the completed service data of the first order to the message center through C1. When the message center processes the completion service data corresponding to the first order, the message center may send completion data (or completion information) about the first order to the equity server through step C2. Wherein the completion data for the first order may include one or more of, but is not limited to: order identification, first user identification, order creation time, order amount, order containing quantity of goods, order nature, completion time, and the like. In step C3, the equity server may request an associated equity share issuance from the blockchain network via a transaction based on the completion data of the first order. In step C4, each node in the blockchain network may execute the first intelligent contract through the consensus mechanism, thereby issuing the equity shares reserved for the first order to the first user. Such as adding a corresponding share to the corresponding entitlement parameter for the first user.
When the business server receives a rights and interests verification request (such as cash-out request, redemption request, deduction request and the like) of the user, the rights and interests verification based on the block chain can be completed through the processes D1-D4. In step D1, the service end may send the equity cancellation data to the message center. When the right expense verification data is processed, the message center can send the right expense verification data to the right expense server through the step D2. Wherein the equity verification business data may include, but is not limited to, one or more of: a first user identification, a category of equity to be credited, a credit share to be credited, etc. In step D3, the equity server may submit a transaction to the blockchain network to equity trade based on the equity trade-off service data. In step D4 of the current flow, each node in the blockchain network may execute the first intelligent contract through the consensus mechanism, thereby revoking the corresponding equity shares for the first user.
It should be noted that, in the above process, the related flow of the request from the right server to the blockchain network may be divided into a case where the right server is a node in the blockchain network and a case where the right server is not a node in the blockchain network, and the difference is that the right server generates a call request for calling the first intelligent contract or a transaction for calling the first intelligent contract, which is not described herein again. The flow shown in fig. 2 is a flow applicable to the system architecture of fig. 1, and thus, the related description may be applicable to the system architecture shown in fig. 1. In addition, the example of fig. 3 is a specific example using the flow shown in fig. 2, and therefore, the description related to fig. 2 can also be adapted to the example of fig. 3.
Reviewing the above process, the message center is arranged, the service server is responsible for the service data processing process, and the message center controls the data transmission from the service server to the rights and interests server in a message form, so that the rights and interests server performs the subsidiary item processing such as rights and interests issue and the like on the basis of the block chain network, the data processing amount of the service server is reduced, the service throughput of the service server in unit time can be effectively improved in the service system based on the block chain under the condition of large data amount, the message processing data amount of the rights and interests server in unit time is controllable, and the effect of increasing the total service amount is achieved. Thus, the concurrent processing capacity and the system stability of the whole system can be improved.
It is to be understood that the foregoing describes the technical concepts of the present specification and related embodiments in their entirety from an overall system architecture. The following embodiments are described from the perspective of a single end side of a service end and an equity service end.
As shown in fig. 4, according to an embodiment of an aspect, a service processing flow based on a block chain for a service end is provided, which includes the following steps:
step 401: generating first data related to a first service based on the first service provided to the first user;
step 402: the first data is sent to a message center. This may be such that: the message center provides the first data to the rights and interests server side under the condition that the first data is processed based on the sequential processing of the received various data. The equity services side may submit a transaction to the blockchain network invoking the first intelligent contract to alter the equity data of the first user, where the transaction may include incoming parameters of the first intelligent contract determined from the first data.
Accordingly, as shown in fig. 5, a block chain-based service processing apparatus 500 that can be provided at a service server is provided. The apparatus 500 comprises:
a generating unit 51 configured to generate first data related to a first service based on the first service provided to the first user;
a sending unit 52 configured to send the first data to the message center. The message center provides the first data to the rights and interests server side under the condition that the first data is processed based on the sequential processing of the received various data. The equity services side may submit a transaction to the blockchain network invoking the first intelligent contract to alter the equity data of the first user, where the transaction may include incoming parameters of the first intelligent contract determined from the first data.
As shown in fig. 6, according to another embodiment, a service processing flow based on a block chain for a rights and interests server is provided, which includes the following steps:
step 601, receiving first data related to a first service from a message center. The first service is provided to the first user by the service terminal, the first data is sent to the message center by the service terminal, and the message center processes the received various data in sequence, and provides the first service to the interest service terminal in the form of message under the condition of processing the first data;
step 602, a transaction invoking a first intelligent contract is submitted to a blockchain network according to the first data. In this way, it is possible to make: the blockchain network executes the first intelligent contract to alter the entitlement data for the first user in the blockchain network in accordance with incoming parameters of the first intelligent contract determined based on the first data.
Accordingly, as shown in fig. 7, a block chain-based service processing apparatus 700 that can be located at the equity server is provided. The apparatus 700 comprises:
a receiving unit 71, configured to receive first data related to a first service from a message center, where the first service is provided by a service end to a first user, the first data is sent to the message center by the service end, and is provided to a rights and interests server in the form of a message by the message center based on sequential processing of various received data by the message center when the first data is processed;
a requesting unit 72 configured to submit a transaction invoking the first intelligent contract to the blockchain network in accordance with the first data. In this way, it is possible to make: the blockchain network executes the first intelligent contract to alter the entitlement data for the first user in the blockchain network in accordance with incoming parameters of the first intelligent contract determined based on the first data.
It should be noted that the method embodiments shown in fig. 4 and fig. 6 are flows executed by the service end and the beneficial end in the system architecture shown in fig. 1, respectively, and the device embodiments shown in fig. 5 and fig. 7 correspond to the method embodiments shown in fig. 4 and fig. 6, respectively, so that, in the description of fig. 1 and fig. 2, corresponding parts related to the service end are also applicable to the embodiments shown in fig. 4 and fig. 6, and corresponding parts related to the beneficial end are also applicable to the embodiments shown in fig. 5 and fig. 7, which is not described again here. In some possible designs, the service server and the rights server may also correspond to different service modules of the same server.
According to an embodiment of yet another aspect, there is also provided a computing device comprising a memory and a processor, the memory having stored therein executable code, the processor when executing the executable code implementing the method referred to in one or more of the ends described in connection with the above-described blockchain based business processing system architecture.
Those skilled in the art will recognize that, in one or more of the examples described above, the functions described in the embodiments of this specification may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium.
The above-mentioned embodiments are intended to explain the technical idea, technical solutions and advantages of the present specification in further detail, and it should be understood that the above-mentioned embodiments are merely specific embodiments of the technical idea of the present specification, and are not intended to limit the scope of the technical idea of the present specification, and any modification, equivalent replacement, improvement, etc. made on the basis of the technical solutions of the embodiments of the present specification should be included in the scope of the technical idea of the present specification.