Blockchain-based information processing method, apparatus, device, and medium
By writing the summary information of the voucher number data onto the blockchain and generating voucher redemption parameters, the problem of electronic voucher numbers being illegally written or generated in advance after the acquisition deadline is solved, thus ensuring the security and reliability of the voucher numbers.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- DATAA ROBOTICS (CHENGDU) CO LTD
- Filing Date
- 2022-03-28
- Publication Date
- 2026-04-21
AI Technical Summary
How can we ensure the security and reliability of voucher numbers during the generation of electronic vouchers, prevent voucher numbers from being illegally written after the acquisition deadline, and ensure that they are not generated in advance before the redemption time?
By writing the summary information of the certificate number data into the blockchain after the certificate acquisition deadline, and determining the target block according to the certificate acquisition deadline and block production cycle, certificate redemption parameters are generated and provided to the certificate issuance system to generate the desired certificate number data.
This effectively prevents the illegal generation and alteration of voucher numbers before the redemption time, ensuring the security and reliability of voucher numbers.
Smart Images

Figure CN115098878B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of blockchain technology, and in particular to a blockchain-based information processing method, apparatus, device, and medium. Background Technology
[0002] Electronic credentials are a form of record-keeping for business transactions in an electronic manner. For example, electronic credentials include those for logging into application systems, granting access to specific venues, or for financial transactions. In some application scenarios, over time, a large number of electronic credentials with different numbers need to be generated. Ensuring the generation of secure and reliable credential numbers becomes a pressing technical problem. Summary of the Invention
[0003] This application provides a blockchain-based information processing method, apparatus, device, and medium to ensure the security and trustworthiness of desired credential number data.
[0004] This application provides a blockchain-based information processing method, comprising: obtaining voucher number data generated in the current period after the voucher acquisition deadline has arrived from a voucher issuance system; generating a digest of the voucher number data using a first message digest algorithm; writing the digest information into a first block of the blockchain and generating a block header data of the first block based on the hash value of the digest information, wherein the first block is a new block added to the blockchain when the block production cycle arrives; determining a target block corresponding to the voucher redemption time of the current period from blocks that appear on the blockchain sequentially after the first block according to the block production cycle, based on the voucher acquisition deadline and the block production cycle; and generating voucher redemption parameters for the current period based on the block header data of the target block during the period when the voucher redemption time of the current period arrives, wherein the voucher redemption parameters are provided to the voucher issuance system so that the voucher issuance system can generate the expected voucher number data for the current period based on the voucher redemption parameters.
[0005] This application embodiment also provides a blockchain-based information processing device, comprising: an acquisition module, configured to acquire, from a certificate issuance system, the generated certificate number data of the current period after the certificate acquisition deadline has arrived, and to generate a digest of the certificate number data using a first information digest algorithm; a processing module, configured to write the digest information into a first block of the blockchain, and generate block header data of the first block based on the hash value of the digest information, wherein the first block is a newly added block on the blockchain when the block production cycle arrives; a target block corresponding to the certificate redemption time of the current period is determined from the blocks that appear on the blockchain sequentially after the first block according to the block production cycle, based on the certificate acquisition deadline and the block production cycle; and during the period when the certificate redemption time of the current period arrives, generating certificate redemption parameters for the current period based on the block header data of the target block, wherein the certificate redemption parameters are provided to the certificate issuance system so that the certificate issuance system can generate the expected certificate number data of the current period based on the certificate redemption parameters.
[0006] This application also provides a computer device, including: a memory and a processor; the memory for storing a computer program; and the processor coupled to the memory for executing the computer program to perform steps in a blockchain-based information processing method.
[0007] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to implement the steps in a blockchain-based information processing method.
[0008] In this embodiment, after the deadline for obtaining vouchers in each period, the summary information of the generated voucher number data for that period is written to the blockchain in the form of a transaction. This prevents the expected voucher number data from being illegally written into the voucher issuance system after the voucher acquisition deadline and also allows for tracing the voucher number data generated in the current period. Furthermore, based on the voucher acquisition deadline and block generation cycle, a new target block corresponding to the voucher redemption time of the current period is added to the blockchain when the voucher redemption time arrives. Based on the block header data of the target block, voucher redemption parameters for the current period are generated. These parameters are provided to the voucher issuance system to generate the expected voucher number data for the current period. This effectively prevents the expected voucher number data for the current period from being generated before the voucher redemption time, ensuring the security and reliability of the expected voucher number data and reducing the risk of illegal tampering with it. Attached Figure Description
[0009] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0010] Figure 1 An architecture diagram of a blockchain system provided as an exemplary embodiment of this application;
[0011] Figure 2 A flowchart illustrating an exemplary embodiment of this application for a blockchain-based information processing method;
[0012] Figure 3 A schematic diagram illustrating the linking of blocks provided in an exemplary embodiment of this application;
[0013] Figure 4 A diagram illustrating the process of generating expected credential number data provided in an exemplary embodiment of this application;
[0014] Figure 5 A schematic diagram of the structure of a blockchain-based information processing device provided as an exemplary embodiment of this application;
[0015] Figure 6 This is a schematic diagram of the structure of a computer device provided for an exemplary embodiment of this application. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0017] First, the terms used in the embodiments of this application will be explained:
[0018] A voucher issuance system is a system that can generate voucher number data for electronic vouchers according to the period.
[0019] Voucher Acquisition Start Time: This refers to the start time for acquiring voucher number data from the voucher issuance system for each period.
[0020] Voucher acquisition deadline: refers to the deadline for obtaining voucher number data from the voucher issuance system for each period;
[0021] Voucher redemption time: This refers to the time when the voucher issuance system redeems the expected voucher number data for each period. When the voucher redemption time for each period arrives, the voucher issuance system generates an expected voucher number for that period based on the voucher number data generated between the start and end times of voucher acquisition for that period. If the voucher number data generated between the start and end times of voucher acquisition matches the expected voucher number data, the recipient of that voucher number data can be granted corresponding permissions, such as login permissions, transfer permissions, or access to private venues, etc.
[0022] Both voucher number data and expected voucher number data refer to the voucher number data generated by the voucher issuance system; voucher redemption parameters are parameters used to assist in generating expected voucher number data.
[0023] To meet the existing need for ensuring the generation of reliable certificate numbers, this application provides a blockchain-based information processing method, apparatus, device, and medium. In this application, after the certificate acquisition deadline for each period, a summary of the generated certificate number data for that period is written to the blockchain in the form of a transaction. This prevents the expected certificate number data from being illegally written into the certificate issuance system after the certificate acquisition deadline and also allows for tracing the generated certificate number data for the current period. Furthermore, based on the certificate acquisition deadline and block generation cycle, a target block corresponding to the certificate redemption time of the current period is added to the blockchain when the certificate redemption time arrives. Based on the block header data of the target block, certificate redemption parameters for the current period are generated and provided to the certificate issuance system for generating the expected certificate number data for the current period. This effectively prevents the expected certificate number data for the current period from being generated before the certificate redemption time, ensuring the security and reliability of the expected certificate number data and reducing the risk of illegal tampering with it.
[0024] Figure 1 This is an architectural diagram of a blockchain system provided as an exemplary embodiment of this application. Figure 1 As shown, this blockchain system can include multiple blockchain nodes, which together form the blockchain system. Each blockchain node can be a terminal device or a server, and all nodes have equal status within the blockchain system, jointly maintaining a single blockchain.
[0025] like Figure 1As shown, the blockchain system can interact with the certificate issuance system to obtain certificate information provided by the certificate issuance system and perform corresponding data processing on the certificate information, such as requesting other blockchain nodes to perform consensus processing on the certificate information, generating blocks, and storing it on the chain. The certificate issuance system can provide certificate issuance services to certificate issuing institutions; this certificate issuance system can be a terminal device or a server.
[0026] The terminal device can be either hardware or software. When the terminal device is hardware, it can be, for example, a mobile phone, tablet computer, desktop computer, wearable smart device, or smart home device. When the terminal device is software, it can be installed on the aforementioned hardware devices. In this case, the terminal device can be, for example, multiple software modules or a single software module; this application embodiment is not limited in its scope. The server can also be either hardware or software. When the server is hardware, it can be a single server or a distributed server cluster composed of multiple servers. When the server is software, it can be multiple software modules or a single software module; this application embodiment is not limited in its scope.
[0027] It should be understood that, Figure 1 The number of blockchain nodes and credential issuance systems shown is merely illustrative. In practical applications, any number of blockchain nodes and credential issuance systems can be deployed according to actual needs.
[0028] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.
[0029] Figure 2 This is a flowchart illustrating an exemplary embodiment of a blockchain-based information processing method provided in this application. See also... Figure 2 The method may include the following steps:
[0030] 201. Retrieve the voucher number data generated in the current period after the voucher acquisition deadline has arrived from the voucher issuance system.
[0031] 202. Use the first message digest algorithm to generate a message digest of the voucher number data.
[0032] 203. Write the digest information into the first block of the blockchain, and generate the block header data of the first block based on the hash value of the digest information. The first block is a new block added to the blockchain when the block production cycle arrives.
[0033] 204. Based on the certificate acquisition deadline and block production cycle, determine the target block corresponding to the certificate redemption time of the current period from the blocks that appear on the blockchain in sequence according to the block production cycle after the first block.
[0034] 205. During the period when the voucher redemption time of the current period arrives, generate the voucher redemption parameters for the current period based on the block header data of the target block. The voucher redemption parameters are provided to the voucher issuance system so that the voucher issuance system can generate the expected voucher number data for the current period based on the voucher redemption parameters.
[0035] The blockchain-based information processing method provided in this application can be executed by any blockchain node in the blockchain network. Specifically, after the deadline for obtaining vouchers in each period arrives, the voucher issuance system provides the blockchain system with the voucher number data generated in the current period. Any blockchain node in the blockchain system processes the generated voucher number data of the current period using a first message digest algorithm to obtain a digest of the generated voucher number data. The first message digest algorithm includes, but is not limited to, the following message digest algorithms: SHA-1, SHA-224, SHA-256, SHA-384, and SHA-512.
[0036] In this embodiment, a new block is added to the blockchain every block production cycle. Optionally, when a new block is added to the blockchain at the end of each block production cycle, the block header data of the next block is determined based on the block header data of the previous block. As an example, when determining the block header data of the next block based on the block header data of the previous block, the hash value of the block header data of the previous block is calculated as the parent block hash value of the next block, and the hash value of the transaction data written to the block body of the next block is also calculated. The parent block hash value and the hash value of the transaction data written to the block body of the next block are then used as the block header data of the next block.
[0037] For ease of understanding, Figure 3 Let's take an example to illustrate. Figure 3 In this process, the block header data of the Nth block is written into the block header of the (N+1)th block as the hash value of the parent block associated with the N+1th block, and the block header of the (N+1)th block also contains the hash value of all transaction data in the block body of the N+1th block. Similarly, the block header data of the (N+1)th block is written into the block header of the (N+2)th block as the hash value of the parent block associated with the N+2th block, and the block header of the (N+2)th block also contains the hash value of all transaction data in the block body of the N+2th block.
[0038] In this embodiment, after obtaining the summary information of the generated voucher number data for the current period, any blockchain node generates a block and adds it to the blockchain when the block production cycle arrives, based on the summary information of the generated voucher number data for the current period. For ease of understanding and distinction, the block generated at this time is referred to as the first block. Further optionally, when adding the first block to the blockchain, any blockchain node records the summary information of the generated voucher number data for the current period as transaction information in the block body of the first block, and generates the block header data of the first block based on the hash value of the summary information. As an example, when generating the block header data of the first block based on the hash value of the summary information, the hash value of the parent block of the first block can be obtained, and the block header data of the first block can be generated based on the hash value of the parent block of the first block and the hash value of the summary information of the generated voucher number data.
[0039] In this embodiment, based on the credential acquisition deadline and block production cycle, the target block corresponding to the current credential redemption time can be determined from the blocks that appear on the blockchain sequentially after the first block according to the block production cycle. In an optional implementation, one method for determining the target block corresponding to the current credential redemption time from the blocks that appear on the blockchain sequentially after the first block according to the block production cycle is as follows: Based on the credential acquisition deadline, credential redemption time, and block production cycle, determine the number of blocks that can be generated from the credential acquisition deadline to the credential redemption time; sum the block number of the first block and the number of blocks that can be generated to determine the block number of the target block, which is used to identify the on-chain order of the target block in the blockchain.
[0040] For example, if the block generation cycle is 12 seconds, the deadline for obtaining vouchers in the current period is 2021-12-13 20:00, and the voucher redemption time in the current period is 2021-12-13 21:00, then 300 blocks can be generated between 2021-12-13 20:00 and 2021-12-13 21:00. Assuming the block number of the first block is denoted as N, where N is a positive integer, then the block number of the target block is N+300.
[0041] In this embodiment, after determining the target block corresponding to the current period's voucher redemption time, the blockchain node generates the voucher redemption parameters for the current period based on the block header data of the target block during the period leading up to the current period's voucher redemption time. The starting point for the timeframe leading to the current period's voucher redemption draw time is the voucher redemption draw time.
[0042] Optionally, to further enhance the security of the expected voucher number data for the current period, when generating the voucher redemption parameters for the current period based on the block header data of the target block, a second message digest algorithm can be used to generate a digest of the block header data of the target block, and this digest can be used as the voucher redemption parameter. The second message digest algorithm may include, but is not limited to, the following algorithms: SHA-1, SHA-224, SHA-256, SHA-384, and SHA-512.
[0043] In this embodiment, blockchain nodes can provide voucher redemption parameters to the voucher redemption and issuance system, which then generates the expected voucher number data for the current period based on these parameters. This application embodiment does not limit the method by which the voucher issuance system generates the expected voucher number data for the current period based on the voucher redemption parameters. As an example, one implementation of the voucher issuance system generating the expected voucher number data for the current period based on the voucher redemption parameters is as follows: the voucher issuance system randomly generates 6 numbers from 0 to 60 natural numbers as the expected voucher number data for the current period based on the voucher redemption parameters. The following is an exemplary algorithm for generating expected voucher number data, which takes the voucher redemption parameters as input and generates the expected voucher number data:
[0044]
[0045] Optionally, smart contracts can be deployed on blockchain nodes, which then invoke these contracts to execute blockchain-based information processing methods. Additionally, blockchain nodes can store summary information about the voucher type, current period, voucher number, and the target block's block number in the smart contract. When the smart contract is invoked to generate the voucher redemption parameters for the current period, it can retrieve the target block's header data from the blockchain based on the target block's block number and generate the redemption parameters accordingly.
[0046] The blockchain-based information processing method provided in this application, after the deadline for obtaining vouchers in each period, writes the summary information of the generated voucher number data for that period into the blockchain in the form of a transaction. This prevents the expected voucher number data from being illegally written into the voucher issuance system after the voucher acquisition deadline and also allows for tracing the voucher number data generated in the current period. Furthermore, based on the voucher acquisition deadline and block generation cycle, a target block corresponding to the voucher redemption time of the current period is added to the blockchain when the voucher redemption time arrives. Based on the block header data of the target block, voucher redemption parameters for the current period are generated and provided to the voucher issuance system for generating the expected voucher number data for the current period. This effectively prevents the expected voucher number data for the current period from being generated before the voucher redemption time, ensuring the security and reliability of the expected voucher number data.
[0047] In practical applications, the validity of newly added blocks on the blockchain changes dynamically and may be replaced by more valid blocks. Further optionally, to enhance the security of the desired voucher number data, after confirming the target block is valid, the lottery parameters for the current period can be generated based on the target block's header data. Therefore, in one optional implementation, the process of generating the voucher redemption parameters for the current period based on the target block's header data during the period leading up to the voucher redemption time is as follows: Upon reaching the voucher redemption time for the current period, determine whether the target block is valid based on the number of blocks added to the blockchain after the target block; if the target block is valid, retrieve the target block's header data from the blockchain based on its block number; and generate the voucher redemption parameters for the current period based on the target block's header data.
[0048] In this embodiment, if a predetermined number of blocks are added to the blockchain after the target block, the target block is considered valid. The predetermined number is set according to actual business needs, for example, 6. Therefore, in an optional implementation, when the redemption time for the current period of vouchers arrives, one method for determining the validity of the target block based on the number of blocks added to the blockchain after the target block is as follows: Upon arrival at the redemption time for the current period of vouchers, monitor the number of new blocks generated on the blockchain after the target block until the number of new blocks reaches the predetermined number, at which point the target block is determined to be valid.
[0049] For ease of understanding, combined with Figure 4The following explanation is provided: After the deadline for obtaining vouchers in the current period arrives, the summary information of the voucher number data generated in the current period is written to block N. When the voucher redemption time for the current period arrives, M new blocks are added to the blockchain, where M is a positive integer. If 6 more blocks are added after block N+M, that is, after block N+M+6 is added to the blockchain, and block N+M is confirmed as a valid block, then the block header data of block N+M is obtained as the voucher redemption parameter for the current period to generate the desired voucher number data.
[0050] It should be noted that the execution subject of each step of the method provided in the above embodiments can be the same device, or the method can be executed by different devices. For example, the execution subject of steps 201 to 203 can be device A; or the execution subject of steps 201 and 202 can be device A, and the execution subject of step 203 can be device B; and so on.
[0051] Furthermore, in some of the processes described in the above embodiments and accompanying drawings, multiple operations appear in a specific order. However, it should be clearly understood that these operations may not be executed in the order they appear herein, or they may be executed in parallel. The operation numbers, such as 201, 202, etc., are merely used to distinguish different operations and do not represent any execution order. Additionally, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel. It should be noted that the descriptions such as "first" and "second" in this document are used to distinguish different messages, devices, modules, etc., and do not represent a sequential order, nor do they limit "first" and "second" to different types.
[0052] Figure 5 This is a schematic diagram of the structure of a blockchain-based information processing device provided as an exemplary embodiment of this application. See also... Figure 5 The device may include an acquisition module 51 and a processing module 52.
[0053] The acquisition module 51 is used to acquire the voucher number data of the current period generated after the voucher acquisition deadline of the current period has arrived from the voucher issuance system, and to generate the digest information of the voucher number data using the first information digest algorithm.
[0054] Processing module 52 is used to write the summary information into the first block of the blockchain and generate the block header data of the first block according to the hash value of the summary information. The first block is a new block added to the blockchain when the block production cycle arrives. According to the certificate acquisition deadline and the block production cycle, the target block corresponding to the certificate redemption time of the current period is determined from the blocks that appear on the blockchain in sequence according to the block production cycle after the first block. During the period when the certificate redemption time of the current period arrives, the certificate redemption parameters of the current period are generated according to the block header data of the target block. The certificate redemption parameters are used to provide the certificate issuance system so that the certificate issuance system can generate the expected certificate number data of the current period based on the certificate redemption parameters.
[0055] Optionally, when processing module 52 determines the target block corresponding to the current period's voucher redemption time from blocks that appear on the blockchain sequentially after the first block according to the block production cycle, based on the voucher acquisition deadline, voucher redemption time, and block production cycle, it specifically performs the following: determining the number of blocks that can be generated from the voucher acquisition deadline to the voucher redemption time; and determining the block number of the target block as the sum of the block number of the first block and the number of blocks that can be generated. The block number of the target block is used to identify the on-chain order of the target block in the blockchain.
[0056] Optionally, when the processing module 52 generates the voucher redemption parameters for the current period based on the block header data of the target block during the period when the voucher redemption time for the current period arrives, it specifically performs the following: when the voucher redemption time for the current period arrives, it determines whether the target block is effective based on the number of blocks uploaded to the blockchain after the target block; if the target block is effective, it obtains the block header data of the target block from the blockchain based on the block number of the target block; and generates the voucher redemption parameters for the current period based on the block header data of the target block.
[0057] Further optionally, when the current period's voucher redemption time arrives, the processing module 52 determines whether the target block is effective based on the number of blocks uploaded to the blockchain after the target block. Specifically, it monitors the number of new blocks generated on the blockchain after the target block when the current period's voucher redemption time arrives, and determines that the target block is effective when the number of new blocks reaches a set number.
[0058] Optionally, the processing module 52 is further configured to: when a new block is added to the blockchain at the arrival of each block production cycle, determine the block header data of the next new block based on the block header data of the previous block.
[0059] Optionally, when the processing module 52 generates the voucher redemption parameters for the current period based on the block header data of the target block, it specifically uses the second digest algorithm to generate a digest of the block header data of the target block and uses the digest of the block header data of the target block as the voucher redemption parameters.
[0060] Further optionally, the first message digest algorithm or the second message digest algorithm includes at least one of the following: SHA-1, SHA-224, SHA-256, SHA-384, and SHA-512.
[0061] Further optionally, the processing module 52 is also used to: store the summary information of the voucher type, current period, voucher number data and the block number of the target block into the smart contract.
[0062] Optionally, the voucher issuance system generates expected voucher number data for the current period based on the voucher redemption parameters, including: the voucher issuance system randomly generates 6 numbers from 0 to 60 natural numbers as expected voucher number data for the current period based on the voucher redemption parameters.
[0063] about Figure 5 The specific implementation of the blockchain-based information processing device shown has been described in detail in the embodiments of the blockchain-based information processing method described above, and will not be elaborated here.
[0064] Figure 6 This is a schematic diagram of the structure of a computer device provided for an exemplary embodiment of this application. See also: Figure 6 The computer device includes: memory 61 and processor 62.
[0065] Memory 61 is used to store computer programs and can be configured to store various other data to support operation on the computing platform. Examples of this data include instructions for any application or method operating on the computing platform, contact data, phone book data, messages, pictures, videos, etc.
[0066] The memory 61 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0067] Processor 62, coupled to memory 61, is used to execute a computer program in memory 61 for: obtaining from the certificate issuance system the generated certificate number data for the current period after the certificate acquisition deadline has arrived, and generating a digest of the certificate number data using a first digest algorithm; writing the digest information into a first block of the blockchain, and generating block header data for the first block based on the hash value of the digest information, wherein the first block is a new block added to the blockchain when the block production cycle arrives; determining the target block corresponding to the certificate redemption time for the current period from the blocks that appear on the blockchain sequentially after the first block according to the block production cycle, based on the certificate acquisition deadline and the block production cycle; and generating certificate redemption parameters for the current period based on the block header data of the target block during the period when the certificate redemption time for the current period arrives, wherein the certificate redemption parameters are provided to the certificate issuance system so that the certificate issuance system can generate the expected certificate number data for the current period based on the certificate redemption parameters.
[0068] Optionally, when the processor 62 determines the target block corresponding to the current period's voucher redemption time from the blocks that appear on the blockchain sequentially after the first block according to the block production cycle, based on the voucher acquisition deadline, voucher redemption time, and block production cycle, it specifically performs the following: determining the number of blocks that can be generated from the voucher acquisition deadline to the voucher redemption time; and determining the block number of the target block as the sum of the block number of the first block and the number of blocks that can be generated, whereby the block number of the target block is used to identify the on-chain order of the target block in the blockchain.
[0069] Optionally, when the processor 62 generates the voucher redemption parameters for the current period based on the block header data of the target block during the period when the voucher redemption time for the current period arrives, it specifically performs the following: when the voucher redemption time for the current period arrives, it determines whether the target block is effective based on the number of blocks added to the blockchain after the target block; if the target block is effective, it obtains the block header data of the target block from the blockchain based on the block number of the target block; and generates the voucher redemption parameters for the current period based on the block header data of the target block.
[0070] Optionally, when the current period's voucher redemption time arrives, the processor 62 determines whether the target block is effective based on the number of blocks uploaded to the blockchain after the target block. Specifically, this is done by: monitoring the number of new blocks generated on the blockchain after the target block when the current period's voucher redemption time arrives, until the number of new blocks reaches a set number, and then determining that the target block is effective.
[0071] Alternatively, the processor 62 is also configured to: determine the block header data of the next block to be added based on the block header data of the previous block when a new block is added to the blockchain at the arrival of each block cycle.
[0072] Optionally, when the processor 62 generates the voucher redemption parameters for the current period based on the block header data of the target block, it specifically uses: a second message digest algorithm to generate a digest of the block header data of the target block, and uses the digest of the block header data of the target block as the voucher redemption parameters.
[0073] Further optionally, the first message digest algorithm or the second message digest algorithm includes at least one of the following: SHA-1, SHA-224, SHA-256, SHA-384, and SHA-512.
[0074] Further optionally, the processor 62 is also used to: store summary information of the voucher type, current period, voucher number data, and block number of the target block into the smart contract.
[0075] Optionally, the voucher issuance system generates expected voucher number data for the current period based on the voucher redemption parameters, including: the voucher issuance system randomly generates 6 numbers from 0 to 60 natural numbers as expected voucher number data for the current period based on the voucher redemption parameters.
[0076] Furthermore, such as Figure 6 As shown, the computer device also includes other components such as a communication component 63, a display 64, a power supply component 65, and an audio component 66. Figure 6 The diagram only shows some components and does not mean that the computer device includes only these components. Figure 6 The components shown. Additionally... Figure 6 The components within the dashed box are optional, not mandatory, and their specific requirements depend on the product form of the computer device. The computer device in this embodiment can be a terminal device such as a desktop computer, laptop computer, smartphone, or IoT device, or a server-side device such as a conventional server, cloud server, or server array. If the computer device in this embodiment is implemented as a terminal device such as a desktop computer, laptop computer, or smartphone, it may include... Figure 6 The components within the dashed box; if the computer device in this embodiment is implemented as a conventional server, cloud server, or server array, etc., then it may not include... Figure 6 The component within the dashed box.
[0077] Accordingly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed, can perform the steps that can be executed by a computer device in the above method embodiments.
[0078] The aforementioned communication components are configured to facilitate wired or wireless communication between the device containing the communication components and other devices. The device containing the communication components can access wireless networks based on communication standards, such as WiFi, 2G, 3G, 4G / LTE, 5G, and other mobile communication networks, or combinations thereof. In one exemplary embodiment, the communication components receive broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication components also include a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra-Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0079] The aforementioned display includes a screen, which may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touchscreen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation.
[0080] The aforementioned power supply components provide power to various components within the device in which they reside. These power supply components may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the device in which they reside.
[0081] The aforementioned audio component can be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC) configured to receive external audio signals when the device containing the audio component is in an operating mode, such as call mode, recording mode, or voice recognition mode. The received audio signals can be further stored in memory or transmitted via a communication component. In some embodiments, the audio component also includes a speaker for outputting audio signals.
[0082] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0083] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0084] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0085] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0086] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0087] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0088] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0089] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0090] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A blockchain-based information processing method, characterized in that, include: The system obtains the voucher number data generated in the current period after the voucher acquisition deadline has arrived from the voucher issuance system, and generates a digest of the voucher number data using a first information digest algorithm. The digest information is written into the first block of the blockchain, and the block header data of the first block is generated according to the hash value of the digest information. The first block is a new block added to the blockchain when the block production cycle arrives. Based on the certificate acquisition deadline, certificate redemption time, and block generation cycle, determine the number of blocks that can be generated from the certificate acquisition deadline to the certificate redemption time; sum the block number of the first block and the number of blocks that can be generated to determine the block number of the target block corresponding to the certificate redemption time of the current period, and the block number of the target block is used to identify the on-chain order of the target block in the blockchain; When the redemption time for the current period of vouchers arrives, the validity of the target block is determined based on the number of blocks uploaded to the blockchain after the target block; if the target block is valid, the block header data of the target block is obtained from the blockchain based on the block number of the target block. Based on the block header data of the target block, the voucher redemption parameters for the current period are generated; the voucher redemption parameters are provided to the voucher issuance system so that the voucher issuance system can randomly generate 6 numbers from 0 to 60 natural numbers as the expected voucher number data for the current period based on the voucher redemption parameters.
2. The method according to claim 1, characterized in that, Upon reaching the redemption time for the current period of vouchers, the validity of the target block is determined based on the number of blocks uploaded to the blockchain after the target block, including: When the redemption time for the current period of vouchers arrives, the number of new blocks generated on the blockchain after the target block is monitored until the number of new blocks reaches a set number, at which point the target block is determined to be effective.
3. The method according to any one of claims 1 to 2, characterized in that, Also includes: When a new block is added to the blockchain at the end of each block production cycle, the header data of the next new block is determined based on the header data of the previous block.
4. The method according to any one of claims 1 to 2, characterized in that, Based on the block header data of the target block, the voucher redemption parameters for the current period are generated, including: A second message digest algorithm is used to generate a digest of the block header data of the target block, and the digest of the block header data of the target block is used as the voucher redemption parameter.
5. The method according to claim 4, characterized in that, The first message digest algorithm or the second message digest algorithm includes at least one of the following: SHA-1, SHA-224, SHA-256, SHA-384, and SHA-512.
6. The method according to any one of claims 1 to 2, characterized in that, Also includes: Store the voucher type, current period, summary information of the voucher number data, and block number of the target block in the smart contract.
7. A blockchain-based information processing device, characterized in that, include: The acquisition module is used to acquire the voucher number data of the current period generated after the voucher acquisition deadline of the current period has arrived from the voucher issuance system, and to generate the digest information of the voucher number data using a first information digest algorithm; The processing module is configured to write the digest information into the first block of the blockchain, and generate the block header data of the first block according to the hash value of the digest information. The first block is a new block added to the blockchain when the block production cycle arrives. Based on the credential acquisition deadline, credential redemption time, and the block production cycle, the module determines the number of blocks that can be generated from the credential acquisition deadline to the credential redemption time. The module then sums the block number of the first block with the number of blocks that can be generated to determine the block number of the target block corresponding to the credential redemption time of the current period. The block number of the target block is used to identify the on-chain order of the target block in the blockchain. When the redemption time for the current period of vouchers arrives, the validity of the target block is determined based on the number of blocks uploaded to the blockchain after the target block; if the target block is valid, the block header data of the target block is obtained from the blockchain based on the block number of the target block. Based on the block header data of the target block, the voucher redemption parameters for the current period are generated; the voucher redemption parameters are provided to the voucher issuance system so that the voucher issuance system can randomly generate 6 numbers from 0 to 60 natural numbers as the expected voucher number data for the current period based on the voucher redemption parameters.
8. A computer device, characterized in that, include: Memory and processor; The memory is used to store computer programs; The processor is coupled to the memory for executing the computer program to perform the steps of the method according to any one of claims 1-6.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it causes the processor to perform the steps of the method according to any one of claims 1-6.
Citation Information
Patent Citations
Data processing method and device
CN110968644A