CN109753269B - Random number generation method, device, equipment and storage medium for block chain - Google Patents

Random number generation method, device, equipment and storage medium for block chain Download PDF

Info

Publication number
CN109753269B
CN109753269B CN201910093971.8A CN201910093971A CN109753269B CN 109753269 B CN109753269 B CN 109753269B CN 201910093971 A CN201910093971 A CN 201910093971A CN 109753269 B CN109753269 B CN 109753269B
Authority
CN
China
Prior art keywords
transaction request
service
block
seed
random number
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910093971.8A
Other languages
Chinese (zh)
Other versions
CN109753269A (en
Inventor
荆博
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Baidu Online Network Technology Beijing Co Ltd
Original Assignee
Baidu Online Network Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Baidu Online Network Technology Beijing Co Ltd filed Critical Baidu Online Network Technology Beijing Co Ltd
Priority to CN201910093971.8A priority Critical patent/CN109753269B/en
Publication of CN109753269A publication Critical patent/CN109753269A/en
Application granted granted Critical
Publication of CN109753269B publication Critical patent/CN109753269B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The embodiment of the invention discloses a random number generation method, a random number generation device, a random number generation equipment and a storage medium for a block chain. When performed by a block link point, the method may comprise: acquiring a service transaction request, and processing the service transaction request to add service transaction data into an initiating block; if the service transaction request needs to use a random number, receiving a seed transaction request associated with the service transaction request in a generation period of a result block; wherein the result block is a subsequent block of the initiation block, and the seed transaction request is provided by a service participant of the service transaction request; generating a random number based on a set random algorithm according to the seed character string in the seed transaction request; and generating a service processing result according to the random number and the service transaction request, and adding the service processing result into the result block. The technical scheme of the embodiment of the invention improves the public confidence of generating the block chain random number and improves the safety of the random number.

Description

Random number generation method, device, equipment and storage medium for block chain
Technical Field
The embodiment of the invention relates to a computer data storage technology, in particular to a random number generation method, a random number generation device, a random number generation equipment and a storage medium for a block chain.
Background
In the transaction requests processed by the block chain network, a part of the transaction requests need to generate random numbers in the processing process, and the transaction requests are processed based on the generated random numbers.
In the prior art, when a block generation node needs to generate a random number, the block generation node may request a centralized service mechanism dedicated to generating the random number to obtain a random number, so as to complete the transaction processing by using the random number.
Because the random number of the traditional block chain network is generated by a centralized service mechanism, the public trust is poor, and security holes exist, so that various insecure problems exist in the generated random number.
Disclosure of Invention
The embodiment of the invention provides a block chain random number generation method, a block chain random number generation device, block chain random number generation equipment and a storage medium, so that the public trust of block chain random number generation is improved, and the safety of random numbers is improved.
In a first aspect, an embodiment of the present invention provides a random number generation method for a block chain, where the random number generation method is performed by a block chain node, and the method includes:
acquiring a service transaction request, and processing the service transaction request to add service transaction data into an initiating block;
if the service transaction request needs to use a random number, receiving a seed transaction request associated with the service transaction request in a generation period of a result block; wherein the result block is a subsequent block of the initiation block, and the seed transaction request is provided by a service participant of the service transaction request;
generating a random number based on a set random algorithm according to the seed character string in the seed transaction request;
and generating a service processing result according to the random number and the service transaction request, and adding the service processing result into the result block.
In a second aspect, an embodiment of the present invention further provides a method for generating a random number of a block chain, where the method is performed by a service participant, and the method includes:
sending a service transaction request to a blockchain network to request processing of the service transaction request, and adding service transaction data to an initiating block;
sending a seed transaction request associated with the service transaction request to a block chain network to request that a random number is generated according to a seed character string in the seed transaction request in a generation period of a result block, and a service processing result is generated according to the random number and the service transaction request and is added to the result block; wherein the result block is a subsequent block to the originating block.
In a third aspect, an embodiment of the present invention further provides a random number generation apparatus for a block chain, where the apparatus is configured in a block chain node, and the apparatus includes:
the service request acquisition module is used for acquiring the service transaction request and processing the service transaction request so as to add the service transaction data into the initiation block;
a seed request receiving module, configured to receive a seed transaction request associated with the service transaction request in a generation cycle of a result block if the service transaction request needs to use a random number; wherein the result block is a subsequent block of the initiation block, and the seed transaction request is provided by a service participant of the service transaction request;
the random number generation module is used for generating a random number based on a set random algorithm according to the seed character string in the seed transaction request;
and the result processing adding module is used for generating a service processing result according to the random number and the service transaction request and adding the service processing result into the result block.
In a fourth aspect, an embodiment of the present invention further provides a random number generating apparatus for a block chain, where the apparatus is configured at a service participant, and the apparatus includes:
a service request sending module, configured to send a service transaction request to a blockchain network to request processing of the service transaction request, and add service transaction data to an initiation block;
a seed request sending module, configured to send a seed transaction request associated with the service transaction request to a block chain network, so as to request that, in a generation cycle of a result block, a random number is generated according to a seed character string in the seed transaction request, and a service processing result is generated according to the random number and the service transaction request and is added to the result block; wherein the result block is a subsequent block to the originating block.
In a fifth aspect, an embodiment of the present invention further provides an apparatus, where the apparatus includes:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement a method for random number generation for a blockchain as in any embodiment of the present invention.
In a sixth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for generating random numbers for a block chain according to any embodiment of the present invention.
According to the technical scheme of the embodiment of the invention, when the service transaction request needing to use the random number is processed, the block chain node generates the random number through the seed character string in the seed transaction request sent by the service participant node of the service transaction request, and further completes the processing operation of the subsequent service transaction request. The problem that the random number generated by a centralized service organization is unsafe is solved, the public confidence of generating the block chain random number is improved, and the safety of the random number is improved.
Drawings
Fig. 1 is a flowchart of a method for generating random numbers for a block chain according to an embodiment of the present invention;
fig. 2 is a flowchart of a block chain random number generation method according to a second embodiment of the present invention;
fig. 3 is a flowchart of a method for generating random numbers for a block chain according to a third embodiment of the present invention;
fig. 4 is a flowchart of a block chain random number generation method according to a fourth embodiment of the present invention;
fig. 5 is a signaling diagram of a random number generation method for a block chain according to a fifth embodiment of the present invention;
fig. 6 is a block diagram of a block chain random number generating apparatus according to a sixth embodiment of the present invention;
fig. 7 is a block diagram of a random number generating apparatus for a block chain according to a seventh embodiment of the present invention;
fig. 8 is a schematic structural diagram of an apparatus according to an eighth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a random number generation method for a blockchain according to an embodiment of the present invention, which is applicable to a situation where a blockchain node processes a service transaction request that requires a random number, where a blockchain node may be a blockchain generation node in a blockchain network; or may be other nodes in the blockchain network, such as any node that currently has no block generation authority.
The method may be performed by a random number generation apparatus or device configured in a blockchain node, where the apparatus may be implemented in a hardware and/or software manner, and may be integrated in an electronic device bearing the blockchain node, and the method specifically includes the following steps:
s101, acquiring a service transaction request, and processing the service transaction request to add service transaction data into an initiating block.
The service transaction request is a transaction request which can complete a processing process only by means of a random number, and specifically may relate to a service with any function. The business transaction request may include an initiating transaction request and may further include a responding transaction request. The service initiation request may be a transaction request generated by a service initiator based on a service intelligence contract and initiation data, the service intelligence contract may be a set of programs for implementing the service, and an interactive interface may be provided in the service intelligence contract for a user to provide different contents of the initiation data and the response data, thereby generating each specific transaction request. For example, if the request to initiate a transaction is a guess initiating transaction request, the request may be a guess initiating transaction request generated by the guess initiator based on the guess intelligent contract and the relevant data (e.g., the subject of the guess, the standard answers, the guess options, the guess deadline, the guess initiator information, the guess awards, etc.) making the guess. Accordingly, the responsive transaction request can be a transaction request generated by the business responder based on the business intelligence contract, the transaction request to be responded to (e.g., the initiating transaction request), and the response data. For example, if the response transaction request is a guess response transaction request, the request may be that the guess responder generates a guess response transaction request based on the guess intelligent contract, the guess initiation transaction request sent by the guess initiator, and the response data (such as guess answers, guess response time, and guess responder information). Optionally, the service intelligent contract may also form different intelligent contracts for initiating and responding respectively, and respectively include rules how to generate a request for initiating a transaction and rules how to generate a request for responding to a transaction.
The service transaction data refers to data which needs to be added to the block for storage after processing the service transaction request, and generally includes the service transaction request itself and part of generated data. The initiation block may refer to a block storing business transaction data, and the initiation block may be one block or may be a plurality of blocks which are continuous or discontinuous.
For example, after acquiring the service transaction request, the block link node processes the service transaction request, and optionally, the processing may be processing included before generating the random number. The service transaction requests are processed to obtain service transaction data, and the service transaction data are added to the initiation blocks, optionally, the obtained service transaction data are added to one or more initiation blocks, and since there may be a plurality of service transaction requests related to one service, and the service transaction requests are initiated by different participants at different times, the service transaction data may be stored in a plurality of different initiation blocks.
Optionally, in the embodiment of the present invention, after the block link node adds the service transaction data to the initiation block, the initiation block added with the service transaction data may also be sent to the block link network. Such that other nodes in the blockchain network synchronize, verify, or otherwise operate on the data in the originating block.
S102, if the service transaction request needs to use the random number, in the generation period of the result block, receiving a seed transaction request associated with the service transaction request.
The result block is a subsequent block of the initiating block, if the initiating block has a plurality of blocks, the result block is a subsequent block of the last initiating block, and the subsequent block is a different block from the initiating block, wherein the stored data is a final service processing result of the service transaction request and influenced by the random number. The result block may be one block or a plurality of blocks. The generation period of the result block may refer to a corresponding time period when the service transaction request needs to be processed according to the random number after the service transaction data is added to the initiation block, and the current service processing result is obtained. Optionally, the generation period of the result block may be that the initiator records the height or time of the result block (for example, the 3 rd day after initiating the request, or the 100 th block after initiating the request, etc.) in the service transaction request before initiating the service transaction request; or during the process of processing the service transaction request by the block node, the result block generation period of the initiating transaction request is determined according to the specification of the intelligent contract, for example, if a response transaction request associated with the initiating transaction request is not received within a preset time period (e.g., 1 hour), the result block generation period of the initiating transaction request is determined to be reached.
The seed transaction request is provided by a service participant of the service transaction request. The service participants of the service transaction request may include: the initiator generating the transaction request and/or at least one responder generating the response transaction request in the business transaction request. The seed transaction request provided by the service participant of the service transaction request is generated according to the seed character string. Optionally, in order to prevent the service participant from maliciously changing the seed character string for the benefit of the service participant according to the service development process, so as to directly interfere with the generation result of the random number, the method may be to require the service participant to generate a seed transaction request in advance before acquiring the transaction data in the service development process. For example, when the service participant is an initiator that generates a transaction request, the initiator may generate a seed transaction request before generating the transaction request, perform localized storage, add a transaction identifier of the seed transaction request to the generated transaction request, and then send the transaction identifier to the blockchain network. Therefore, the problem that the seed character string in the seed transaction request is maliciously changed by the service participant according to the development process of the service is well solved.
Optionally, if a random number is required to be used in the process of processing the service transaction request, in the generation cycle of the result block, a seed transaction request associated with the service transaction request is received, specifically, in this embodiment, the seed transaction request associated with the service transaction request at least includes the following: 1) a seed transaction request which is sent by an initiator in the service participants and is associated with the initiated transaction request; 2) and the responder in the service participants sends a seed transaction request associated with the response transaction request.
Optionally, there are many methods for determining whether the received seed transaction request is associated with the service transaction request, which is not limited in this embodiment. For example, the transaction identifier corresponding to the seed transaction request may be determined through the received seed transaction request, and then compared with the transaction identifier in the service transaction request, and if the transaction identifier is consistent with the transaction identifier in the service transaction request, it indicates that the seed transaction request received in this step is associated with the service transaction request acquired in S101; and when the service participant sends the seed transaction request, the service participant also sends the transaction identifier of the service transaction request corresponding to the seed transaction request, and at this time, the block link node may determine whether the transaction identifier received in this step is consistent with the transaction identifier of the service transaction request received in S101, and if so, it indicates that the seed transaction request received in this step is related to the service transaction request.
Optionally, after determining that the service transaction request needs to use a random number, the method further includes: and informing the service participants of the service transaction request to provide the seed transaction request. Specifically, the block link node may generate a seed acquisition transaction request corresponding to the service transaction request and send the seed acquisition transaction request to the block link network, and after receiving the seed acquisition transaction request, the service participant node sends a seed transaction request, which is generated in advance and associated with the service transaction request, to the block link network, so that the block link node in the time zone can receive the seed transaction request, which is provided by the service participant and associated with the service transaction request, in the generation period of the result block.
It should be noted that the triggering condition for the service participant node to send the seed transaction request to the blockchain network is not limited to that the seed transaction request is triggered to be provided after the seed acquisition transaction request sent by the blockchain node is received, or the seed transaction request is automatically triggered to be provided when the service participant node reaches a preset condition, for example, the seed transaction request is triggered to be provided when the service participant node detects that the service deadline time specified in the service transaction request is reached or a random number needs to be generated; the service participant node may also trigger to provide a seed transaction request and the like when receiving an initiation block sent by the blockchain network and storing transaction data corresponding to the service transaction request of the participant node.
Optionally, in order to prevent the service participant from not sending the seed transaction request or sending an incorrect seed transaction request when the block link point needs to receive the seed transaction request, the block link point may perform mortgage element freezing on the account of the service participant when receiving the service transaction request sent by the service participant in the block chain network, and if the block link point needs to receive the seed transaction request, the seed transaction request sent by the service participant is not received within a preset time period or the incorrect seed transaction request is received, the frozen mortgage element is deducted from the account of the service participant. The advantage of this arrangement is that the business participants who provide the seed transaction requests are constrained, and the credibility of the random number generation environment is ensured.
And S103, generating a random number based on a set random algorithm according to the seed character string in the seed transaction request.
The seed character string may be a character string required for generating a random number, and the seed character string may be composed of numbers and/or english letters. The set random algorithm is a predetermined, associated algorithm or rule for generating random numbers.
Optionally, after receiving the seed transaction request associated with the service transaction request, the block link point processes the seed transaction request to obtain a seed character string included in the seed transaction request, and generates a random number based on a set random algorithm according to the obtained seed character string. One or more random numbers may be generated.
Optionally, in the embodiment of the present invention, a process of generating a random number based on a set random algorithm according to a seed character string in the seed transaction request may also be a process of calling a random number intelligent contract, and generating a random number based on a set random algorithm according to a seed character string in the seed transaction request. The random number intelligent contract can be a method and a rule for how to generate random numbers, and can be generated based on a consensus mechanism and a set random algorithm. Specifically, after a seed character string is acquired from the seed transaction request, the random number intelligent contract is called, and the acquired seed character string is used as a parameter of the random number intelligent contract; and executing the random number intelligent contract according to the parameters of the random number intelligent contract to obtain the random number required by the service transaction request of the current time.
Optionally, in the embodiment of the present invention, in order to improve the security of the generated random number, in the process of generating the random number based on the set random algorithm according to the seed character string in the seed transaction request, an intelligent contract for the random number may be invoked, and the random number is generated based on the set random number algorithm according to the seed character string and the block identifier of the initiation block in the seed transaction request. The block identification of the initiating block is not falsifiable, so that the safety of random number generation is ensured. Optionally, the block identifier may also be a block identifier of a block other than the initiating block, which is not limited in this embodiment of the present invention.
S104, generating a service processing result according to the random number and the service transaction request, and adding the service processing result into a result block.
The service processing result may be a final processing result obtained by processing the service transaction request, and the processing result may be generated according to the random number.
Optionally, after the random number is generated, the service transaction request is continuously processed according to the generated random number following the processing process of the service transaction data in S101, so as to obtain a service processing result, and the finally obtained service processing result is added to the result block. For example, if the service transaction request is a guess initiating transaction request, then according to the random number generated in S103, then S101 continues to process the guess initiating transaction request, determines the result of the guess (such as winner information, bonus allocation, winning answer, etc.), and adds the obtained guess result to the result block corresponding to the guess initiating transaction request. Optionally, the obtained service processing result may be added to the current block, and the current block to which the service processing result is added is the result block.
Optionally, in the embodiment of the present invention, the number of the random numbers generated in S103 may be one, or may be multiple. When a plurality of random numbers are generated, and a service processing result is generated according to the random numbers and the service transaction request, the service processing result may be generated by using the plurality of random numbers. For example, if the service transaction request is a guess initiating request, when there are many guess responders for the current guess, 3 random numbers such as 1, 5, and 8 may be generated, at this time, for each guess responder for the correct guess, sorting according to the time when it sends the guess response transaction request, setting the responder with the sorting sequence number of 1 as a first-class prize, setting the responders with the sorting sequence numbers of 5 and 15 as second-class prizes, and setting the responders with the sorting sequence numbers of 8, 18, and 28 as third-class prizes.
Optionally, in the embodiment of the present invention, after the block link node adds the service processing result to the result block, the result block added with the service processing result may also be sent to the block link network. So that other nodes in the blockchain network synchronize, verify, or otherwise manipulate the data in the resulting block.
It should be noted that, in the embodiment of the present invention, a process of processing a service transaction request includes two parts: the first part is S101, and the relevant processing operation without random number participation in the service transaction request is executed to obtain service transaction data, and the service transaction data is added to the process of the initiating block; the second part is S104, after the random number is generated, the service transaction request is processed continuously according to the generated random number, a service processing result is generated, and the result block is added.
It should be noted that the block link point in the embodiment of the present invention may be a block generation node, or may be another node other than the block generation node. In the above embodiment, the block chain node is taken as the block generation node as an example, and if the block chain node is another node, the other node also executes the above process to generate the random number, thereby completing verification of the transaction data generated by the block generation node processing the service transaction request. Specifically, the obtaining of the service transaction data may be performed, and the processing may be performed, where the service transaction data in the initiating block is verified according to the processed service transaction data, and if the verification is passed, the service transaction data in the initiating block is received and added to the block chain of the node; if the random number is needed to be used in the service transaction request, receiving a seed request associated with the service transaction request in a block chain generation period, and generating the random number based on a set random algorithm according to a seed character string in the seed request; and generating a service processing result according to the random number and the service transaction request, verifying the service processing result in the result block according to the generated service processing result, and if the verification is passed, receiving the service processing result in the result block and adding the service processing result into the block chain of the node.
In the method for generating a random number of a block chain provided in this embodiment, when a service transaction request requiring the use of a random number is processed, a block link point generates a random number through a seed character string in a seed transaction request sent by a service participant node of the service transaction request, thereby completing a processing operation of a subsequent service transaction request. The problem that random numbers generated by a centralized service mechanism are unsafe is solved, a seed character string is provided by a service participant, and the seed character string is not known by a block chain node before a service processing result is generated, so that block chain node counterfeiting is restrained; because the seed character string provided by the service participant is generated in advance before the service transaction data is processed by the block chain node, the service participant providing the seed character string is restrained from being incapable of replacing the seed character string according to the benefit of the service participant, the public trust of generating the block chain random number is improved, and the safety of the random number is improved.
Further, in the embodiment of the present invention, before generating the random number based on the set random algorithm according to the seed character string in the seed transaction request, the received seed transaction request may also be verified, specifically: and verifying the seed transaction request according to the seed transaction identifier carried in the service transaction request. When a service participant generates a service transaction request, a transaction identifier of a pre-generated seed transaction request is carried in the service transaction request, after a block chain node receives the service transaction request, the transaction identifier of the seed transaction request corresponding to the service transaction request can be uniquely determined, after the block chain node receives the seed transaction request sent by the service participant, the transaction identifier in the received seed transaction request can be compared with the seed transaction identifier carried in the service transaction request, so that the seed transaction request of an initiator is verified, if the comparison result is consistent, the verification is successful, and S103 can be continuously executed, and a random number process is generated based on a set random algorithm according to a seed character string in the received seed transaction request. The method has the advantages that the situation that the pre-generated seed transaction request is modified and sent to the block chain node according to the development of the service processing process for the benefit of the service participant of the service transaction request is avoided, so that the process of generating the random number is interfered, and the safety and the reliability of the generated random number are improved.
Example two
Fig. 2 is a flowchart of a block chain random number generation method according to a second embodiment of the present invention, which is based on the foregoing embodiments and specifically shows when a seed transaction request associated with a service transaction request is received and a specific description of generating a random number based on a set random algorithm according to a seed character string in the seed transaction request. As shown in fig. 2, the method includes:
s201, acquiring the service transaction request, and processing to add the service transaction data to the initiating block.
S202, if the service transaction request needs to use the random number, according to the block interval configured by the service transaction request or the block interval configured according to the preset rule, waiting for the block interval with the set number until the generation period of the result block.
The block interval may refer to a block height between the initiation block and the result block, such as the number (M) of blocks between the initiation block and the result block, or a specific interval time between the initiation block and the result block. The block interval may be pre-configured in the service transaction request by the service participant initiating the service transaction request, for example, the block interval is preset to 10 blocks in the service transaction request; the block link points may be configured according to a preset rule in the intelligent contract, for example, the block interval is specified in the intelligent contract, and is an interval from the initiation block to the next corresponding block when the service is up to time. The set number may be determined according to the block interval, for example, if the block interval is 1 block, the set number is 1, and if the block interval is 1 hour, the set number is the number of blocks generated in one hour after the service transaction data is added to the originating block, including the originating block. Alternatively, the set number may be at least one.
For example, if the service transaction request needs to use a random number, a set number to be waited is determined according to a block interval configured in the service transaction request or a block interval configured according to a preset rule, and then the block interval of the set number is waited until a generation period of a result block is reached, and a seed transaction request associated with the service transaction request provided by a service participant can not be received in the generation period of the result block.
Optionally, when the set number is one, after the service transaction data is added to the initiating block, waiting for a block interval to reach a result block generation period, that is, a next block of the initiating block reaches a result block generation period, which indicates that the result block and the last initiating block are adjacent blocks; if the set number is at least two, it may be that at least two block intervals are waited to reach the result block generation period from the start block.
S203, in the generation period of the result block, a seed transaction request associated with the service transaction request is received.
And S204, generating a random number based on a set random algorithm according to the seed character string in the seed transaction request.
Optionally, if the set number is one, when the random number is generated based on the set random algorithm according to the seed character string in the seed transaction request, the random number may be generated based on the set random algorithm according to the seed character string in the seed transaction request and the block identifier of the initiation block; if the set number is at least two, generating a random number based on a set random algorithm according to the seed character string in the seed transaction request and based on the set random algorithm, wherein the random number may be generated based on the set random algorithm according to the seed character string in the seed transaction request and the block identifier of the middle block; or generating a random number based on a set random algorithm according to a seed character string in the seed transaction request, the block identifier of the initiating block, and the block identifier of the middle block. Specifically, the method for generating the random number based on the set random number algorithm according to the seed character string and the block identifier may be a method for performing a correlation operation on the seed character string and the block identifier according to a set random algorithm to generate the random number; the random number intelligent contract can also be called, the random number is generated based on a set random number algorithm according to the seed character string and the block identification, and if the seed character string and the block identification can be used as parameters of the random number intelligent contract, the random number intelligent contract is executed, and the random number generated at this time is obtained.
Alternatively, the intermediate chunk refers to a chunk generated while waiting for a set number of chunk intervals, and may be a chunk between the initiation chunk and the result chunk. The data stored in the middle block may be data associated with the service transaction request, for example, when the service transaction request is an initiating transaction request, the data associated with the initiating transaction request may be response data generated when a response transaction request associated with the initiating transaction request is processed; or may be data unrelated to the service transaction request, such as transaction data generated by processing other transaction requests unrelated to the service transaction request.
If the generated random number uses the block identifier of the middle block in which the data associated with the service transaction request is stored, a situation that a service participant of the service transaction request maliciously interferes with the generation process of the random number may occur. For example, the guess responder a in the guess participants repeatedly participates in a guess initiation transaction request for multiple times, and the guess responder a can control the stored response data in the middle block to be the response data when the guess responder a participates in the guess, and the block identifier is generated according to the data stored in the block, so that the guess responder a can control the block identifier of the middle block to further interfere with the generation result of the random number. To avoid this, provision can be made for: if the set number is at least two, in the intermediate blocks between the initiating block and the result block, at least one intermediate block does not have data associated with the service transaction request (i.e. at least one intermediate block exists, and the transaction data stored in the intermediate block is not associated with the service transaction request). When the random number is generated based on the set random algorithm according to the seed character string in the seed transaction request, the random number may be generated based on the set random algorithm according to the seed character string in the seed transaction request and the block identifier of the at least one middle block that is completely unrelated to the service transaction request. Specifically, at least one intermediate block completely unrelated to the service transaction request may be obtained from all the intermediate blocks, a block identifier of the intermediate block is calculated, and a random number is generated based on a set random algorithm according to the seed character string in the seed transaction request and the block identifier of the at least one intermediate block completely unrelated to the service transaction request.
In this embodiment, the existence of the at least one intermediate block without data associated with the service transaction request may be intentionally controlled, for example, the block link point may identify whether there is an intermediate block completely unassociated with the service transaction request according to a locally deployed random number intelligent contract, and if so, generate a random number based on a set random algorithm according to a seed character string in the seed transaction request and a block identifier of the at least one intermediate block completely unassociated with the service transaction request. Optionally, the phenomenon that at least one intermediate block does not have data associated with the service transaction request may also be naturally formed without any deliberate control, because the speed of generating a block may be fast, for example, 0.3 second is possible to generate a block, and therefore, when a response transaction request associated with the service transaction request is processed, data associated with the service transaction request is not obtained and stored in the block when each block is generated, for example, if the service transaction request is a competition initiation request, an answer is published after 1 day specified in the competition initiation request, and hundreds of thousands of blocks are generated in the 1 day time, but a responder participating in the competition of the competition cannot carry out competition at all times, so that the answer to the competition cannot be guessed in each block of tens of thousands of blocks. Or the interval from the specified competition deadline to the competition publishing time is long, and the intermediate blocks are inevitable to store no data related to the competition.
S205, generating a service processing result according to the random number and the service transaction request, and adding the result into a result block.
In the method for generating a random number of a block chain provided in the embodiment of the present invention, when a service transaction request requiring the use of a random number is processed, after a block is initiated, a set number of intermediate blocks is waited until a generation period of a result block, and then a random number is generated based on a set random algorithm through a seed character string in a seed transaction request sent by a service participant node and a block identifier of an intermediate block unrelated to the service transaction request, thereby completing a processing operation of a subsequent service transaction request. The random number is generated by adopting the middle block, particularly the block identifier of the middle block irrelevant to the service transaction request, so that the condition that a service participant maliciously interferes with the generation of the random number is avoided, and the safety of the random number generation process is further improved.
EXAMPLE III
Fig. 3 is a flowchart of a block chain random number generation method according to a third embodiment of the present invention, which is based on the foregoing embodiment and specifically gives a description of how to execute the block chain random number generation method when a service transaction request is an originating transaction request. As shown in fig. 3, the method includes:
s301, acquiring the service transaction request, and processing to add the service transaction data to the initiating block.
Optionally, the service transaction request in this embodiment is a request for initiating a transaction, after the initiator generates a request for initiating a transaction based on the service intelligence contract and the initiation data, the request for initiating a transaction is sent to the blockchain network, and a node (e.g., a blockchain generation node) of the blockchain network receives and processes the request for initiating a transaction, so as to obtain initiation data of the request for initiating a transaction and add the initiation data to the initiation block. After receiving the service transaction request, other nodes (i.e., responders) in the block chain generate a response transaction request according to the initiation transaction request and response data based on a service intelligent contract if the other nodes want to participate in the initiation transaction request, and send the response transaction request to the block chain network, and the block chain nodes (such as block generation nodes) in the time zone receive the response transaction request and process the response transaction request to obtain the response data of the response transaction request, and the response data is also added to the initiation block as transaction data.
Illustratively, the guess initiator generates a guess initiating transaction request based on the guess initiating intelligent contract and the guess initiating data and sends the guess initiating transaction request to the blockchain network. At this time, the block generation node receives the guess initiating transaction request and processes the guess initiating transaction request to obtain initiating data of the guess initiating transaction request, and the initiating data, such as the guess title, standard answers, guess options, guess deadline, guess initiator information, guess rewards and the like, are added to the initiating block. If other nodes in the block chain want to participate in the guess after receiving the guess initiating transaction request, the node is a responder, and the node generates a guess responding transaction request according to the received guess initiating transaction request and guess responding data thereof based on a guess responding intelligent contract and sends the guess responding transaction request to the block chain network, and the block generating node receives the guess responding transaction request and processes the guess responding transaction request to obtain guess responding data in the guess responding transaction request, such as guess answers, guess time, guess party information and the like, and adds the guess responding data to the initiating block.
Optionally, the number of the initiating blocks may be one or more, and the initiating data that is also the initiating transaction request and the response data that is at least one responding transaction request are recorded in the one or more blocks respectively.
S302, if the service transaction request needs to use the random number, in the generation period of the result block, receiving a seed transaction request associated with the service transaction request.
Wherein, the service participants of the service transaction request for providing the seed transaction request comprise one or more; the plurality of service participants includes an initiator of a service transaction request and at least one responder. Both the initiator and the receiver can generate a seed transaction request associated with the business transaction request, for example, the seed transaction request generated by the initiator can be a seed transaction request associated with an initiating transaction request in the business transaction requests; the seed transaction request generated by the responder may be a seed transaction request associated with a response transaction request in the business transaction requests.
Optionally, in this embodiment, in the generation cycle of the result block, the received seed transaction request associated with the service transaction request may be a seed transaction request sent by the initiator and/or the responder. The time for each service participant to send the seed transaction request may be the same or different, and if each participant does not send the seed transaction request at the same time, a receiving time may be defined, and each service participant needs to send its seed transaction request within the receiving time range.
S303, generating a random number based on a set random algorithm according to the seed character string in the seed transaction request.
Optionally, when the random number is generated based on the set random algorithm according to the seed character string in the seed transaction request, the seed character string may be obtained by processing according to the seed transaction request sent by the initiator and/or the responder, and then the random number is generated based on the set random algorithm according to the seed character string in the seed transaction request. Specifically, how to generate the random number based on the set random algorithm according to the seed character string in the seed transaction request in this embodiment may be similar to the above embodiments, and details thereof are not repeated.
S304, acquiring initiation data according to the initiation transaction request, and acquiring response data according to at least one response transaction request associated with the initiation transaction request;
optionally, since both the initiator data and the response data are stored in the initiator block. Therefore, when acquiring the initiation data according to the initiation transaction request and acquiring the response data according to the at least one response transaction request associated with the initiation transaction request, it may be to traverse each initiation block to check whether the initiation data corresponding to the initiation transaction request and/or the response data corresponding to the at least one response transaction request associated with the initiation transaction request are stored therein, and if so, acquire the initiation data and/or the response data.
S305, according to the initiating data, the response data and the random number, operating the service intelligent contract of the service transaction request to generate a service processing result, and adding the service processing result into the result block.
The service intelligent contract may be a method and a rule for determining how to perform analysis and operation on a service processing result, and may be generated based on a consensus mechanism and a service processing rule, where the service processing rule may be a generation rule of a current processing result included in a service transaction request, or a rule predetermined by a block chain network for different service transaction requests. Optionally, the service intelligent contract deployed in the block link node and the service initiation or response intelligent contract deployed on the service participant node may be the same intelligent contract.
Optionally, the service intelligent contract of the service transaction request is run according to the initiation data, the response data and the random number to generate a service processing result, and the service processing result is added to the result block. For example, if the initiating data is the guess initiating data of the guess initiating transaction request, the response data is the guess response data of the guess response data request, and the random number is 8, the guess initiating data, the guess response data, and the random number 8 are used as guess intelligent contract parameters, and the guess intelligent contract is operated according to the guess intelligent contract parameters, so that the service processing result of the guess initiating transaction request is obtained as follows: after all the responders with correct guesses are sorted according to the guessing time sequence, the responders sorted into the number band 8 are the winner, such as 8 th, 18 th and 28 th, and the result of the guessing process is written into the result block.
In the method for generating a random number of a block chain provided in the embodiment of the present invention, when a service transaction request requiring the use of a random number is processed, a block link point generates a random number through seed character strings in a plurality of seed transaction requests sent by an initiator and a responder in a service participant, and a service intelligent contract is run according to initiation data, response data, and the random number associated with the initiation service transaction request to obtain a service processing result, thereby completing a processing operation of the entire service transaction request. In the process of generating the random number by the block chain node, the block generating node, the service initiator and the service responder are restricted with each other, so that the credibility of the random number generating environment is ensured, and the safety of the random number generating process is improved.
Example four
Fig. 4 is a flowchart of a method for generating a random number for a blockchain according to a fourth embodiment of the present invention, where this embodiment is applicable to how a service participant assists a blockchain node in processing a service transaction request that requires using a random number, where the service participant may be an initiator that initiates the service transaction request or a responder that responds to the service transaction request. The service participant may be a node in the blockchain network or may not be a node in the blockchain network, but may participate in the blockchain network through the node in the blockchain network. The method may be performed by a random number generating apparatus or device configured to a blockchain of service participants, which may be implemented in hardware and/or software, and may be integrated in an electronic device carrying blockchain nodes.
It should be noted that the service transaction request processed by the block chain node in each embodiment is sent to the block chain network by the service participation direction in this embodiment, the seed transaction request required by the block chain node in each embodiment to generate the random number is also sent to the block chain network by the service participation direction in this embodiment, and the block chain node in each embodiment can complete the processing of the service transaction request required to use the random number only by interacting with the service participant node in this embodiment.
As shown in fig. 4, the method specifically includes the following steps:
s401, generating a seed transaction request and performing localized storage.
Optionally, when the service participant generates the seed transaction request, a group of seed character strings may be randomly generated according to the specification of the seed intelligent contract, and then the seed intelligent contract is run to generate the seed transaction request. Wherein a seed intelligence contract may be a specific rule that specifies how to generate a seed transaction request. Optionally, the seed intelligent contract may also be the same intelligent contract as the business intelligent contract in which the business participant generates the business transaction request.
It should be noted that the seed transaction request generated by the service participant is sent to the blockchain network only when a random number needs to be generated in the process of processing the service transaction request at the blockchain node, but in order to prevent the service participant from generating the seed transaction request beneficial to the benefit of the service participant according to the development process of the service transaction request, the service participant needs to generate the seed transaction request before sending the service transaction request to the blockchain network, and since the generated seed transaction request does not need to be sent to the blockchain network immediately at this time, the generated seed transaction request may be stored locally.
S402, adding the transaction identifier of the seed transaction request into the service transaction request.
In order to prevent a service participant from tampering a pre-generated seed transaction request according to a development process of a service transaction request and ensure the safety of random number generation, when the service participant generates the service transaction request, the service participant may first calculate a transaction identifier of the seed transaction request according to the pre-generated seed transaction request and add the transaction identifier to the service transaction request, so that when a block chain node receives the service transaction request, the seed transaction request corresponding to the service transaction request is uniquely determined, and the service participant cannot tamper the seed transaction request corresponding to the service transaction request.
Optionally, there may be many methods for calculating the transaction identifier of the seed transaction request according to the pre-generated seed transaction request, which is not limited in this embodiment. For example, the seed transaction request may be encrypted and signed according to a certain algorithm, and the obtained signature is used as the transaction identifier of the seed transaction request; the seed character string in the request for generating the seed transaction can be encrypted according to a certain algorithm, and the obtained encryption result is used as the transaction identifier of the request for generating the seed transaction.
Optionally, when the transaction identifier of the seed transaction request is added to the service transaction request, the service participant generates the service transaction request based on the service intelligent contract, the service data and the seed transaction identifier; or generating a service transaction request based on the service intelligent contract and the service data, and then directly adding the transaction identifier of the seed transaction request into the generated service transaction request to obtain the final service transaction request. The transaction identifier of the seed transaction request may also be added to the service transaction request in other manners, which is not limited in this embodiment.
Optionally, in the embodiment of the present invention, one or more service participants of the service transaction request include; when the number of the service participants is multiple, the multiple service participants comprise the initiator and at least one responder of the service transaction request; wherein the business transaction request comprises an initiating transaction request or a responding transaction request.
S403, sending a service transaction request to the blockchain network to request processing of the service transaction request, and adding service transaction data to the initiating block.
Illustratively, after generating the service transaction request, the service participant sends the service transaction request to the blockchain network, so as to request the blockchain link point in the blockchain network to receive and process the service transaction request, and add the service transaction data to the initiating block.
Optionally, since the block link point stores the service transaction data generated by processing the service transaction request in the initiation block, and stores the service processing result generated by processing the service transaction data in the result block, where the result block and the initiation block are not the same block, and the result block is a block located after the initiation block, if the service transaction request needs to use a random number, the block link point needs to wait for a set number of block intervals until the generation period of the result block according to the block interval configured by the service transaction request or the block interval configured according to a preset rule. In this case, a block interval is configured in the service transaction request generated by the service initiator, and the block interval is a block height between the initiating block and the result block. The set number of block intervals may be one or more, and preferably, the set number of block intervals is at least two. At least one of the at least two intermediate blocks between the initiating block and the result block is absent data associated with the business transaction request. The situation may be formed by controlling or may be formed naturally, and the above embodiment has been described, and will not be described again.
S404, a seed transaction request associated with the service transaction request is sent to the block chain network to request that a random number is generated according to a seed character string in the seed transaction request in the generation period of the result block, and a service processing result is generated according to the random number and the service transaction request and is added to the result block.
Wherein the result block is a subsequent block of the originating block. The result block may be the next block of the originating block, or may be separated from the originating block by at least one intermediate block.
Optionally, the service participant node sends a pre-generated seed transaction request associated with the service transaction request to the blockchain network in the generation period of the result block, and after receiving the seed transaction request by a blockchain node in the request blockchain network, generates a random number based on a set random algorithm according to an in-character string in the seed transaction request, and then generates a service processing result according to the generated random number and the service transaction request, and adds the service processing result to the result block.
Optionally, in the embodiment of the present invention, there are many triggering conditions for the service participant node to send the seed transaction request associated with the service transaction request to the blockchain network, which is not limited in this embodiment. The method may be that when receiving a notification for providing a seed transaction request sent by a blockchain node, the notification triggers sending of the seed transaction request to the blockchain network; or when the processing process of the service transaction request generated by the participant needs to use the random number, the service participant monitors the processing process of the service transaction request by the block chain node point, and if the monitoring reaches the generation period of the result block, the service participant triggers to send a seed transaction request to the block chain network; specifically, after receiving an initiation block storing service transaction data sent by a block chain node according to a block interval configured by a service transaction request or a block interval configured according to a preset rule, the block chain node waits for a set number of block intervals until a generation period of a result block is reached, and when the generation period of the result block is reached, the block chain node automatically sends a seed transaction request to the block chain network.
In the method for generating a random number of a block chain provided in this embodiment, a service participant generates a seed transaction request in advance, adds a transaction identifier of the seed transaction request to the service transaction request, sends the service transaction request to a block chain network, and when a random number needs to be generated when a block chain network node processes the service transaction request, sends the pre-generated seed transaction request to the block chain network, so that a block chain node generates a random number according to a seed character string in the seed transaction request, thereby completing a processing operation of a subsequent service transaction request. The block chain nodes are restrained by the service participants, so that the block chain nodes are prevented from being counterfeited when generating the random numbers, the public confidence of generating the block chain random numbers is improved, and the safety of the random numbers is improved.
EXAMPLE five
Fig. 5 is a signaling diagram of a random number generation method for a block chain according to a fifth embodiment of the present invention; the present embodiment provides a preferred example based on the foregoing embodiments, where the block chain node interacts with the guess initiator and the guess responder, and completes the request processing of the guess initiation transaction through the random number generated by the block chain node. As shown in fig. 5, the method includes:
s501, the guess initiator generates a seed transaction request and carries out localized storage.
It should be noted that, in this embodiment, each node (such as a block chain node, a guess initiator node, and a guess responder node) needs to deploy a guess intelligence contract in advance, and the guess initiator node deploys the guess intelligence contract to function as: a guess initiating transaction request is generated based on the guess intelligence contract. The block chain node deploys the guessing intelligent contract and has the following functions: and carrying out guess initiation transaction request processing based on the guess intelligent contract. The guess responder node deploys the guess intelligent contract and has the following functions: based on the intelligent guess contract, the guess initiating transaction request is responded, and then the guess responding transaction request is generated.
Optionally, if the guess initiator wants to initiate a guess, it needs to first randomly generate a set of seed character strings, such as "abc 123", according to the rule of the guess intelligent contract (the guess intelligent contract contains the generation rule of the seed transaction request), then run the guess intelligent contract according to the generated seed character strings to generate the seed transaction request, and store the generated seed transaction request in the local of the guess initiator, the seed transaction request generated by the guess initiator is the seed transaction request corresponding to the guess to be initiated this time, that is, the seed transaction request corresponding to the guess initiation transaction request to be initiated this time.
For example, the guessing intelligent contract may be a client of a user program, which may be composed of a main program and a plurality of subprograms. When the guess initiator A wants to initiate a guess, the guess intelligent contract is started, a guess intelligent contract interface is entered, a randomly generated seed character string 'abc 123' is input into the guess intelligent contract interface, at the moment, the guess intelligent contract automatically runs, a seed transaction request is generated, and the generated seed transaction request is locally stored.
S502, the guess initiator adds the transaction identifier of the seed transaction request into the guess initiating transaction request and sends the guess initiating transaction request to the blockchain network.
Optionally, in order to restrict the guess initiator from tampering with the seed transaction request generated in S501, the guess initiator needs to calculate the transaction identifier of the seed transaction request according to the seed transaction request generated in S501, and when the guess initiation transaction request is generated, add the calculated transaction identifier of the seed transaction request to the guess initiation transaction request.
Illustratively, after generating a seed transaction request, the guess initiator a may continue to click on a guess intelligent contract interface, click on a transaction identifier calculation key, at which time the guess intelligent contract will automatically run, and generate a transaction identifier of the seed transaction request, then the guess initiator a inputs information such as the title, standard answer, guess option, guess deadline, guess initiator information, guess reward, etc. of the current guess on the interface, click on a guess transaction request generation key, at which time the guess intelligent contract will automatically run, and generate a guess initiating transaction request including the transaction identifier. The guess initiator a may send the generated guess initiation request to the blockchain network through its device terminal, so that each node in the blockchain network receives and responds.
S503, the block chain node receives the guess initiating transaction request and processes the request to add the guess initiating data to the initiating block.
For example, after receiving the guess initiating request, the block nodes process the guess initiating request based on the guess intelligent contract deployed on the nodes thereof, obtain guess initiating data (such as the guess title, standard answers, guess options, guess intercept time, guess initiator information, guess rewards, and the like), add the data to the current block, and at this time, the current block added with the guess initiating data is the initiating block.
S504, the guess responder generates a seed transaction request, and local storage is carried out.
Optionally, when other nodes in the block chain receive a guess transaction request sent by the guess initiator a, if the node wants to participate in the guess at this time, the node is a guess responder node, and optionally, for a guess initiation transaction request, the number of the guess responders corresponding to the guess responder node may be 0, 1 or more. The number of guessing respondents may be determined according to the number of node parties actually wanting to participate in the guess.
For example, when the guess responder B wants to participate in the guess initiating transaction request sent by the guess initiator a, it may use the method for the guess initiator a to generate the seed transaction request corresponding to the guess responding transaction request, and the seed transaction request is not sent first, but is stored locally.
And S505, the guess responder adds the transaction identifier of the seed transaction request into the guess response transaction request and sends the guess response transaction request to the blockchain network.
Optionally, also, in order to restrict the guessing responder from tampering with the seed transaction request generated in S504, the guessing responder needs to calculate a transaction identifier of the seed transaction request according to the seed transaction request generated in S504, and when generating the guessing response transaction request, add the calculated transaction identifier of the seed transaction request to the guessing response transaction request.
Illustratively, after receiving a guess initiating transaction request sent by a guess initiator a, a guess responder B determines a guess answer, clicks a guess button on a guess intelligent contract interface, at this time, the guess intelligent contract automatically runs, generates a transaction identifier of a seed transaction request, and then enters the guess response interface, and the guess responder B inputs information (such as name, telephone, mailbox, and the like) of the responder on the interface, the guess answer, the guess time, and the like, clicks a guess response transaction request generation button, at this time, the guess intelligent contract automatically runs, and generates a guess response transaction request containing the transaction identifier. The guess responder B can send the generated guess response request to the blockchain network through the equipment terminal thereof, so that the blockchain network node receives and responds.
S506, the block chain node receives the guess response transaction request and processes the guess response transaction request so as to add the guess response data into the initiating block.
For example, after receiving a guess response transaction request sent by a guess responder, the segment nodes process the guess response request based on a guess intelligent contract deployed on the nodes thereof to obtain guess response data (such as responder information, guess answers, guess time, and the like), and add the guess response data to the current segment, where the current segment added with the guess response data may also be an initiating segment. Optionally, the number of the initiating block may be one or multiple, the specific number is determined according to the number of the guessing responders and the number of the response data, and optionally, if the initiating block is multiple, the initiating block between the first initiating block and the result block may be used as an intermediate block.
Optionally, in the process of processing the guess response transaction request, the block link point may further add a localized processing process, so as to facilitate subsequent rapid calculation of the guess result. For example, a counter may be set to count the result block generation period, and if the result block generation period is reached, it indicates that the guess initiating the transaction request is intercepted and does not respond to the guess responding to the transaction request; the number of the guess responders responding to the guess initiating transaction request can be counted, answers are counted, guess time is counted, and the like; but also the identification of the block in which the guess response data is statistically recorded, and the like.
S507, if the guess initiating transaction request needs to use random numbers, the guess initiating direction blockchain network sends a seed transaction request associated with the guess initiating transaction request, and the guess responding direction blockchain network sends a seed transaction request associated with the guess responding transaction request.
Illustratively, if a random number is required to be used for the guess initiating transaction request, the guess initiating party and the guess responding party send a seed transaction request to the blockchain network when a trigger condition for sending the seed transaction request is met, and specifically, the guess initiating party sends the seed transaction request associated with the guess initiating transaction request to the blockchain network; the guess response direction sends to the blockchain network a seed transaction request associated with the guess response transaction request.
Optionally, the above embodiments of the triggering condition for the guess initiator and the guess responder to reach the seed transaction request are already described, and are not described again. Optionally, if the triggering condition is that a notification for providing a seed transaction request sent by a blockchain node is received, and the triggering condition triggers sending of the seed transaction request to the blockchain network, before this step, the method may further include: if the tile nexus determines that the guess initiating transaction request requires the use of a random number, the participants (i.e., the guess initiator and the guess responder) of the guess initiating transaction request are notified to provide a seed transaction request.
S508, if the guess initiating transaction request needs to use the random number, according to the block interval configured for the guess initiating transaction request or the block interval configured according to the preset rule, waiting for a set number of block intervals until the generation period of the result block, and in the generation period of the result block, the block chain node receives the seed transaction request associated with the guess initiating transaction request and the seed transaction request associated with the guess responding transaction request.
The number of the intermediate blocks is set to be at least two, and at least one intermediate block does not have data related to the service transaction request.
And S509, the block chain nodes verify the received seed transaction request according to the seed transaction identifier carried in the guess initiating transaction request and the guess response transaction request.
Illustratively, the block nodes calculate the transaction identifiers of all the received seed transaction requests, then compare the seed transaction identifiers carried in the guess initiating transaction request with the transaction identifiers of the seed transaction requests sent by the guess initiating party, and if the seed transaction identifiers are consistent, the seed transaction requests sent by the guess initiating party are verified successfully; and comparing the seed transaction identifier carried in the guess response transaction request with the seed transaction identifier sent by the guess responder to which the guess response transaction request belongs, and if the seed transaction identifiers are consistent, indicating that the seed transaction request sent by the guess responder is successfully verified.
And S510, if the verification is successful, calling a random number intelligent contract by the block chain node, and generating a random number based on a set random algorithm according to the seed character string in the seed transaction request and the block identifier of the middle block.
Illustratively, after the received seed transaction request is successfully verified, the blockchain node calls a random number intelligent contract to generate a random number based on a set random number algorithm according to a seed character string in the seed transaction request and a block identifier of an intermediate block irrelevant to the guessing transaction request.
And S511, the block chain nodes acquire the guess initiating data according to the guess initiating transaction request, and acquire the guess response data according to at least one guess response transaction request related to the guess initiating transaction request.
For example, since the block identifier recording the guess initiating data and the block identifier recording the guess response data are already counted in the localization process of the block chain node, the block identifier storing the guess initiating data of the guess initiating request, which is counted before, may be searched according to the guess initiating request, and then the block having the block identifier may be searched, so as to obtain the guess initiating data; similarly, the block identifier of the statistical guess response data storing the guess response request is searched according to the guess response request, and then the block with the block identifier is searched, so as to obtain the guess response data.
S512, the block nodes run the intelligent guess contract of the guess initiating transaction request according to the guess initiating data, the guess response data and the random number to generate guess processing results, and the guess processing results are added to the result blocks.
Illustratively, since how to process the guess intelligent contract to obtain the guess processing result is already specified in the guess intelligent contract, at this time, the guess intelligent contract for the guess initiating transaction request is operated according to the guess initiating data, the guess response data and the random number, the contract determines the respondent party with correct guess according to the preset program code, and further determines each respondent party with the prize winning and the corresponding reward element thereof based on the random number.
Optionally, in this embodiment, when receiving a request of each responder to send a guess response transaction, the blockchain node may deduct a certain incentive element (e.g., 0.1 credit) from each responder account as a guess qualification fee, and add the deducted incentive element to the guess initiator account; when the award elements (such as the first-grade 10 points, the second-grade 5 points and the third-grade 2 points) corresponding to the award items are issued to each guessing responder for winning the prize according to the determined guessing result, the corresponding award elements can be deducted from the account of the guessing initiator and added to the account of each guessing responder for winning the prize. Alternatively, the block link points may obtain certain incentive elements from the guess qualification fee and the guess bonus as management fees.
The embodiment of the invention provides a random number generation method of a block chain. And in the process of processing the guess initiating request, the block chain node interacts with the guess initiating party and the guess participating party to obtain the seed character string and generate the random number, so that the process of the guess initiating transaction request is completed, and the guess processing result is obtained and added to the block. The scheme of the invention is characterized in that guessing participants (namely guessing initiator and guessing responder) and block chain nodes are mutually constrained, so that the phenomenon that the participants and the block chain nodes are false for the benefit of the participants and the block chain nodes is avoided, random numbers generated by the block chain nodes can be prevented from being predicted by other nodes through an attack means, and the credibility and the safety of generating the block chain random numbers are ensured on the basis of realizing the decentralized generation of the block chain network.
EXAMPLE six
Fig. 6 is a block diagram of a block chain random number generating device according to a sixth embodiment of the present invention, where the device may be configured in a block chain node. The block link node may be a block generation node in a block link network; or may be other nodes (e.g., authentication nodes) in the blockchain network. The device can execute any block chain random number generation method provided by the first embodiment to the third embodiment and the fifth embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. As shown in fig. 6, the apparatus may include:
a service request obtaining module 601, configured to obtain a service transaction request, and process the service transaction request to add service transaction data to the initiation block;
a seed request receiving module 602, configured to receive a seed transaction request associated with the service transaction request in a generation cycle of a result block if the service transaction request needs to use a random number; wherein the result block is a subsequent block of the initiation block, and the seed transaction request is provided by a service participant of the service transaction request;
a random number generation module 603, configured to generate a random number based on a set random algorithm according to the seed character string in the seed transaction request;
a result processing adding module 604, configured to generate a service processing result according to the random number and the service transaction request, and add the service processing result to the result block.
In the random number generation apparatus for a block chain provided in this embodiment, when a service transaction request requiring the use of a random number is processed, a block link point generates a random number through a seed character string in a seed transaction request sent by a service participant node of the service transaction request, thereby completing a processing operation of a subsequent service transaction request. The problem that the random number generated by a centralized service organization is unsafe is solved, the public confidence of generating the block chain random number is improved, and the safety of the random number is improved.
Further, the above apparatus further comprises:
and the seed request verification module is used for verifying the seed transaction request according to the seed transaction identifier carried in the service transaction request.
Further, the above apparatus further comprises:
and the waiting module is used for waiting for the block intervals with the set number until the generation period of the result block according to the block intervals configured by the service transaction request or the block intervals configured by the preset rule if the service transaction request needs to use the random number.
Further, the set number is at least two.
Further, at least one intermediate block among the intermediate blocks between the initiating block and the result block does not have data associated with the service transaction request.
Further, the random number generating module 603 is specifically configured to:
and generating a random number based on a set random algorithm according to the seed character string in the seed transaction request and the block identifier of the middle block.
Further, the service participants of the service transaction request for providing the seed transaction request comprise one or more; the plurality of service participants comprise an initiator of a service transaction request and at least one responder; the business transaction request comprises an initiating transaction request or a responding transaction request.
Further, the result processing adding module 604 is specifically configured to:
acquiring initiation data according to the initiation transaction request, and acquiring response data according to at least one response transaction request associated with the initiation transaction request;
and running a service intelligent contract of the service transaction request according to the initiating data, the response data and the random number to generate a service processing result, and adding the service processing result into the result block.
Further, the number of the initiating blocks is one or more; the initiating data and at least one response data are respectively recorded in a plurality of initiating blocks.
Further, the transaction initiating request is a guess transaction initiating request, and the response transaction request is a guess response transaction request.
Further, the random number generation module 603 is specifically configured to:
and calling a random number intelligent contract, and generating a random number based on a set random algorithm according to the seed character string in the seed transaction request.
Further, the above apparatus further comprises:
and the request providing notification module is used for notifying a service participant of the service transaction request to provide the seed transaction request if the service transaction request needs to use the random number.
EXAMPLE seven
Fig. 7 is a block diagram of a random number generating apparatus for a block chain according to a seventh embodiment of the present invention, where the apparatus can be configured to a service participant. The service participant can be an initiator for initiating the service transaction request, and can also be a responder for responding the service transaction request. The service participant can be a node in the blockchain network or not, but can participate in the blockchain network through the node in the blockchain network. The device can execute any block chain random number generation method provided by the fourth embodiment to the fifth embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. As shown in fig. 7, the apparatus may include:
a service request sending module 701, configured to send a service transaction request to a blockchain network to request processing of the service transaction request, and add service transaction data to an initiating block;
a seed request sending module 702, configured to send a seed transaction request associated with the service transaction request to a block chain network, so as to request that, in a generation cycle of a result block, a random number is generated according to a seed character string in the seed transaction request, and a service processing result is generated according to the random number and the service transaction request and is added to the result block; wherein the result block is a subsequent block to the originating block.
In the random number generation apparatus for a block chain provided in this embodiment, a service participant generates a seed transaction request in advance, adds a transaction identifier of the seed transaction request to the service transaction request, sends the service transaction request to a block chain network, and when a random number needs to be generated when a block chain network node processes the service transaction request, sends the pre-generated seed transaction request to the block chain network, so that a block chain node generates a random number according to a seed character string in the seed transaction request, thereby completing a processing operation of a subsequent service transaction request. The block chain nodes are restrained by the service participants, so that the block chain nodes are prevented from being counterfeited when generating the random numbers, the public confidence of generating the block chain random numbers is improved, and the safety of the random numbers is improved.
Further, the above apparatus further comprises:
the seed request generating module is used for generating a seed transaction request and carrying out localized storage;
and the identifier adding module is used for adding the transaction identifier of the seed transaction request into the service transaction request.
Further, the service transaction request is configured with a block interval, where the block interval is a block height between the initiation block and the result block.
Further, the set number of the block intervals is at least two.
Further, at least one intermediate block among the intermediate blocks between the initiating block and the result block does not have associated data with the service transaction request.
Further, the service participants of the service transaction request include one or more; the plurality of service participants comprise an initiator of a service transaction request and at least one responder; the business transaction request comprises an initiating transaction request or a responding transaction request.
Example eight
Fig. 8 is a schematic structural diagram of an apparatus according to an eighth embodiment of the present invention. Fig. 8 illustrates a block diagram of an exemplary device 80 suitable for use in implementing embodiments of the present invention. The device 80 shown in fig. 8 is only an example and should not bring any limitation to the function and scope of use of the embodiments of the present invention. As shown in fig. 8, the device 80 is in the form of a general purpose computing device. The components of the apparatus 80 may include, but are not limited to: one or more processors or processing units 801, a system memory 802, and a bus 803 that couples various system components including the system memory 802 and the processing unit 801.
Bus 803 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Device 80 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by device 80 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 802 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)804 and/or cache memory 805. The device 80 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 806 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 8, and commonly referred to as a "hard drive"). Although not shown in FIG. 8, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 803 by one or more data media interfaces. System memory 802 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 808 having a set (at least one) of program modules 807 may be stored, for instance, in system memory 802, such program modules 807 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 807 generally perform the functions and/or methodologies of embodiments of the present invention as described herein.
Device 80 may also communicate with one or more external devices 809 (e.g., keyboard, pointing device, display 810, etc.), with one or more devices that enable a user to interact with the device, and/or with any devices (e.g., network card, modem, etc.) that enable device 80 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 811. Also, the device 80 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet) via the network adapter 812. As shown in FIG. 8, the network adapter 812 communicates with the other modules of the device 80 via the bus 803. It should be understood that although not shown, other hardware and/or software modules may be used in conjunction with device 80, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others. For example, if the device 80 is configured in a block chain link point device, the random number generation method for a block chain according to any of the first to third embodiments and fifth embodiments of the present invention is implemented; if the device 80 is configured in the service participant device, the method for generating a random number of a block chain according to the fourth to fifth embodiments of the present invention is implemented.
Example nine
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program (or referred to as computer-executable instructions) is stored, where the computer program, when executed by a processor, is configured to perform any one of the above methods for generating random numbers for blockchains.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for embodiments of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the embodiments of the present invention have been described in more detail through the above embodiments, the embodiments of the present invention are not limited to the above embodiments, and many other equivalent embodiments may be included without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (20)

