Blockchain-based access pass generation method and device, equipment and storage medium

By generating passes using blockchain technology and establishing message queues using blockchain nodes to obtain and encrypt business data in real time, the problem of low security in existing pass systems is solved, and security and real-time performance are improved.

CN114091083BActive Publication Date: 2026-06-23PING AN SECURITIES CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
PING AN SECURITIES CO LTD
Filing Date
2021-11-30
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing pass generation systems are not very secure and are easily forged and tampered with after their confidential algorithms are analyzed.

Method used

Passes are generated using blockchain technology. A pass message queue is established using blockchain nodes to obtain business data in real time and perform encryption and decryption processing to generate passes containing real-time user information.

Benefits of technology

The security of the pass has been improved, the verification process time has been reduced, and the real-time performance and security of the pass have been ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114091083B_ABST
    Figure CN114091083B_ABST
Patent Text Reader

Abstract

The application provides a blockchain-based pass generation method, device and equipment and a storage medium, wherein the method comprises the following steps: acquiring the service data of a user in real time through a blockchain, and encrypting the service data, so that the generated pass has the information of the customer, and the corresponding encryption and decryption algorithm is set for the user; and the corresponding to-be-acquired data is acquired in real time from a second blockchain node, instead of being simply generated according to the user information, so that the security performance of the generated pass is better. The application has the beneficial effect that: since the pass contains the real-time information of the user, when the service process of the user needs to be verified, the data of the user acquired from various servers does not need to be verified, and the real-time service data of the user can be acquired directly according to the pass, so that the verification process of the user is accelerated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence, and in particular to a method, apparatus, device, and storage medium for generating passes based on blockchain. Background Technology

[0002] With the continuous advancement of technology, enterprises have increasingly higher requirements for automation. Many enterprises have set up relevant pass systems based on users. However, the passes generated by the existing pass systems are based on a fixed confidential algorithm to process user information into strings to obtain the corresponding passes. The passes generated in this way are not very secure. Once the confidential algorithm is deciphered, they can be easily forged and tampered with. Summary of the Invention

[0003] The main objective of this invention is to provide a blockchain-based method, apparatus, device, and storage medium for generating passes, aiming to solve the problem that passes generated by existing pass generation systems are not very secure and are easily forged and tampered with once their confidential algorithms are deciphered.

[0004] This invention provides a blockchain-based method for generating passes, comprising:

[0005] The first blockchain node receives a user-uploaded pass acquisition instruction; wherein the pass acquisition instruction contains at least the type of business data to be acquired.

[0006] A password book is created for the user based on the access card acquisition instruction; the password book includes the data type of the business to be acquired and the corresponding encryption / decryption algorithm;

[0007] The corresponding multiple second blockchain nodes in the blockchain are determined by the business data type to be obtained, and a pass message queue for obtaining business data in each second blockchain node is established based on each second blockchain node and the business data type to be obtained.

[0008] The business data corresponding to the pass acquisition instruction is obtained in real time at each of the second blockchain nodes through the pass message queue, and the obtained business data is written into the pass message queue to obtain the target message queue.

[0009] The business data is extracted from the target message queue and encrypted using the encryption / decryption algorithm to obtain the pass.

[0010] Further, the step of sequentially acquiring the business data corresponding to the pass acquisition instruction at each of the second blockchain nodes in real time through the pass message queue, and writing the acquired business data into the pass message queue to obtain the target message queue includes:

[0011] Real-time acquisition of the working status of each second blockchain node;

[0012] Select the target second blockchain node with the best real-time working status among each second blockchain node and send it to the pass message queue to obtain the corresponding business data and write it into the pass queue;

[0013] Detect whether the pass message queue has acquired the business data at the target second blockchain node;

[0014] If so, then select the next target second blockchain node based on the real-time working status, until all the data types of the business to be acquired are obtained, and the target message queue is obtained.

