Electronic certificate management method, electronic device, storage medium and program product
By using smart contracts to manage the status change operation of electronic credentials in the blockchain system, the information security and resource flow efficiency of the electronic credential management system in the existing technology is solved, and higher security and more efficient resource allocation are achieved .
Patent Information
- Application Number
- CN202411412892.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-02-11
AI Technical Summary
The existing electronic voucher management system cannot guarantee the security of multi-party transaction information, and there are problems of forging and tampering with electronic vouchers. At the same time, it is impossible to realize automatic sharing of income immediately, and the resource flow efficiency is low.
Using the electronic certificate management method of the blockchain system, by detecting the status change operation of electronic certificates, using smart contracts to allocate virtual resources between multiple target nodes, realizing the automatic allocation of virtual resources and a fair, just and open allocation process. .
It improves information security, realizes the instant and automatic allocation of virtual resources, improves the efficiency of capital flow, and makes the allocation of virtual resources more fair, just and transparent.
Smart Images

Figure CN119417471A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of blockchain technology, and in particular to an electronic credential management method, an electronic device, a storage medium, and a program product. Background Art
[0002] Currently, there are various electronic voucher management systems in the information market. Merchants purchase electronic voucher management systems, sell electronic vouchers through the system, and consumers purchase electronic vouchers through the system. Merchants move the traditional offline agency sales model online and use e-commerce channels to sell goods.
[0003] However, the electronic certificate management system in the existing technology cannot guarantee the security of multi-party transaction information, and there are security issues such as forgery and tampering of electronic certificates. In addition, the current electronic certificate management system cannot realize automatic sharing of income in real time, and the resource circulation efficiency is low. Summary of the invention
[0004] The present application provides an electronic credential management method, electronic device, storage medium and program product for improving information security and improving resource circulation efficiency.
[0005] In a first aspect, the present application provides an electronic credential management method, which is applied to a blockchain system, including: detecting a state change operation of an electronic credential; the state change operation is a change in state caused by the electronic credential flowing between multiple target nodes of the blockchain system; the electronic credential is used to extract a target object, and the electronic credential corresponds to a preset number of virtual resources; determining and executing a smart contract involved in the state change operation of the electronic credential, and allocating virtual resources among multiple target nodes based on the change in the virtual resource owner involved in the state change operation.
[0006] It is understandable that the electronic certificate management method provided in the embodiment of the present application, when applied to the blockchain system, can improve information security by utilizing the technical characteristics of blockchain such as transparency and non-tamperability. The present application can allocate the virtual resources involved in the state change operation of the electronic certificate among multiple target nodes based on the smart contract, and can realize the automatic allocation of virtual resources immediately after the state change operation occurs, thereby improving the efficiency of capital circulation. And based on the technical characteristics of blockchain such as transparency and non-tamperability, the allocation of virtual resources can be made more fair, just and open.
[0007] One possible implementation method is to update the data stored on the blockchain system based on the state change data involved in the state change operation.
[0008] Another possible implementation method is that the blockchain system includes a parent chain and a child chain; based on the state change data involved in the state change operation, the data stored on the blockchain system is updated, including: uploading the state change data to the parent chain, the parent chain is used to package the state change data to obtain a hash value corresponding to the state change data; uploading the state change data and the hash value corresponding to the state change data to the child chain, and the child chain is used to store the state change data and the hash value corresponding to the state change data.
[0009] In another possible implementation, the state change data includes virtual resource change data and flow change data; the subchain includes a first subchain and a second subchain; wherein the first subchain is used to store the virtual resource change data and the hash value corresponding to the virtual resource change data; and the second subchain is used to store the flow change data and the hash value corresponding to the flow change data.
[0010] In another possible implementation, the multiple target nodes include at least one of the following: a publishing node for formulating, issuing and retrieving electronic certificates; intermediate nodes at various levels for proxying electronic certificates; and user nodes for obtaining and using electronic certificates.
[0011] In another possible implementation, the state change operation includes at least one of the following: acquisition, exchange, recycling, donation, and expiration.
[0012] Another possible implementation method is that the smart contract is determined based on the basic information of the electronic certificate, the distribution ratio between at least one owner and at least one owner of a preset number of virtual resources corresponding to the electronic certificate, the validity period of the electronic certificate, and the status change operation of the electronic certificate.
[0013] In the second aspect, the present application provides an electronic credential management device, which is applied to a blockchain system. The electronic credential management device includes: a detection module and a processing module; the detection module is used to detect the state change operation of the electronic credential; the state change operation is the change in state brought about by the electronic credential flowing between multiple target nodes in the blockchain system; the electronic credential is used to extract the target object, and the electronic credential corresponds to a preset number of virtual resources; the processing module is used to determine and execute the smart contract involved in the state change operation of the electronic credential, and allocate virtual resources among multiple target nodes based on the change of the virtual resource owner involved in the state change operation.
[0014] In one possible implementation, the processing module is also used to update the data stored on the blockchain system based on the state change data involved in the state change operation.
[0015] Another possible implementation method is that the blockchain system includes a parent chain and a child chain; the processing module is specifically used to upload the state change data to the parent chain, and the parent chain is used to package the state change data to obtain a hash value corresponding to the state change data; the state change data and the hash value corresponding to the state change data are uploaded to the child chain, and the child chain is used to store the state change data and the hash value corresponding to the state change data.
[0016] In another possible implementation, the state change data includes virtual resource change data and flow change data; the subchain includes a first subchain and a second subchain; wherein the first subchain is used to store the virtual resource change data and the hash value corresponding to the virtual resource change data; and the second subchain is used to store the flow change data and the hash value corresponding to the flow change data.
[0017] In another possible implementation, the multiple target nodes include at least one of the following: a publishing node for formulating, issuing and retrieving electronic certificates; intermediate nodes at various levels for proxying electronic certificates; and user nodes for obtaining and using electronic certificates.
[0018] In another possible implementation, the state change operation includes at least one of the following: acquisition, exchange, recycling, donation, and expiration.
[0019] Another possible implementation method is that the smart contract is determined based on the basic information of the electronic certificate, the distribution ratio between at least one owner and at least one owner of a preset number of virtual resources corresponding to the electronic certificate, the validity period of the electronic certificate, and the status change operation of the electronic certificate.
[0020] In a third aspect, the present application provides an electronic device, comprising: a processor and a memory; the memory stores instructions executable by the processor; when the processor is configured to execute the instructions, the electronic device implements the method of the first aspect above.
[0021] In a fourth aspect, the present application provides a computer-readable storage medium, which includes: computer software instructions; when the computer software instructions are executed in an electronic device, the electronic device implements the method of the first aspect above.
[0022] In a fifth aspect, the present application provides a computer program product, which includes a computer program; when the computer program runs in an electronic device, the electronic device implements the method of the first aspect.
[0023] The beneficial effects of the second to fifth aspects mentioned above refer to the corresponding description of the first aspect and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1A blockchain system diagram involved in an electronic certificate management method provided in this application;
[0025] Figure 2 A blockchain system diagram involved in another electronic certificate management method provided in this application;
[0026] Figure 3 A flowchart of an electronic certificate management method provided for this application;
[0027] Figure 4 A flowchart of another electronic certificate management method provided for this application;
[0028] Figure 5 A flowchart of the on-chain electronic certificate management method provided for this application;
[0029] Figure 6 A schematic diagram of a process for consumers to obtain electronic vouchers provided for this application;
[0030] Figure 7 A schematic diagram of a process for consumers to use electronic vouchers provided for this application;
[0031] Figure 8 A schematic diagram of a process for consumers to redeem electronic vouchers provided for this application;
[0032] Fig. 9 A schematic diagram of a process for consumers to recycle electronic vouchers provided for this application;
[0033] Fig.10 A schematic diagram of a process for consumers to transfer electronic vouchers provided for this application;
[0034] Fig.11 A schematic diagram of the composition of an electronic certificate management device provided for this application;
[0035] Fig.12 A schematic diagram of the composition of an electronic device provided in this application. DETAILED DESCRIPTION
[0036] The following will describe in detail an electronic certificate management method provided by the present application in conjunction with the accompanying drawings.
[0037] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0038] The terms "first" and "second" and the like in the specification and drawings of this application are used to distinguish different objects, or to distinguish different processing of the same object, rather than to describe a specific order of objects.
[0039] In addition, the terms "including" and "having" and any variations thereof mentioned in the description of the present application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include other steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.
[0040] It should be noted that, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0041] In order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second", etc. are used to distinguish the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the words "first", "second", etc. are not limiting the quantity and execution order.
[0042] In the description of the present application, unless otherwise specified, “plurality” means two or more.
[0043] At present, electronic vouchers are mainly used in the following scenarios: commodity redemption in retail and e-commerce, attracting customers in promotional activities, reward mechanisms for customer loyalty programs, cross-brand cooperative marketing, gift giving for festivals, feedback incentives in community and membership activities, convenient collection at logistics pick-up points, and welfare incentives for education and training courses. The application of electronic vouchers can improve customer engagement and satisfaction, while enhancing the operational efficiency of merchants.
[0044] In the existing technology, merchants purchase mature software systems to produce electronic certificates for goods, and sell the electronic certificates by direct sales. At the same time, the electronic certificate sales system has simple online operations such as purchase, redemption, and recycling to a certain extent. Merchants can use information technology to transform the offline agency sales model into an online sales model, and convert the sales profit-sharing model into an online level-by-level profit-sharing model. However, the existing electronic certificate sales system cannot prevent the counterfeiting and tampering of electronic certificates, cannot provide consumers with more complete services, cannot avoid interest disputes between agents at all levels and merchants, and cannot protect merchants, consumers, and agents.
[0045] Therefore, the electronic certificate management system in the prior art cannot guarantee the security of multi-party transaction information, and there are security issues such as forgery and tampering of electronic certificates. In addition, the current electronic certificate management system cannot realize automatic sharing of income in real time, and the resource circulation efficiency is low.
[0046] In view of the above technical problems, the present application provides an electronic certificate management method, which is applied to the blockchain system, and its idea is: the state change operation of the electronic certificate is detected; the state change operation is the change of the state brought about by the electronic certificate flowing between multiple target nodes of the blockchain system; the electronic certificate is used to extract the target object, and the electronic certificate corresponds to a preset number of virtual resources; determine and execute the smart contract involved in the state change operation of the electronic certificate, and allocate virtual resources between multiple target nodes based on the change of the virtual resource owner involved in the state change operation. It can be seen that the method provided by the embodiment of the present application can improve information security by utilizing the technical characteristics of blockchain transparency and non-tamperability. The present application can allocate the virtual resources involved in the state change operation of the electronic certificate between multiple target nodes based on the smart contract, and can realize the automatic allocation of virtual resources immediately after the state change operation occurs, thereby improving the efficiency of capital circulation. And based on the technical characteristics of blockchain transparency and non-tamperability, the allocation of virtual resources can be made more fair, just and open.
[0047] The embodiments provided in this application are described in detail below in conjunction with the accompanying drawings.
[0048] See also Figure 1 , is a blockchain system involved in an electronic certificate management method provided in an embodiment of the present application. Figure 1 As shown, the blockchain system includes multiple nodes, for example, publishing nodes, intermediate nodes at various levels, and user nodes.
[0049] Publishing node, used to formulate, issue and recycle electronic certificates.
[0050] Intermediate nodes at all levels are used to act as agents for electronic certificates. That is, the intermediate nodes are used to manage electronic certificates on behalf of the issuing nodes. Exemplarily, the intermediate nodes can provide electronic certificates to user nodes on behalf of the issuing nodes, for example, the intermediate nodes can sell electronic certificates to user nodes on behalf of the issuing nodes.
[0051] Each level of intermediate nodes includes multiple nodes.
[0052] For example, Figure 1 Only the first-level intermediate node and the second-level intermediate node are shown as examples.
[0053] User node, used to obtain and use electronic credentials.
[0054] In some embodiments, Figure 2 As shown, the above nodes may include: a front-end device 110 and a back-end server 120 .
[0055] The front-end device 110 is used for human-computer interaction with the user.
[0056] Exemplarily, the front-end device 110 is used to receive operation commands from users.
[0057] In some embodiments, the front-end device 110 may send the received user operation command to the back-end server 120 .
[0058] Exemplarily, the front-end device 110 is a terminal, such as a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc.
[0059] The backend server 120 is used for data processing and analysis.
[0060] Exemplarily, the backend server 120 receives the user's operation command sent by the frontend device,
[0061] In some embodiments, the backend server 120 formulates and executes smart contracts based on user operation commands.
[0062] Exemplarily, the backend server 120 may be a server, such as a server cluster consisting of multiple servers, or a single server, or a computer, or a processor or processing chip in a server or computer.
[0063] It should be noted that the system architecture described in the embodiments of the present application is for more clearly illustrating the technical solutions of the embodiments of the present application, and does not constitute a limitation on the technical solutions provided in the embodiments of the present application. A person of ordinary skill in the art can know that with the evolution of the system architecture, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0064] See also Figure 3 , is a flow chart of an electronic certificate management method provided in an embodiment of the present application. Figure 2 As shown, optionally, the electronic credential management method provided in the embodiment of the present application is applied to a blockchain system, for example, it can be applied to a back-end server of a node in the blockchain system.
[0065] like Figure 3As shown, the electronic certificate management method provided by the present application specifically includes the following steps S201 to S202.
[0066] S201. A state change operation of an electronic certificate is detected; the state change operation is a change in the state of an electronic certificate caused by the circulation between multiple target nodes in a blockchain system.
[0067] In some embodiments, an electronic credential is used to extract a target object.
[0068] Exemplarily, the holder of the electronic voucher can redeem the target object through the electronic voucher, wherein the target object may be a commodity of equal value corresponding to the electronic voucher.
[0069] In some embodiments, the electronic voucher corresponds to a preset amount of virtual resources.
[0070] The preset amount of virtual resources is the value represented by the electronic voucher, for example, the face value of the electronic voucher.
[0071] In some embodiments, the state change operation includes at least one of the following: obtain, redeem, recycle, donate, and invalidate.
[0072] It is understandable that this application has fully considered the processes of obtaining, redeeming, recycling, transferring, and expiration of electronic certificates, increased the consumption experience of user nodes, and protected the legitimate rights and interests of multiple parties.
[0073] In some embodiments, the target node is a node involved in the state change operation and needs to participate in the allocation of virtual resources.
[0074] Exemplarily, the multiple target nodes include at least one of the following:
[0075] 1. Release node, used to formulate, issue and recover electronic certificates.
[0076] Exemplarily, the publishing node is the merchant's corresponding node in the blockchain system. The merchant produces and issues new electronic certificates, recycles the electronic certificates that consumers have purchased and choose to recycle, and resells them. After consumers choose to recycle the purchased electronic certificates, they will no longer have the right to use the above electronic certificates.
[0077] 2. Intermediate nodes at all levels are used to act as agents for electronic certificates, that is, intermediate nodes are used to manage electronic certificates on behalf of issuing nodes.
[0078] Exemplarily, the intermediate node may provide the electronic certificate to the user node on behalf of the issuing node. For example, the intermediate node may sell the electronic certificate to the user node on behalf of the issuing node.
[0079] Exemplarily, the intermediate node is the corresponding node of agents at all levels in the blockchain system. After the intermediate node is registered and authenticated in the blockchain system (the intermediate node needs to be registered and authenticated at the issuing node), it has the agency right of the electronic certificate.
[0080] Among them, the classification of agents at all levels can be divided by the size of the region and can be adjusted according to actual conditions. No requirements are made here. For example, a first-level agent can be the largest agent in East China, and a second-level agent can be the largest agent in Shanghai or Jiangsu, and so on.
[0081] 3. User node, used to obtain and use electronic credentials.
[0082] In some embodiments, the user node may obtain the electronic voucher by paying a preset amount of virtual resources corresponding to the electronic voucher.
[0083] Exemplarily, a user node is a node corresponding to a consumer in a blockchain system. After the user node is registered and authenticated in the blockchain system, it has the right to choose an agent and purchase an electronic certificate.
[0084] In some embodiments, the user node uses the electronic voucher including redemption, transfer, etc.
[0085] In some embodiments, the user node may obtain electronic credentials from intermediate nodes at various levels.
[0086] The target nodes involved in the state change operation are described below in the form of examples.
[0087] Exemplarily, if the state change operation is acquisition, the target nodes include: a publishing node, a user node, and an intermediate node of a certain level selected by the user node and its upper intermediate node.
[0088] For example, the user node chooses to send a request for electronic certificates from an intermediate node at a certain level. The intermediate node at a certain level queries the remaining number of electronic certificates through the blockchain system. After confirmation, it provides a smart contract to the user node and allocates virtual resources to the publishing node, the user node, and an intermediate node at a certain level selected by the user node and its upper intermediate node based on the smart contract.
[0089] Exemplarily, if the state change operation is redemption, the target nodes include: a publishing node and a user node.
[0090] For example, the user node sends a request to redeem the target object, the publishing node receives the redemption request from the user node, and after the publishing node determines that the basic information of the electronic certificate is correct, the user obtains the target object.
[0091] Exemplarily, if the state change operation is recycling, the target nodes include: a publishing node, a user node, and an intermediate node of a certain level selected by the user node and its upper intermediate node.
[0092] For example, the user node makes a recycling request to the issuing node. After receiving the recycling request, the issuing node determines the basic information of the electronic certificate and sends confirmation information of the recycling of the electronic certificate to the user node. The user node confirms the recycling of the electronic certificate, and the above electronic certificate is reissued. At the same time, the blockchain system reallocates virtual resources according to the smart contract.
[0093] Exemplarily, if the state change operation is donation, the target nodes include: a user node that performs the donation behavior and a user node that receives the donation.
[0094] Exemplarily, a user node may choose to transfer an electronic certificate to another user node, and a user node may also receive an electronic certificate transferred by another user node. The original user node that owns the electronic certificate loses the right to use it, and the user node that receives the gift has the right to redeem, recycle, and transfer the electronic certificate.
[0095] Exemplarily, if the state change operation is invalid, the target node includes: a user node.
[0096] Exemplarily, if the user node does not use (exchange, recycle, or transfer) the electronic certificate within the validity period of the electronic certificate, the electronic certificate becomes invalid and the user node cannot continue to use the electronic certificate.
[0097] It is understandable that the status change operation of the electronic certificate is fully and comprehensively considered, so that each status change operation can be transparently displayed in the blockchain system. At the same time, the traceability of the blockchain system is utilized to reduce resource disputes between target nodes.
[0098] S202. Determine and execute the smart contract involved in the state change operation of the electronic certificate, and allocate virtual resources among multiple target nodes based on the change of the virtual resource owner involved in the state change operation.
[0099] It can be understood that by distributing the virtual resources involved in the state change operation of the electronic certificate among multiple target nodes based on the smart contract, the virtual resources can be automatically allocated immediately after the state change operation occurs, thereby improving the efficiency of capital circulation. At the same time, the automatic allocation of virtual resources can save human resources and improve accuracy.
[0100] In some embodiments, the smart contract is determined based on the basic information of the electronic certificate, the distribution ratio between at least one owner and at least one owner of a preset number of virtual resources corresponding to the electronic certificate, the validity period of the electronic certificate, and the status change operation of the electronic certificate.
[0101] Among them, the basic information of the electronic voucher includes: product name, face value, pick-up time, precautions, usage rules, etc.
[0102] For example, assuming that the above-mentioned state change operation is acquisition, that is, after the user node is registered in the blockchain system, it obtains the electronic certificate from a certain level of intermediate nodes by paying a preset amount of virtual resources. Then the target nodes involved in the acquisition of this state change operation are: the issuing node, intermediate nodes at all levels, and the user node. The blockchain system can allocate the preset amount of virtual resources corresponding to the electronic certificate to the issuing node, intermediate nodes at all levels, and user nodes based on the smart contract.
[0103] For example, the preset amount of virtual resources that the user node obtains for the electronic certificate is C. The blockchain system distributes the virtual resource C among the issuing node, intermediate nodes at all levels, and user nodes according to the smart contract. The distribution of virtual resources is based on b+b i +b ii +b ijk +…+X+(YX)=C identity; where b=C(1-a i )(where a i is the revenue share of the first-level intermediate node), b i =C*a i (1-a ij )(where a ij is the income share of the second-level intermediate node), and so on to a certain level of intermediate node selected by the user node; X is the loss value; Y is the value of the target object itself; YX is the share obtained by the user node; among them, i represents the first level, ij represents the second level, ijk represents the third level..., i, j, k... are natural numbers.
[0104] For example, assuming that the above state change operation is redemption, that is, the user node extracts the target object of the electronic voucher from the publishing node, the loss value X is 0, and the user node obtains the target object with a value of Y. Then the target nodes involved in obtaining this state change operation are: the user node and the publishing node. The publishing node determines the electronic voucher information of the user node and provides the target object to the user node;
[0105] For example, assuming that the above-mentioned state change operation is recycling, that is, the user node proposes to the issuing node to recycle the electronic certificate, and the user node will pay a loss value of X, then the target nodes involved in the recycling of this state change operation are: the issuing node, intermediate nodes at all levels and user nodes. The blockchain system can recycle and reallocate the preset amount of virtual resources corresponding to the issuing node, intermediate nodes at all levels and user nodes of the electronic certificate based on the smart contract.
[0106] For example, when assuming that the above-mentioned state change operation is transfer or expiration, that is, a user node transfers the electronic certificate to another user node, or the electronic certificate is no longer within the validity period, the loss value X is Y, that is, a user node abandons the right to redeem the electronic certificate, and the preset amount of virtual resources obtained by the issuing node and intermediate nodes at all levels remain unchanged.
[0107] It is understandable that the allocation of virtual resources between merchants and agents at all levels is made transparent based on smart contracts, which enhances the trust between merchants and agents. At the same time, the allocation of virtual resources is made public, which stimulates the subjective initiative of agents at all levels. In this way, the allocation of virtual resources based on smart contracts keeps the profit sharing transparent, and the communication between merchants and agents at all levels can be efficient, reducing economic disputes caused by unclear profit distribution.
[0108] In some embodiments, see Figure 4 The above method also includes the following step S203.
[0109] S203. Based on the state change data involved in the state change operation, update the data stored in the blockchain system.
[0110] In some embodiments, the state change data includes virtual resource change data and flow change data, wherein the flow change data is data generated during the transaction and use of the electronic voucher.
[0111] For example, assume that the above-mentioned state change operation is acquisition, that is, after the user node is registered in the blockchain system, it obtains the electronic certificate from a certain level of intermediate node by paying a preset amount of virtual resources. Based on the smart contract, the blockchain system allocates the preset amount of virtual resources corresponding to the electronic certificate to the publishing node, intermediate nodes at all levels, and user nodes. The results of the allocation of the preset amount of virtual resources to the publishing node, intermediate nodes at all levels, and user nodes and the current status of the electronic certificate in the user node to be used are updated to the blockchain system.
[0112] Exemplarily, assume that the above-mentioned state change operation is redemption, that is: the user node extracts the target object of the electronic certificate from the issuing node, the user node obtains the target object, the usage status of the electronic certificate is redeemed, and the redeemed status of the electronic certificate is stored on the blockchain system.
[0113] Exemplarily, assume that the above-mentioned state change operation is recovery, that is: the user node proposes to recover the electronic certificate to the issuing node, the issuing node recovers the electronic certificate, the above-mentioned electronic certificate status is updated, and is in an initial state of not being obtained by the user node, and the initial state of the above-mentioned electronic certificate is updated in the blockchain system.
[0114] Among them, the initial state is that the publishing node publishes and is not obtained by the user node, that is, the preset amount of virtual resources is not allocated. During recycling, the publishing node, intermediate nodes at all levels and user nodes return the allocated preset amount of virtual resources and record the returned data in the blockchain system.
[0115] Exemplarily, assume that the above-mentioned state change operation is a transfer, that is, a user node transfers an electronic certificate to another user node, a user node transfers a preset amount of virtual resources obtained to another user node, the other user node has the right to use the electronic certificate, and the preset amount of virtual resources obtained by the other user node and the change of the right to use the electronic certificate are stored in the blockchain system.
[0116] It is understandable that storing all the status change data involved in the status change operation on the blockchain makes the electronic certificate management method more transparent and reliable, increases user trust, and at the same time utilizes the traceability of the blockchain to effectively prevent the occurrence of fraud, reduce interest disputes between publishing nodes and user nodes, improve data security, and promote the healthy development of the market.
[0117] In some embodiments, the blockchain system includes a parent chain and a child chain, and the above step S203 can be implemented as the following steps:
[0118] S2031. Upload the state change data to the parent chain. The parent chain is used to package the state change data to obtain the hash value corresponding to the state change data.
[0119] S2032. Upload the state change data and the hash value corresponding to the state change data to the subchain, which is used to store the state change data and the hash value corresponding to the state change data.
[0120] It can be understood that the hash value can ensure that the state change data has not been tampered with during storage or transmission, preventing someone from forging electronic credentials. Packaging the state change data into a hash value increases the security of the state change data. At the same time, the storage space occupied by the hash value is usually smaller than the original state change data, saving internal storage resources of the blockchain.
[0121] In some embodiments, the sub-chain includes a first sub-chain and a second sub-chain.
[0122] The first subchain is used to store virtual resource change data and the hash value corresponding to the virtual resource change data, and the second subchain is used to store flow change data and the hash value corresponding to the flow change data.
[0123] For example, see Figure 5Based on the above step S202, the smart contract of the electronic certificate is automatically generated. When a state change operation (acquisition, exchange, recovery, donation, expiration) is detected, the smart contract of the electronic certificate is automatically executed, and the blockchain distributes a preset amount of virtual resources to multiple target nodes. The smart contract corresponding to the state change operation is detected to be terminated, and the virtual resources and circulation resources of the electronic certificate are uploaded to a block of the blockchain system parent chain for packaging, and a hash value is obtained. After waiting for the blockchain packaging to be completed, the virtual resource change data of the electronic certificate and the hash value corresponding to the virtual resource change data are uploaded to the first sub-chain storage, and the circulation change data of the electronic certificate and the hash value corresponding to the circulation change data are uploaded to the second sub-chain storage. The chain is completed, and the electronic certificate smart contract is eliminated.
[0124] It can be understood that storing virtual resource change data and circulation resource change data can effectively prevent the occurrence of counterfeit electronic certificates. At the same time, virtual resource data and circulation resource data are stored separately, and different types of data are processed separately, which reduces conflicts between different types of data. At the same time, it avoids network delays caused by excessive data storage and improves the response speed and processing capabilities of the blockchain system.
[0125] The following is an implementation method provided in the examples of the present application.
[0126] a1. Release nodes to build a blockchain system.
[0127] Exemplarily, the publishing node produces a corresponding electronic certificate based on the target object, and the intermediate nodes at all levels can join the blockchain after negotiation with the publishing node. The publishing node determines the smart contract of the electronic certificate and opens a channel for the user node to join the blockchain system; wherein the blockchain system has the function of allowing multiple target nodes to freely enter the system, freely exit the system, and change the intermediate node level. Changing the intermediate node level includes functions such as change, query, and delete.
[0128] Among them, the basic information included in the electronic certificate includes: electronic certificate number, manufacturer name, agent company names at all levels, product name, electronic certificate price, product specifications, product quantity, purchase transaction time, and hash value.
[0129] Among them, the smart contract is determined based on the basic information of the electronic certificate, the distribution ratio between at least one owner of a preset number of virtual resources corresponding to the electronic certificate and at least one owner, the validity period of the electronic certificate, and the status change operation of the electronic certificate.
[0130] a2. Consumers obtain electronic certificates.
[0131] For example, see Figure 6, the user node applies for a blockchain system account, selects a certain level of intermediate node to send a first request message, and the certain level of intermediate node receives the first request message sent by the user node, and the first request message is a request for the user node to obtain an electronic certificate; in response to the first request message, the certain level of intermediate node sends a second request message to the publishing node, and the second request message is a request for the intermediate node to query the remaining number of electronic certificates; after the publishing node receives the second request message sent by the certain level of intermediate node and confirms that there are remaining electronic certificates, the publishing node sends a first response message to the certain level of intermediate node, and the first response message is used to issue electronic certificates to the user node; after receiving the first response message, the certain level of intermediate node sends a smart contract to the user node, and the user node confirms and signs the smart contract after receiving it. The blockchain system allocates virtual resources based on the preset amount agreed upon in the smart contract among the publishing node, intermediate nodes at all levels and user nodes, and the user node obtains the electronic certificate.
[0132] a3. Consumers use electronic vouchers.
[0133] In some embodiments, see Figure 7 The user node proposes to use (exchange, recycling, transfer) the electronic certificate to a certain level of intermediate node. The blockchain system determines whether the electronic certificate has expired. If not, it will proceed according to the status change operation of the user node.
[0134] For example, see Figure 8 The user node sends a third request message to the publishing node. The third request message is a request from the user node to redeem the electronic certificate. After the publishing node confirms that the basic information of the electronic certificate is correct, it sends the target object to the user node. After receiving the target object, the user node confirms that the target object is correct. The above interaction process ends.
[0135] For example, see Fig. 9 The user node sends a fourth request message to an intermediate node at a certain level, and the intermediate node at a certain level receives the fourth request message from the user node. The fourth request message is a request for the user node to recover the electronic certificate; in response to the fourth request message, the intermediate node at a certain level sends a fifth request message to the publishing node. The fifth request message is a request for the intermediate node at a certain level to review the electronic certificate. After confirming the basic information of the electronic certificate, the publishing node sends a second response message to the intermediate node at a certain level. The second response message is used to indicate that the basic information of the electronic certificate is correct. After receiving the second response message, the intermediate node at a certain level sends a smart contract to the user node. The user node confirms the recovery and signs the smart contract. The blockchain system returns the preset amount of virtual resources allocated to the publishing node, intermediate nodes at all levels and user nodes based on the smart contract.
[0136] For example, see Fig.10, user node A sends the sixth request message to the publishing node. The sixth request message is used to instruct user node A to request the node to transfer the electronic certificate to user node B. In response to the received sixth response message, the publishing node determines that the basic information of the electronic certificate of user node A and the basic information of user node B are correct, and agrees to the transfer application request of user node A. The publishing node transfers the right to use the electronic certificate of user node A to user node B, and synchronizes the transfer information of the electronic certificate to intermediate nodes at all levels.
[0137] In some embodiments, if the user node does not use the electronic certificate within the validity period, the user node will lose the right to use the above electronic certificate, and the above electronic certificate will become invalid and cannot be exchanged, recycled, transferred, etc.
[0138] It can be seen that the above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to achieve the above functions, the embodiment of the present application provides a hardware structure and / or software module corresponding to each function. It should be easily appreciated by those skilled in the art that, in combination with the modules and algorithm steps of each example described in the embodiment disclosed herein, the embodiment of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0139] The embodiment of the present application can divide the electronic credential management device into functional modules according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. Optionally, the division of modules in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation.
[0140] In some embodiments, the present application further provides an electronic credential management device. The electronic credential management device may include one or more functional modules for implementing the electronic credential management method of the above method embodiment.
[0141] For example, Fig.11 A schematic diagram of the composition of an electronic certificate management device provided in an embodiment of the present application. Fig.11 As shown, the electronic certificate management device 800 is applied to a blockchain system; the electronic certificate management device 800 includes: a detection module 801 and a processing module 802.
[0142] In some embodiments, the detection module 801 is used to detect the state change operation of the electronic certificate; the state change operation is the change in state caused by the electronic certificate flowing between multiple target nodes in the blockchain system; the electronic certificate is used to extract the target object, and the electronic certificate corresponds to a preset number of virtual resources; the processing module 802 is used to determine and execute the smart contract involved in the state change operation of the electronic certificate, and allocate virtual resources among multiple target nodes based on the change in the virtual resource owner involved in the state change operation.
[0143] In other embodiments, the processing module 802 is further used to update the data stored on the blockchain system based on the state change data involved in the state change operation.
[0144] In some other embodiments, the blockchain system includes a parent chain and a child chain; the processing module 802 is specifically used to upload the state change data to the parent chain, and the parent chain is used to package the state change data to obtain a hash value corresponding to the state change data; the state change data and the hash value corresponding to the state change data are uploaded to the child chain, and the child chain is used to store the state change data and the hash value corresponding to the state change data.
[0145] In some further embodiments, the state change data includes virtual resource change data and flow change data; the sub-chain includes a first sub-chain and a second sub-chain; wherein the first sub-chain is used to store the virtual resource change data and the hash value corresponding to the virtual resource change data; and the second sub-chain is used to store the flow change data and the hash value corresponding to the flow change data.
[0146] In some further embodiments, the multiple target nodes include at least one of the following: a publishing node for formulating, issuing and reclaiming electronic credentials; intermediate nodes at various levels for proxying electronic credentials; and a user node for obtaining and using electronic credentials.
[0147] In some further embodiments, the state change operation includes at least one of the following: acquisition, redemption, recycling, donation, and expiration.
[0148] In some other embodiments, the smart contract is determined based on the basic information of the electronic certificate, the distribution ratio between at least one owner and at least one owner of a preset number of virtual resources corresponding to the electronic certificate, the validity period of the electronic certificate, and the status change operation of the electronic certificate.
[0149] In the case of implementing the functions of the above-mentioned integrated modules in the form of hardware, the embodiment of the present invention provides a possible structural diagram of the electronic device involved in the above-mentioned embodiment. Fig.12 As shown, the electronic device 900 includes: a processor 902 , a communication interface 903 , and a bus 904 . Optionally, the electronic device 900 may further include a memory 901 .
[0150] The processor 902 may be a processor that implements or executes various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of the present application. The processor 902 may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array, or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of the present application. The processor 902 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
[0151] The communication interface 903 is used to connect with other devices via a communication network, such as Ethernet, wireless access network, wireless local area network (WLAN), etc.
[0152] The memory 901 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
[0153] As a possible implementation, the memory 901 may exist independently of the processor 902, and the memory 901 may be connected to the processor 902 via a bus 904 to store instructions or program codes. When the processor 902 calls and executes the instructions or program codes stored in the memory 901, the electronic credential management method provided in the embodiment of the present invention can be implemented.
[0154] In another possible implementation, the memory 901 may also be integrated with the processor 902 .
[0155] The bus 904 may be an extended industry standard architecture (EISA) bus, etc. The bus 904 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.12 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0156] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the service calling device can be divided into different functional modules to complete all or part of the functions described above.
[0157] The embodiment of the present application also provides a computer-readable storage medium. All or part of the processes in the above method embodiments can be completed by computer instructions to instruct the relevant hardware, and the program can be stored in the above computer-readable storage medium. When the program is executed, it may include the processes of the above method embodiments. The computer-readable storage medium can be the memory or memory of any of the above embodiments. The above computer-readable storage medium can also be an external storage device of the above service calling device, such as a plug-in hard disk, a smart memory card (smart media card, SMC), a secure digital (secure digital, SD) card, a flash card (flash card), etc. equipped on the above service calling device. Further, the above computer-readable storage medium can also include both the internal storage unit of the above service calling device and an external storage device. The above computer-readable storage medium is used to store the above computer program and other programs and data required by the above service calling device. The above computer-readable storage medium can also be used to temporarily store data that has been output or is to be output.
[0158] The embodiments of the present application also provide a computer program product, which includes a computer program. When the computer program product is run on a computer, the computer is enabled to execute any one of the electronic credential management methods provided in the above embodiments.
[0159] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. An electronic voucher management method, characterized in that: Applied to a blockchain system, the method includes: A state change operation of the electronic credential is detected; the state change operation is a state change caused by the electronic credential flowing between multiple target nodes of the blockchain system; the electronic credential is used to extract the target object, and the electronic credential corresponds to a preset number of virtual resources; Determine and execute the smart contract involved in the state change operation of the electronic certificate, and allocate virtual resources among the multiple target nodes based on the change of the virtual resource owner involved in the state change operation.
2. The method according to claim 1, characterized in that The method further comprises: Based on the state change data involved in the state change operation, the data stored on the blockchain system is updated.
3. The method according to claim 2, characterized in that The blockchain system includes a parent chain and a child chain; The updating of data stored on the blockchain system based on the state change data involved in the state change operation includes: Upload the state change data to the parent chain, and the parent chain is used to package the state change data to obtain a hash value corresponding to the state change data; The state change data and the hash value corresponding to the state change data are uploaded to the subchain, and the subchain is used to store the state change data and the hash value corresponding to the state change data.
4. The method according to claim 3, characterized in that The state change data includes virtual resource change data and flow change data; the subchain includes a first subchain and a second subchain; wherein the first subchain is used to store the virtual resource change data and the hash value corresponding to the virtual resource change data; the second subchain is used to store the flow change data and the hash value corresponding to the flow change data.
5. The method according to claim 1, characterized in that The multiple target nodes include at least one of the following: A publishing node, used for formulating, issuing and retrieving the electronic certificate; Intermediate nodes at all levels are used to act as agents for the electronic certificates; The user node is used to obtain and use the electronic certificate.
6. The method according to claim 1, characterized in that The state change operation includes at least one of the following: acquisition, exchange, recycling, donation, and expiration.
7. The method according to claim 1, characterized in that The smart contract is determined based on the basic information of the electronic certificate, at least one owner of a preset number of virtual resources corresponding to the electronic certificate and the distribution ratio between the at least one owner, the validity period of the electronic certificate, and the status change operation of the electronic certificate.
8. An electronic device, characterized in that: It comprises a processor and a memory, wherein the processor is coupled to the memory; the memory is used to store computer instructions, and the computer instructions are loaded and executed by the processor to enable the computer device to implement the electronic credential management method as described in any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes computer-executable instructions, and when the computer-executable instructions are executed on a computer, the computer is enabled to execute the electronic credential management method according to any one of claims 1 to 7.
10. A computer program product, characterized in that The computer program product includes a computer program, and when the computer program is executed on an electronic device, the electronic device executes the electronic credential management method according to any one of claims 1 to 7.