1. A method of random number generation for a block chain, performed by a block chain node, the method comprising:
acquiring a service transaction request, and processing the service transaction request to add service transaction data into an initiating block;
if the service transaction request needs to use a random number, receiving a seed transaction request associated with the service transaction request in a generation period of a result block; wherein the result block is a subsequent block of the initiation block, and the seed transaction request is provided by a service participant of the service transaction request;
verifying the seed transaction request according to the seed transaction identifier carried in the service transaction request;
generating a random number based on a set random algorithm according to the seed character string in the seed transaction request;
and generating a service processing result according to the random number and the service transaction request, and adding the service processing result into the result block.
2. The method of claim 1, wherein after obtaining the service transaction request, further comprising:
if the service transaction request needs to use a random number, waiting for a set number of block intervals until the generation period of the result block according to the block interval configured by the service transaction request or the block interval configured by a preset rule; wherein the block spacing is a block height between the initiating block and the result block.
3. The method of claim 2, wherein the set number is at least two.
4. The method of claim 3, wherein at least one of the intermediate blocks between the initiating block and the result block is free of data associated with the business transaction request.
5. The method of claim 4, wherein generating a random number based on a set random algorithm from the seed string in the seed transaction request comprises:
and generating a random number based on a set random algorithm according to the seed character string in the seed transaction request and the block identifier of the middle block.
6. The method according to any one of claims 1 to 4, wherein the service participants of the service transaction request providing the seed transaction request comprise one or more; the plurality of service participants comprise an initiator of a service transaction request and at least one responder; the business transaction request comprises an initiating transaction request or a responding transaction request.
7. The method of claim 6, wherein generating a service processing result according to the random number and the service transaction request, and adding to the result block comprises:
acquiring initiation data according to the initiation transaction request, and acquiring response data according to at least one response transaction request associated with the initiation transaction request;
and running a service intelligent contract of the service transaction request according to the initiating data, the response data and the random number to generate a service processing result, and adding the service processing result into the result block.
8. The method of claim 7, wherein the initiating blocks are one or more; the initiating data and at least one response data are respectively recorded in a plurality of initiating blocks.
9. The method of claim 8, wherein the initiating transaction request is a guess initiating transaction request and the responding transaction request is a guess responding transaction request.
10. The method of any of claims 1-4, wherein generating a random number based on a set random algorithm based on a seed string in the seed transaction request comprises:
and calling a random number intelligent contract, and generating a random number based on a set random algorithm according to the seed character string in the seed transaction request.
11. The method of any of claims 1-4, further comprising:
and if the service transaction request needs to use the random number, informing a service participant of the service transaction request to provide the seed transaction request.
12. A method for random number generation for a blockchain, performed by a service participant, the method comprising:
generating a seed transaction request and performing localized storage;
adding the transaction identifier of the seed transaction request into a service transaction request;
sending a service transaction request to a blockchain network to request processing of the service transaction request, and adding service transaction data to an initiating block;
sending a seed transaction request associated with the service transaction request to a block chain network to request that a random number is generated according to a seed character string in the seed transaction request in a generation period of a result block, and a service processing result is generated according to the random number and the service transaction request and is added to the result block; wherein the result block is a subsequent block to the originating block.
13. The method of claim 12, wherein a block spacing is configured in the traffic transaction request, wherein the block spacing is a block height between the originating block and the resulting block.
14. The method of claim 13, wherein the set number of block intervals is at least two.
15. The method of claim 14, wherein at least one of the intermediate blocks between the initiating block and the resulting block does not have data associated with the business transaction request.
16. A method according to any of claims 12 to 15, wherein the service participants of the service transaction request comprise one or more; the plurality of service participants comprise an initiator of a service transaction request and at least one responder; the business transaction request comprises an initiating transaction request or a responding transaction request.
17. An apparatus for generating random numbers for a blockchain, the apparatus being configured in a blockchain node, the apparatus comprising:
the service request acquisition module is used for acquiring the service transaction request and processing the service transaction request so as to add the service transaction data into the initiation block;
a seed request receiving module, configured to receive a seed transaction request associated with the service transaction request in a generation cycle of a result block if the service transaction request needs to use a random number; wherein the result block is a subsequent block of the initiation block, and the seed transaction request is provided by a service participant of the service transaction request;
the seed request verification module is used for verifying the seed transaction request according to a seed transaction identifier carried in the service transaction request;
the random number generation module is used for generating a random number based on a set random algorithm according to the seed character string in the seed transaction request;
and the result processing adding module is used for generating a service processing result according to the random number and the service transaction request and adding the service processing result into the result block.
18. An apparatus for generating random numbers for a block chain, the apparatus being configured for a service participant, the apparatus comprising:
the seed request generating module is used for generating a seed transaction request and carrying out localized storage;
the identification adding module is used for adding the transaction identification of the seed transaction request into the service transaction request;
a service request sending module, configured to send a service transaction request to a blockchain network to request processing of the service transaction request, and add service transaction data to an initiation block;
a seed request sending module, configured to send a seed transaction request associated with the service transaction request to a block chain network, so as to request that, in a generation cycle of a result block, a random number is generated according to a seed character string in the seed transaction request, and a service processing result is generated according to the random number and the service transaction request and is added to the result block; wherein the result block is a subsequent block to the originating block.
19. An electronic device, characterized in that the device comprises:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the method of random number generation for a blockchain of claims 1-16.
20. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out a method for random number generation of a blockchain according to any one of claims 1 to 16.
CN201910093971.8A 2019-01-30 2019-01-30 Random number generation method, device, equipment and storage medium for block chain Active CN109753269B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910093971.8A CN109753269B (en) 2019-01-30 2019-01-30 Random number generation method, device, equipment and storage medium for block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910093971.8A CN109753269B (en) 2019-01-30 2019-01-30 Random number generation method, device, equipment and storage medium for block chain