[0015] Further, the step of determining the corresponding multiple second blockchain nodes in the blockchain based on the data type of the business to be acquired includes:

[0016] The dimension information of each piece of data to be acquired is determined by the data type of the business data to be acquired, and the node information of each blockchain node is acquired.

[0017] Each dimension and each node information is vectorized to obtain the dimension vector X corresponding to each dimension. i =(x 1i x 2i x 3i …x ni ), and the node vector Y corresponding to each of the node information. j =(y 1j y 2j y 3j …y nj ); where X i Let Y represent the dimension vector corresponding to the i-th dimension information. j Let n represent the node vector corresponding to the j-th blockchain node, and n represent the number of dimensions of the dimension vector and the node vector.

[0018] According to the formula:

[0019] The relevant values ​​are calculated; where sim ij This represents the correlation value between the i-th dimension information and the j-th blockchain node;

[0020] Determine whether each of the aforementioned relevant values ​​is greater than a preset relevant threshold;

[0021] The blockchain nodes that exceed the relevant threshold are identified as the second blockchain nodes.

[0022] Further, after the step of extracting business data from the target message queue and encrypting it using the encryption / decryption algorithm to obtain the pass, the method further includes:

[0023] Parse the target message queue to obtain the corresponding first business data;

[0024] The access pass is decoded according to the access codebook to obtain the second business data;

[0025] Determine whether the first business data and the second business data are consistent;

[0026] If they match, the pass will be sent to the user.

[0027] Further, after the step of extracting business data from the target message queue and encrypting it using the encryption / decryption algorithm to obtain the pass, the method further includes:

[0028] Get the update information to be updated;

[0029] The pass is decrypted using the passbook to obtain the corresponding first business data;

[0030] The first service data is updated using the update information to obtain the updated third service data;

[0031] The third business data is encrypted using the encryption / decryption algorithm to obtain the updated pass.

[0032] Furthermore, the step of extracting business data from the target message queue and encrypting it using the encryption / decryption algorithm to obtain the pass also includes:

[0033] Assign the user a token number and import it into a preset token list;

[0034] Extract business data from the target message queue;

[0035] The token number and the business data are encrypted using the encryption / decryption algorithm to obtain the pass.

[0036] Furthermore, before the step of receiving the user-uploaded pass acquisition instruction through the first blockchain node, the method further includes:

[0037] A blockchain class is created using the Go language, and the genesis block is obtained after instantiating the blockchain class. In the genesis block, the hash value of the previously generated block is set to 0.

[0038] Based on the genesis block, a blockchain block is generated using a preset block generation technology, wherein the blockchain block records the hash value of the previously generated block;

[0039] The blockchain is constructed by using each node that records the business data as a blockchain node.

[0040] This invention provides a blockchain-based pass generation device, comprising:

[0041] The receiving module is used to receive a pass acquisition instruction uploaded by a user through a first blockchain node; wherein the pass acquisition instruction contains at least the type of business data to be acquired;

[0042] A module is established to create a password book for the user based on the password acquisition instruction; the password book includes the data type of the business to be acquired and the corresponding encryption / decryption algorithm;

[0043] The determination module is used to determine multiple corresponding second blockchain nodes in the blockchain based on the business data type to be acquired, and to establish a pass message queue for acquiring business data in each second blockchain node based on each second blockchain node and the business data type to be acquired.

[0044] The acquisition module is used to sequentially acquire the business data corresponding to the pass acquisition instruction at each of the second blockchain nodes in real time through the pass message queue, and write the acquired business data into the pass message queue to obtain the target message queue;

[0045] The extraction module is used to extract the business data from the target message queue and encrypt it using the encryption / decryption algorithm to obtain the pass.

[0046] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of any of the methods described above.

[0047] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of any of the methods described above.

[0048] The beneficial effects of this invention are as follows: By acquiring user business data in real time through blockchain and encrypting the business data, the generated pass contains customer information and is equipped with corresponding encryption and decryption algorithms for the user. The corresponding data to be acquired is obtained in real time from the second blockchain node, rather than being simply generated based on user information. This results in better security performance for the generated pass. In addition, since the pass contains the user's real-time business data, when it is necessary to verify the user's business process, it is not necessary to verify the user's data obtained from various servers. The user's real-time business data can be obtained directly based on the pass, thereby speeding up the user verification process. Attached Figure Description

[0049] Figure 1 This is a flowchart illustrating a blockchain-based pass generation method according to an embodiment of the present invention.

[0050] Figure 2 This is a schematic block diagram of a blockchain-based pass generation device according to an embodiment of the present invention;

[0051] Figure 3 This is a schematic block diagram of the structure of a computer device according to an embodiment of this application.

[0052] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0053] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0054] It should be noted that all directional indicators (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicator will also change accordingly. The connection can be a direct connection or an indirect connection.

[0055] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three kinds of relationships. For example, A and B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.

[0056] Furthermore, in this invention, descriptions involving "first," "second," etc., are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature. Additionally, the technical solutions of the various embodiments can be combined with each other, but only on the basis of being achievable by those skilled in the art. When the combination of technical solutions is contradictory or impossible to implement, such a combination of technical solutions should be considered non-existent and not within the scope of protection claimed by this invention.

[0057] Reference Figure 1 This invention proposes a blockchain-based method for generating access tokens, comprising:

[0058] S1: Receive the user's uploaded pass acquisition instruction through the first blockchain node; wherein, the pass acquisition instruction contains at least the data type of the business to be acquired;

[0059] S2: Based on the access card acquisition instruction, establish an access password book for the user; the access password book includes the data type of the business to be acquired and the corresponding encryption / decryption algorithm;

[0060] S3: Determine multiple second blockchain nodes in the blockchain based on the data type of the business to be acquired, and establish a pass message queue for acquiring business data in each second blockchain node according to each second blockchain node and the data type of the business to be acquired.

[0061] S4: The business data corresponding to the pass acquisition instruction is obtained in real time at each of the second blockchain nodes through the pass message queue, and the obtained business data is written into the pass message queue to obtain the target message queue;

[0062] S5: Extract the business data from the target message queue and encrypt it using the encryption / decryption algorithm to obtain the pass.

[0063] As described in step S1 above, the user-uploaded pass acquisition instruction is received through the first blockchain node. This pass acquisition instruction is uploaded by the user and can be triggered by clicking a link in the app or performing related operations, thus enabling the upload of the pass acquisition instruction. The first blockchain node can be a node corresponding to the user, such as the node corresponding to the user's account, implemented through an app installed on the user's terminal, or it can be a virtual node connected to the user's terminal to receive the user-uploaded pass acquisition instruction.

[0064] As described in step S2 above, a password book is created for the user based on the password acquisition instruction. Upon receiving the password acquisition instruction, a corresponding password book can be created for the user. This password book contains the key corresponding to the record key number set for the user, the encryption / decryption algorithm corresponding to the decryption algorithm number, the TOKEN number, and the user's business information, such as user ID and business ID. This allows the subsequently obtained password to contain multiple pieces of user information, eliminating the need to retrieve corresponding data from various servers during user verification; the data can be obtained directly from the password. Furthermore, the encryption / decryption algorithms in the password book are randomly selected from various encryption / decryption algorithms, thereby improving the security of password generation.

[0065] As described in step S3 above, multiple second blockchain nodes in the blockchain are determined based on the data type of the business to be acquired, and a pass message queue is established for acquiring business data from each of the second blockchain nodes. Here, a second blockchain node is a node that stores the data to be acquired. Based on the data type of the business to be acquired, it can be determined which blockchain nodes in the blockchain store the corresponding data, thereby identifying the second blockchain nodes and establishing a pass message queue to send messages to each of the second blockchain nodes to acquire the data.

[0066] As described in step S4 above, the business data corresponding to the pass acquisition instruction is sequentially acquired from each of the second blockchain nodes in real time through the pass message queue, and the acquired business data is written into the pass message queue to obtain the target message queue. The message queue is a container for storing messages during transmission. It can store the corresponding data to be acquired and can be transmitted between the second blockchain nodes. It should be understood that the message queue can only forward the data to be acquired to another second blockchain node after acquiring the data to be acquired from one of the second blockchain nodes, thereby realizing the acquisition of each piece of data to be acquired. After the message queue is sent to the corresponding second blockchain node, each second blockchain node can either manually fill in the data to be acquired or automatically acquire it from the corresponding second blockchain node using web crawling technology based on the data type of the business data to be acquired.

[0067] As described in step S5 above, business data is extracted from the target message queue and encrypted using the encryption / decryption algorithm to obtain the pass. The encryption / decryption algorithm can be any algorithm, such as a one-way hash encryption algorithm, a symmetric encryption algorithm, or an asymmetric encryption algorithm. This application does not impose any limitations. For example, assuming the key is abcdef, the key number is 10, the encryption / decryption key algorithm is RSA encryption (an asymmetric encryption algorithm), the encryption / decryption algorithm number is 20, the token is abc123, the token number is 30, the caller verification code is xabc, the customer number is 18688771132, and the business ID is queryMoney, the authentication code is generated as follows: Base64(rsa(18688771132+queryMoney+abc123+xabc)) with the encryption key abcdef. Then, the pass is generated by combining the encryption key ID, encryption / decryption algorithm ID, caller verification code, customer number, business ID, and the generated authentication code. This results in the generated pass containing customer information and a corresponding encryption / decryption algorithm set for the user. The corresponding data to be retrieved is obtained in real time from the second blockchain node, rather than being simply generated based on user information. This makes the generated pass more secure. In addition, since the pass contains the user's real-time information, when it is necessary to verify the user's business process, it is not necessary to verify the data obtained from various servers. The user's real-time business data can be obtained directly based on the pass, thereby speeding up the user verification process.

[0068] In one embodiment, step S4, which involves sequentially acquiring the business data corresponding to the pass acquisition instruction at each of the second blockchain nodes in real time through the pass message queue, and writing the acquired business data into the pass message queue to obtain the target message queue, includes:

[0069] S401: Obtain the real-time working status of each second blockchain node;

[0070] S402: Select the target second blockchain node with the best real-time working status among each second blockchain node and send it to the pass message queue to obtain the corresponding business data and write it into the pass queue;

[0071] S403: Detect whether the pass message queue has obtained the business data at the target second blockchain node;

[0072] S404: If so, then select the next target second blockchain node based on the real-time working status, until all the data types of the business to be acquired are obtained, and the target message queue is obtained.

[0073] As described in steps S401-S404 above, the target message queue is obtained. Since each second blockchain node corresponds to different businesses, their workload will vary. Some busier second blockchain nodes may need to handle other urgent tasks, resulting in longer response times for the data to be retrieved. Conversely, some less busy second blockchain nodes can quickly respond with the data. Therefore, to efficiently and quickly retrieve the data, the real-time working status of each second blockchain node can be detected. This can be done by detecting the ratio of the computing power currently being processed to the remaining computing power of each server. In other words, it only requires detecting the total amount of computing power that the server can process and the amount currently being processed. Then, the pass message queue is sent to the optimal target second blockchain node to retrieve the corresponding business data. After retrieving the corresponding business data, the working status can be determined again, and the next target second blockchain node can be selected, until all the types of business data to be retrieved are obtained, thus obtaining the target message queue.

[0074] In one embodiment, step S3, which determines the corresponding plurality of second blockchain nodes in the blockchain based on the data type of the business to be acquired, includes:

[0075] S301: Determine the dimension information of each piece of data to be acquired based on the data type of the business data to be acquired, and acquire the node information of each blockchain node;

[0076] S302: Vectorize each of the said dimension information and each of the said node information to obtain the dimension vector X corresponding to each of the said dimension information. i =(x 1i x 2i x 3i …x ni ), and the node vector Y corresponding to each of the node information. j =(y 1j y 2j y 3j …y nj ); where X i Let Y represent the dimension vector corresponding to the i-th dimension information. j Let n represent the node vector corresponding to the j-th blockchain node, and n represent the number of dimensions of the dimension vector and the node vector.

[0077] S303: According to the formula:

[0078] The relevant values ​​are calculated; where sim ij This represents the correlation value between the i-th dimension information and the j-th blockchain node;

[0079] S304: Determine whether each of the aforementioned relevant values ​​is greater than a preset relevant threshold;

[0080] S305: The blockchain node that is greater than the relevant threshold is identified as the second blockchain node.

[0081] As described in steps S301-S305 above, the calculation of relevant values ​​is implemented. Specifically, the open-source and free Python LibShortText text classifier can be used, and a Chinese word segmenter can be customized to segment the text in each of the aforementioned dimensional information and each of the aforementioned node information. Word segmentation can be calculated using any of the following algorithms: decision tree, multilayer perceptron, Naive Bayes (including Bernoulli Bayes, Gaussian Bayes, and multinomial Bayes), random forest, AdaBoost, feedforward neural network, and LSTM. The segmented dimensional information and each of the aforementioned node information are vectorized to obtain the multidimensional coordinates of the target vector for subsequent calculations. Vectorization can be performed using the Google word2vec tool.

[0082] According to the formula:

[0083] The calculated relevance value can be used to set a relevance threshold. When the relevance value is greater than the relevance threshold, the dimension information and the node information can be considered similar. When the relevance value is less than or equal to the relevance threshold, the dimension information and the node information can be considered dissimilar.

[0084] In one embodiment, after step S5 of extracting business data from the target message queue and encrypting it using the encryption / decryption algorithm to obtain the pass, the method further includes:

[0085] S601: Parse the target message queue to obtain the corresponding first business data;

[0086] S602: Decode the pass according to the pass codebook to obtain the second service data;

[0087] S603: Determine whether the first service data and the second service data are consistent;

[0088] S604: If they match, the pass is sent to the user.

[0089] As described in steps S601-S604 above, the verification of the pass is implemented. Specifically, by parsing the target message queue, the first business data (the business data recorded in the target message queue) can be directly obtained. Then, the pass is decoded using the pass password book to obtain the second business data. These are compared; if they match, it means the pass can be decoded normally and can be sent to the user. If they do not match, it means the pass cannot be decoded normally, and the encryption / decryption algorithm needs to be reset, or the data needs to be re-acquired.

[0090] In one embodiment, after step S6 of extracting business data from the target message queue and encrypting it using the encryption / decryption algorithm to obtain the pass, the method further includes:

[0091] S611: Retrieve update information to be updated;

[0092] S612: Decrypt the pass using the passbook to obtain the corresponding first business data;

[0093] S613: Update the first service data using the update information to obtain the updated third service data;

[0094] S614: Encrypt the third business data using the encryption / decryption algorithm to obtain the updated pass.

[0095] As described in steps S611-S614 above, the pass is updated. When a user completes a new transaction or changes a transaction, the corresponding transaction data will also change accordingly. Therefore, it is necessary to update the data in the pass so that relevant personnel can verify the data in the pass. Since the content in the pass changes in real time, it is difficult to crack, which can improve security. Specifically, the update information to be updated is obtained. This update information is the update information uploaded by the second blockchain node. For example, if a transaction change occurs at the second blockchain node, the second blockchain node uploads the changed information (i.e., the update information) to the blockchain. Then, the first transaction data is updated using the update information. The update method can include deletion, addition, or replacement. After encryption, the updated pass is obtained, which can carry real-time transaction data to facilitate subsequent review and verification by relevant personnel.

[0096] In one embodiment, step S5, which involves extracting business data from the target message queue and encrypting it using the encryption / decryption algorithm to obtain the pass, further includes:

[0097] S501: Assign the user a TOKEN number and import it into the preset TOKEN list;

[0098] S502: Extract the business data from the target message queue;

[0099] S503: Encrypt the TOKEN number and the business data using the encryption / decryption algorithm to obtain the pass.

[0100] As described in steps S501-S503 above, users are assigned a unique identifier, giving the resulting pass a unique identifier for easy identification of user information. Specifically, a token number is assigned to each user. The token number is a string generated on the server side and is unique; each token number is unique within the system. Therefore, a token list can be established, creating a correspondence between token numbers and users. This allows the user to be identified by referring to the token list after the pass is decoded. Thus, the pass can contain user information, enabling the retrieval of real-time business data and user information for various user services, further accelerating the user verification process.

[0101] In one embodiment, before step S1 of receiving the user-uploaded pass acquisition instruction through the first blockchain node, the method further includes:

[0102] S001: Create a blockchain class using the Go language, and instantiate the blockchain class to obtain the genesis block. In the genesis block, set the hash value of the previously generated block to 0.

[0103] S002: Based on the genesis block, a blockchain block is generated using a preset block generation technology, wherein the blockchain block records the hash value of the previously generated block;

[0104] S003: Use each node that records the business data as a blockchain node to build the blockchain.

[0105] As described in steps S001-S003 above, the blockchain is built. The language used to create the blockchain class can be any feasible language, such as JAVA, C++, Go, etc. This implementation prefers Go to optimize the blockchain class. The blockchain class defines the blockchain; instantiating the blockchain class determines the specific parameters of the blockchain. These specific parameters are the parameters that developers need to use to build the blockchain type, thereby obtaining the first block (genesis block), which serves as the basis for generating blockchain blocks. Since the genesis block is the first block, there are actually no previous blocks; therefore, the hash value of the previous block can be set to 0 in the genesis block. The preset consensus mechanism can be any consensus mechanism, such as proof-of-work, proof-of-stake, Byzantine fault tolerance, etc. The preset block generation technology used includes, for example, setting a block header and block body; the block header contains the hash value of the previous block, the hash value of the current block body, and a timestamp; the block body stores pre-prepared data, thus the block header and the block body constitute a block.

[0106] Reference Figure 2 The present invention also provides a blockchain-based pass generation device, comprising:

[0107] The receiving module 10 is used to receive a pass acquisition instruction uploaded by a user through a first blockchain node; wherein the pass acquisition instruction contains at least the type of business data to be acquired;

[0108] Module 20 is used to establish a password book for the user based on the password acquisition instruction; the password book includes the data type of the business data to be acquired and the corresponding encryption and decryption algorithm.

[0109] The determination module 30 is used to determine multiple corresponding second blockchain nodes in the blockchain based on the business data type to be acquired, and to establish a pass message queue for acquiring business data in each second blockchain node based on each second blockchain node and the business data type to be acquired.

[0110] The acquisition module 40 is used to sequentially acquire the business data corresponding to the pass acquisition instruction at each of the second blockchain nodes in real time through the pass message queue, and write the acquired business data into the pass message queue to obtain the target message queue;

[0111] Extraction module 50 is used to extract the business data from the target message queue and encrypt it using the encryption / decryption algorithm to obtain the pass.

[0112] The beneficial effects of this invention are as follows: By acquiring user business data in real time through blockchain and encrypting the business data, the generated pass contains customer information and is equipped with corresponding encryption and decryption algorithms for the user. The corresponding data to be acquired is obtained in real time from the second blockchain node, rather than being simply generated based on user information. This results in better security performance for the generated pass. In addition, since the pass contains real-time user information, when it is necessary to verify the user's business process, it is not necessary to verify the user's data obtained from various servers. The real-time business data of the user's various businesses can be obtained directly based on the pass, thereby speeding up the user verification process.

[0113] Reference Figure 3 This application also provides a computer device, which may be a server, and its internal structure may be as follows: Figure 3 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores various business data. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program can implement the blockchain-based token generation method described in any of the above embodiments.

[0114] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer equipment on which the present application is applied.

[0115] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, can implement the blockchain-based pass generation method described in any of the above embodiments.

[0116] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media provided in this application and in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be obtained in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual-speed SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0117] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.

[0118] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.

[0119] Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.

[0120] Blockchain is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and cryptographic algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include an underlying platform, a platform product service layer, and an application service layer.

[0121] The underlying blockchain platform can include processing modules such as user management, basic services, smart contracts, and operational monitoring. The user management module is responsible for managing the identity information of all blockchain participants, including maintaining public and private key generation (account management), key management, and maintaining the correspondence between user real identities and blockchain addresses (access management). Furthermore, under authorization, it monitors and audits transactions of certain real identities and provides risk control rule configuration (risk control audit). The basic services module is deployed on all blockchain node devices to verify the validity of business requests. After consensus is reached on valid requests, they are recorded in storage. For a new business request, the basic services first perform interface adaptation parsing and authentication (interface adaptation), and then encrypt the business information through a consensus algorithm (consensus management). After encryption, the data is transmitted completely and consistently to the shared ledger (network communication) and recorded and stored. The smart contract module is responsible for contract registration, issuance, triggering, and execution. Developers can define contract logic using a programming language and publish it to the blockchain (contract registration). According to the contract terms, the key or other events are invoked to trigger execution and complete the contract logic. It also provides functions for contract upgrades and cancellations. The operation monitoring module is mainly responsible for deployment, configuration modification, contract settings, cloud adaptation, and real-time status visualization output during product release, such as alarms, monitoring network conditions, and monitoring the health status of node devices.

[0122] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of the claims of the present invention.

Claims

1. A method for generating a pass based on blockchain, characterized in that, include: The first blockchain node receives a user-uploaded pass acquisition instruction; wherein the pass acquisition instruction contains at least the type of business data to be acquired. A password book is created for the user based on the access card acquisition instruction; the password book includes the data type of the business to be acquired and the corresponding encryption / decryption algorithm; The corresponding multiple second blockchain nodes in the blockchain are determined by the business data type to be acquired, and a pass message queue for acquiring business data in each second blockchain node is established based on each second blockchain node and the business data type to be acquired. The business data corresponding to the pass acquisition instruction is obtained in real time at each of the second blockchain nodes through the pass message queue, and the obtained business data is written into the pass message queue to obtain the target message queue. Extract the business data from the target message queue and encrypt it using the encryption / decryption algorithm to obtain the pass; The step of determining the corresponding multiple second blockchain nodes in the blockchain based on the data type of the business to be acquired includes: The dimension information of each piece of data to be acquired is determined by the data type of the business data to be acquired, and the node information of each blockchain node is acquired. Each dimension and each node information is vectorized to obtain the dimension vector X corresponding to each dimension. i = (x 1i x 2i x 3i …x ni ), and the node vector Y corresponding to each of the node information. j =(y 1j y 2j y 3j …y nj ); where X i Y represents the dimension vector corresponding to the i-th dimension information. j Let n represent the node vector corresponding to the j-th blockchain node, and n represent the number of dimensions of the dimension vector and the node vector. According to the formula: The relevant values ​​were calculated; among them, This represents the correlation value between the i-th dimension information and the j-th blockchain node; Determine whether each of the aforementioned relevant values ​​is greater than a preset relevant threshold; The blockchain nodes that exceed the relevant threshold are identified as the second blockchain nodes.

2. The blockchain-based pass generation method as described in claim 1, characterized in that, The step of sequentially acquiring the business data corresponding to the pass acquisition instruction at each of the second blockchain nodes in real time through the pass message queue, and writing the acquired business data into the pass message queue to obtain the target message queue includes: Real-time acquisition of the working status of each second blockchain node; Select the target second blockchain node with the best real-time working status among each second blockchain node and send it to the pass message queue to obtain the corresponding business data and write it into the pass queue. Detect whether the pass message queue has acquired the business data at the target second blockchain node; If so, then select the next target second blockchain node based on the real-time working status, until all the data types of the business to be acquired are obtained, and the target message queue is obtained.

3. The blockchain-based pass generation method as described in claim 1, characterized in that, After the step of extracting business data from the target message queue and encrypting it using the encryption / decryption algorithm to obtain the pass, the method further includes: Parse the target message queue to obtain the corresponding first business data; The access pass is decoded according to the access codebook to obtain the second business data; Determine whether the first business data and the second business data are consistent; If they match, the pass will be sent to the user.

4. The blockchain-based pass generation method as described in claim 1, characterized in that, After the step of extracting business data from the target message queue and encrypting it using the encryption / decryption algorithm to obtain the pass, the method further includes: Get the update information to be updated; The pass is decrypted using the passbook to obtain the corresponding first business data; The first service data is updated using the update information to obtain the updated third service data; The third business data is encrypted using the encryption / decryption algorithm to obtain the updated pass.

5. The blockchain-based pass generation method as described in claim 1, characterized in that, The step of extracting business data from the target message queue and encrypting it using the encryption / decryption algorithm to obtain the pass further includes: Assign the user a token number and import it into a preset token list; Extract business data from the target message queue; The token number and the business data are encrypted using the encryption / decryption algorithm to obtain the pass.

6. The blockchain-based pass generation method as described in claim 1, characterized in that, Before the step of receiving the user-uploaded pass acquisition instruction through the first blockchain node, the method further includes: A blockchain class is created using the Go language, and the genesis block is obtained after instantiating the blockchain class. In the genesis block, the hash value of the previously generated block is set to 0. Based on the genesis block, a blockchain block is generated using a preset block generation technology, wherein the blockchain block records the hash value of the previously generated block; The blockchain is constructed by using each node that records the business data as a blockchain node.

7. A blockchain-based pass generation device, characterized in that, include: The receiving module is used to receive a pass acquisition instruction uploaded by a user through a first blockchain node; wherein the pass acquisition instruction contains at least the type of business data to be acquired; A module is established to create a password book for the user based on the password acquisition instruction; the password book includes the data type of the business to be acquired and the corresponding encryption / decryption algorithm; The determination module is used to determine multiple corresponding second blockchain nodes in the blockchain based on the business data type to be acquired, and to establish a pass message queue for acquiring business data in each second blockchain node based on each second blockchain node and the business data type to be acquired. The acquisition module is used to sequentially acquire the business data corresponding to the pass acquisition instruction at each of the second blockchain nodes in real time through the pass message queue, and write the acquired business data into the pass message queue to obtain the target message queue; The extraction module is used to extract the business data from the target message queue and encrypt it using the encryption / decryption algorithm to obtain the pass. The step of determining the corresponding multiple second blockchain nodes in the blockchain based on the data type of the business to be acquired includes: The dimension information of each piece of data to be acquired is determined by the data type of the business data to be acquired, and the node information of each blockchain node is acquired. Each dimension and each node information is vectorized to obtain the dimension vector X corresponding to each dimension. i = (x 1i x 2i x 3i …x ni ), and the node vector Y corresponding to each of the node information. j =(y 1j y 2j y 3j …y nj ); where X i Y represents the dimension vector corresponding to the i-th dimension information. j Let n represent the node vector corresponding to the j-th blockchain node, and n represent the number of dimensions of the dimension vector and the node vector. According to the formula: The relevant values ​​were calculated; among them, This represents the correlation value between the i-th dimension information and the j-th blockchain node; Determine whether each of the aforementioned relevant values ​​is greater than a preset relevant threshold; The blockchain nodes that exceed the relevant threshold are identified as the second blockchain nodes.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.