Publications (2)

Publication Number Publication Date
CN109753269A CN109753269A (en) 2019-05-14
CN109753269B true CN109753269B (en) 2021-11-09

Family

ID=66407213

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910093971.8A Active CN109753269B (en) 2019-01-30 2019-01-30 Random number generation method, device, equipment and storage medium for block chain

Country Status (1)

Country Link
CN (1) CN109753269B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110427782A (en) * 2019-07-23 2019-11-08 杭州云象网络技术有限公司 A kind of random digit generation method based on block chain
CN110780847B (en) * 2019-10-15 2022-02-25 腾讯科技(深圳)有限公司 Random number generation method, random number generation device and electronic equipment
CN111125259B (en) * 2019-12-31 2023-08-18 预言机(重庆)科技有限公司 Random seed providing method based on blockchain bottom layer
TWI726650B (en) * 2020-03-11 2021-05-01 宏碁股份有限公司 Blockchain random number generating system amd blockchain random number generating method
CN113448541B (en) * 2020-03-26 2023-08-01 宏碁股份有限公司 Block chain random number generation system and block chain random number generation method
CN114422143B (en) * 2022-01-13 2023-06-20 中国平安人寿保险股份有限公司 Data dynamic encryption method, device, equipment and medium based on artificial intelligence
CN114338051B (en) * 2022-03-15 2022-06-21 北京百度网讯科技有限公司 Method, device, equipment and medium for acquiring random number by block chain

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2416818C2 (en) * 2004-11-16 2011-04-20 Томсон Лайсенсинг Bit-accurate seed initialisation for pseudo-random number generators used in video system
KR101887964B1 (en) * 2017-04-28 2018-08-13 주식회사 더블체인 Blockchain core server having security ability based on quantum random number, blockchain security method and electronic cash exchange system
CN107862782B (en) * 2017-10-27 2020-11-13 贝壳找房(北京)科技有限公司 Lottery drawing method and device based on Ether house block chain
CN108365960B (en) * 2017-12-29 2020-11-20 北京欧链科技有限公司 Random number providing method and device
CN108665253A (en) * 2018-05-18 2018-10-16 百度在线网络技术(北京)有限公司 A kind of data processing method, device, equipment and the storage medium of block chain network
CN109034756A (en) * 2018-06-14 2018-12-18 胡晓东 Block chain digital asset distributing method and relevant apparatus based on random number
CN108845790A (en) * 2018-06-20 2018-11-20 胡晓东 A kind of application block chain generates the method and relevant apparatus of credible random number
CN109002487A (en) * 2018-06-25 2018-12-14 百度在线网络技术(北京)有限公司 A kind of post-processing approach based on copyright registration information, device, equipment and medium
CN108964905A (en) * 2018-07-18 2018-12-07 胡祥义 A kind of safe and efficient block chain implementation method

Also Published As

Publication number Publication date
CN109753269A (en) 2019-05-14

Similar Documents

Publication Publication Date Title
CN109753269B (en) Random number generation method, device, equipment and storage medium for block chain
CN110780847B (en) Random number generation method, random number generation device and electronic equipment
JP2018033162A (en) System and method for remotely initiating lost mode on computing device
EP3085023B1 (en) Communications security
CN108479061B (en) Application running data verification method and device, storage medium and server
CN110995781B (en) Praise information processing method, device and system
CN111885050B (en) Data storage method and device based on block chain network, related equipment and medium
CN102624677A (en) Method and server for monitoring network user behavior
EP3401780A1 (en) Notification message processing method and apparatus
CN105939362A (en) User account management method and device
CN111770198B (en) Information sharing method, device and equipment
KR20210053266A (en) Block chain-based asset processing method, device, apparatus and storage medium
CN109145590A (en) A kind of function hook detection method, detection device and computer-readable medium
CN110020262A (en) Pushed information sending method, device, computer equipment and storage medium
CN110808839A (en) Processing method, device, equipment and medium for block chain abnormal data
CN112035303A (en) Data testing method and device, computer and readable storage medium
WO2016185248A1 (en) System and method for providing an advertisement in an interactive environment
CN107872491B (en) Data processing method and device
CN112235588A (en) Prediction interaction processing method and device in live broadcast, electronic equipment and storage medium
CN114338051B (en) Method, device, equipment and medium for acquiring random number by block chain
CN112685377B (en) Detection processing method, device, server and medium based on historical object data
CN110378120A (en) Application programming interfaces attack detection method, device and readable storage medium storing program for executing
US20220385676A1 (en) Injecting computing code for detection of malicious computing attacks during suspicious device behavior
CN109919767B (en) Transaction risk management method, device and equipment
CN110661789A (en) Address resetting method, device, equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant