CN110474918A - A kind of verification method and relevant apparatus of resource distribution - Google Patents
A kind of verification method and relevant apparatus of resource distribution Download PDFInfo
- Publication number
- CN110474918A CN110474918A CN201910780153.5A CN201910780153A CN110474918A CN 110474918 A CN110474918 A CN 110474918A CN 201910780153 A CN201910780153 A CN 201910780153A CN 110474918 A CN110474918 A CN 110474918A
- Authority
- CN
- China
- Prior art keywords
- information
- resource
- resource distribution
- cipher
- result
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q30/00—Commerce
- G06Q30/02—Marketing; Price estimation or determination; Fundraising
- G06Q30/0207—Discounts or incentives, e.g. coupons or rebates
- G06Q30/0212—Chance discounts or incentives
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Business, Economics & Management (AREA)
- Development Economics (AREA)
- Computer Security & Cryptography (AREA)
- Strategic Management (AREA)
- Finance (AREA)
- Accounting & Taxation (AREA)
- Entrepreneurship & Innovation (AREA)
- General Engineering & Computer Science (AREA)
- Computing Systems (AREA)
- Game Theory and Decision Science (AREA)
- Computer Hardware Design (AREA)
- Economics (AREA)
- Marketing (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Storage Device Security (AREA)
Abstract
This application discloses a kind of verification method of resource distribution and relevant apparatus to be conducive to the fairness for improving resource distribution for carrying out the verification of Resource-Allocation Result.The application method includes: to obtain confidential information to be added and resource distribution instruction information;Encryption information is treated using check information to be encrypted, and obtains cipher-text information;Cipher-text information and resource distribution instruction information are recorded to block chain and synchronize storage, so that client obtains cipher-text information by block chain and resource distribution indicates information;Resource-Allocation Result is determined according to confidential information to be added and resource distribution instruction information;Check information and Resource-Allocation Result are sent to client, so that client generates target information according to check information and cipher-text information, target configuration result is determined according to target information and resource distribution instruction information, and target configuration result and Resource-Allocation Result are compared, result is verified.
Description
Technical field
This application involves Internet technical field more particularly to the verification methods and relevant apparatus of a kind of resource distribution.
Background technique
Prize drawing, as a kind of traditional marketing methods, by offer bonus after lottery drawing machine meeting is provided and is got the winning number in a bond or prize come
Attract consumer.Currently, more and more Internet enterprises also start with sweepstake, user is attracted to participate in, is made with increasing
With the user of its product and the attention rate of raising user.For example, the businessman in electric business platform, is inhaled by setting sweepstake
Draw consumer spending.
Currently, prize drawing is mainly based upon the random number that program is calculated on existing line, to determine whether user gets the winning number in a bond,
Or obtain prize.But since all prize drawing processes are executed by background program, some users may pass through implantation
Code or download malicious application mode carry out destruction operation to be directed to background program, alter program be calculated with
Machine number, to change winning results, the fairness for resulting in prize drawing is destroyed.
Summary of the invention
The embodiment of the present application provides the verification method and relevant apparatus of a kind of resource distribution, by by server by ciphertext
Information and resource distribution instruction information are recorded to block chain, and subsequent client is enabled to be based on check information, be stored in area
Cipher-text information and resource distribution on block chain indicate information, counter to push away whether received Resource-Allocation Result is tampered,
Since the cipher-text information stored on block chain and resource distribution instruction information are difficult to be tampered, it can be effectively performed
The verification of Resource-Allocation Result is conducive to the fairness of raising scheme.
The embodiment of the present application first aspect provides a kind of verification method of resource distribution, comprising:
Obtain confidential information to be added and resource distribution instruction information;
Encryption information is treated using check information to be encrypted, and obtains cipher-text information;
Cipher-text information and resource distribution instruction information are recorded to block chain and synchronize storage, so that client passes through
Block chain obtains cipher-text information and resource distribution indicates information;
Resource-Allocation Result is determined according to confidential information to be added and resource distribution instruction information;
Check information and Resource-Allocation Result are sent to client, so that client is according to check information and cipher-text information
Generate target information, target configuration result determined according to target information and resource distribution instruction information, by target configuration result and
Resource-Allocation Result is compared, and is verified result.
The embodiment of the present application second aspect provides a kind of verification method of resource distribution, comprising:
Cipher-text information is obtained by block chain and resource distribution indicates information, wherein block chain is that server believes ciphertext
What breath and resource distribution instruction information obtained after being stored, cipher-text information is that server uses check information to treat encryption information
It is obtained after being encrypted;
Receive check information and Resource-Allocation Result that server is sent;
Target information is generated according to check information and cipher-text information;
Target configuration result is determined according to target information and resource distribution instruction information;
Target configuration result and Resource-Allocation Result are compared, result is verified.
The embodiment of the present application third aspect provides a kind of verifying device of resource distribution, comprising:
Acquiring unit, for obtaining confidential information to be added and resource distribution instruction information;
Encryption unit is encrypted for treating encryption information using check information, obtains cipher-text information;
Storage unit, for recording to block chain and synchronizing storage cipher-text information and resource distribution instruction information, with
So that client obtains cipher-text information by block chain and resource distribution indicates information;
Determination unit, for determining Resource-Allocation Result according to confidential information to be added and resource distribution instruction information;
Transmission unit, for sending check information and Resource-Allocation Result to client, so that client is according to verification
Information and cipher-text information generate target information, determine target configuration result according to target information and resource distribution instruction information, will
Target configuration result and Resource-Allocation Result are compared, and are verified result.
In a kind of possible design, in a kind of implementation of the third aspect of the embodiment of the present application,
Acquiring unit, is also used to obtain the first random number and resource distribution instruction information, and resource distribution instruction information includes
Section set and resource allocation information set, section set includes M section, and resource allocation information set includes that M resource is matched
Confidence breath, M are the integer greater than 1, and section and resource allocation information have unique corresponding relationship, and the first random number is in M area
Between in the range of;
Encryption unit is also used to that the first random number is encrypted using check information, obtains cipher-text information;
Determination unit is also used to determine that target interval, target interval belong to section set according to the first random number;
Determination unit is also used to determine Resource-Allocation Result according to target interval and resource distribution set.
It further include life in a kind of implementation of the third aspect of the embodiment of the present application in a kind of possible design
At unit;
Acquiring unit is also used to obtain random algorithm, random seed and resource distribution instruction information, resource distribution instruction letter
Breath includes section set and resource allocation information set, and section set includes M section, and resource allocation information set includes M
Resource allocation information, section and resource allocation information have unique corresponding relationship;
Encryption unit is also used to that random algorithm and random seed is encrypted using check information, obtains ciphertext
Information, cipher-text information include algorithm cipher-text information and seed cipher-text information;
Generation unit, for generating the second random number according to random algorithm and random seed, the second random number is in M section
In the range of;
Determination unit is also used to determine that target interval, target interval belong to section set according to the second random number;
Determination unit is also used to determine Resource-Allocation Result according to target interval and resource distribution set.
In a kind of possible design, in a kind of implementation of the third aspect of the embodiment of the present application,
Generation unit is also used to generate random key;
Encryption unit is also used to treat encryption information using random key being encrypted, obtains cipher-text information;
Transmission unit is also used to send random key and Resource-Allocation Result to client.
The embodiment of the present application fourth aspect provides a kind of verifying device of resource distribution, comprising:
Acquiring unit, for obtaining cipher-text information and resource distribution instruction information by block chain, wherein block chain is clothes
What business device obtained after being stored cipher-text information and resource distribution instruction information, cipher-text information is server using check information
It treats and obtains after encryption information is encrypted;
Receiving unit, for receiving the check information and Resource-Allocation Result of server transmission;
Generation unit, for generating target information according to check information and cipher-text information;
Determination unit, for determining target configuration result according to target information and resource distribution instruction information;
Comparing unit is verified result for target configuration result and Resource-Allocation Result to be compared.
It further include exhibition in a kind of implementation of the fourth aspect of the embodiment of the present application in a kind of possible design
Show unit;
Receiving unit is also used to receive ciphertext idsplay order and configuration instruction idsplay order;
Display unit, for passing through interactive application interface exhibition in response to ciphertext idsplay order and configuration instruction idsplay order
Show cipher-text information and resource distribution instruction information.
In a kind of possible design, in a kind of implementation of the fourth aspect of the embodiment of the present application,
Receiving unit is also used to receive using enabled instruction;
Receiving unit is also used in response to receiving the Resource-Allocation Result that server is sent using enabled instruction;
Receiving unit is also used to after receiving Resource-Allocation Result, reception result checking command;
Receiving unit is also used to receive the random key that server is sent in response to result checking command.
The 5th aspect of the embodiment of the present application provides a kind of server, comprising: memory, transceiver, processor and bus
System;
Wherein, memory is for storing program;
Processor is used to execute the program in memory, includes the following steps:
Obtain confidential information to be added and resource distribution instruction information;
Encryption information is treated using check information to be encrypted, and obtains cipher-text information;
Cipher-text information and resource distribution instruction information are recorded to block chain and synchronize storage, so that client passes through
Block chain obtains cipher-text information and resource distribution indicates information;
Resource-Allocation Result is determined according to confidential information to be added and resource distribution instruction information;
Check information and Resource-Allocation Result are sent to client, so that client is according to check information and cipher-text information
Generate target information, target configuration result determined according to target information and resource distribution instruction information, by target configuration result and
Resource-Allocation Result is compared, and is verified result;
Bus system is for connecting memory and processor, so that memory and processor are communicated.
The aspect of the embodiment of the present application the 6th provides a kind of terminal device, comprising: memory, transceiver, processor and total
Linear system system;
Wherein, memory is for storing program;
Processor is used to execute the program in memory, includes the following steps:
Cipher-text information is obtained by block chain and resource distribution indicates information, wherein block chain is that server believes ciphertext
What breath and resource distribution instruction information obtained after being stored, cipher-text information is that server uses check information to treat encryption information
It is obtained after being encrypted;
Receive check information and Resource-Allocation Result that server is sent;
Target information is generated according to check information and cipher-text information;
Target configuration result is determined according to target information and resource distribution instruction information;
Target configuration result and Resource-Allocation Result are compared, result is verified;
Bus system is for connecting memory and processor, so that memory and processor are communicated.
The aspect of the embodiment of the present application the 7th provides a kind of computer readable storage medium, in computer readable storage medium
It is stored with instruction, when run on a computer, so that the method that computer executes any of the above-described aspect.
The embodiment of the present application eighth aspect provides a kind of computer program product comprising instruction, when its in computer or
When being run on person's processor, so that the method that computer or processor execute any of the above-described aspect.
As can be seen from the above technical solutions, the embodiment of the present application has the advantage that
The embodiment of the present application provides the verification method and relevant apparatus of a kind of resource distribution, by by server by ciphertext
Information and resource distribution instruction information are recorded to block chain, and subsequent client is enabled to be based on check information, be stored in area
Cipher-text information and resource distribution on block chain indicate information, counter to push away whether received Resource-Allocation Result is tampered,
Since the cipher-text information stored on block chain and resource distribution instruction information are difficult to be tampered, it can be effectively performed
The verification of Resource-Allocation Result is conducive to the fairness of raising scheme.
Detailed description of the invention
Fig. 1 is a configuration diagram of the verifying system of resource distribution in the embodiment of the present application;
Fig. 2 is a schematic diagram of the distributed data collection of decentralization in the embodiment of the present application;
Fig. 3 is a schematic diagram of block chain in the embodiment of the present application;
Fig. 4 is a kind of schematic diagram of the verification method of resource distribution provided by the embodiments of the present application;
Fig. 5 is a kind of flow example figure of the verification method of resource distribution provided by the embodiments of the present application;
Fig. 6 is that a cipher-text information in the embodiment of the present application based on block chain compares flow diagram;
Fig. 7 is a prize drawing interface schematic diagram based on block chain in the embodiment of the present application;
Fig. 8 is another prize drawing interface schematic diagram in the embodiment of the present application based on block chain;
Fig. 9 is another prize drawing interface schematic diagram in the embodiment of the present application based on block chain;
Figure 10 is verifying device one embodiment schematic diagram of resource distribution in the embodiment of the present application;
Figure 11 is verifying device one embodiment schematic diagram of resource distribution in the embodiment of the present application;
Figure 12 is a kind of server architecture schematic diagram provided by the embodiments of the present application;
Figure 13 shows the block diagram of the part-structure of mobile phone relevant to terminal device provided by the embodiments of the present application.
Specific embodiment
The embodiment of the present application provides the verification method and relevant apparatus of a kind of resource distribution, by by server by ciphertext
Information and resource distribution instruction information are recorded to block chain, and subsequent client is enabled to be based on check information, be stored in area
Cipher-text information and resource distribution on block chain indicate information, counter to push away whether received Resource-Allocation Result is tampered,
Since the cipher-text information stored on block chain and resource distribution instruction information are difficult to be tampered, it can be effectively performed
The verification of Resource-Allocation Result is conducive to the fairness of raising scheme.
The description and claims of this application and term " first ", " second ", " third ", " in above-mentioned attached drawing
The (if present)s such as four " are to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should manage
The data that solution uses in this way are interchangeable under appropriate circumstances, so as to embodiments herein described herein can in addition to
Here the sequence other than those of diagram or description is implemented.In addition, term " includes " and " corresponding to " and their any change
Shape, it is intended that cover it is non-exclusive include, for example, containing the process, method of a series of steps or units, system, product
Or equipment those of is not necessarily limited to be clearly listed step or unit, but may include be not clearly listed or for these
The intrinsic other step or units of process, method, product or equipment.
Currently, prize drawing is mainly based upon the random number that program is calculated on existing line, to determine whether user gets the winning number in a bond,
Or obtain prize.But since all prize drawing processes are executed by background program, some users may pass through implantation
Code or download malicious application mode carry out destruction operation to be directed to background program, alter program be calculated with
Machine number, to change winning results, the fairness for resulting in prize drawing is destroyed.In addition, since prize drawing process is by background program
It executes, the transparent procedures degree of prize drawing is lower, and user can only see drawing outcomes, even if prize drawing process has notarization, user is still
Can be easy to suspect whether drawing outcomes are true, if there are secret operations etc., to affect the enthusiasm that user participates in prize drawing
With the application prospect drawn a lottery on line.
It should be understood that the verification method of resource distribution provided by the embodiments of the present application can be applied to based on the number generated at random
According to the scene for carrying out resource distribution, for example, in sweepstake, user practises fraud in order to prevent, can after sweepstake,
The result of sweepstake is verified.Based on above-mentioned scene, the application realized using the mechanism of block chain one it is credible and
Reliable data processing system, specifically can be lottery system.
In order to make it easy to understand, this method is applied to shown in FIG. 1 present applicant proposes a kind of verification method of resource distribution
The verifying system of resource distribution, referring to Fig. 1, Fig. 1 is a framework of the verifying system of resource distribution in the embodiment of the present application
Schematic diagram, as shown, the verifying system in resource distribution includes terminal device A inside block chain, terminal device B, service
Device A and server B further include the terminal device C outside block chain, wherein terminal device A, terminal device B, server A kimonos
Business device B passes through network connection.Assuming that server A is service server, which can be lottery service device, take
Device A be engaged in after generating the random number, cipher-text information is generated using check information, is then synchronized to cipher-text information by block chain
Terminal device A, terminal device B, server B and terminal device C.Server A is according to the random number and reward distribution configuration letter
It ceases and determines drawing outcomes, and send corresponding drawing outcomes to terminal device C, sent out after prize drawing, then to terminal device C
Send check information.So that user can receive check information by terminal device C, encrypted random number is solved
It is close, and and based on after decryption random number and reward distribution be arranged to specific target drawing outcomes.If target is drawn a lottery
As a result consistent with the drawing outcomes got at the beginning, then it represents that prize drawing data are not tampered with, otherwise, it means that prize drawing data can
It can be tampered, so as to report situations or complain to the contact staff of sweepstake.
It should be noted that terminal device include but be not limited only to tablet computer, laptop, palm PC, mobile phone,
Interactive voice equipment and PC (personal computer, PC), herein without limitation.Server can be with independent
The server cluster of server either multiple servers composition is realized.
In order to make it easy to understand, referring to Fig. 2, Fig. 2 is the distributed data collection of decentralization in the embodiment of the present application
One schematic diagram has and goes as shown, block chain (BlockChain) may be considered a distributed data record account
The distributed data collection mode of centralization, either terminal device, server or Cloud Server, are involved in the note of data
Record, and the data being recorded on block chain cannot be deleted and distort.Block chain technology mainly lets on any more in system
A node is contained certain by a string of data blocks (block) using the associated generation of cryptography method in each data block
System all information in time exchanges data, and generates data fingerprint for verifying the validity and link of its information
(chain) next data block.
Based on above-mentioned introduction, referring to Fig. 3, Fig. 3 is a schematic diagram of block chain in the embodiment of the present application, as schemed institute
Show, block T, block T+1 and block T+2 are connected in series on same chain (Chian) according to order of occurrence, are entire accounts
The log recording of this state change.Block records All Activity and state outcome in a period of time, is to current account book state
Primary common recognition.Leading block cryptographic Hash in block is for being associated with previous block, such as the leading block cryptographic Hash of block T+1
For being associated with block T.Transaction in block indicates to lead to the primary change of account book state, for example add once to the operation of account book
Add a record of transferring accounts.Metadata for recording specific transaction content, such as exchange hour stamp, transaction cipher-text information and
Block length etc..
In realization, it assumes initially that there are a distributed data record account book, this account book only allows to add, not permit
Perhaps it deletes.The basic structure of account book bottom is a linear chained list, and chained list is composed in series by block one by one, as shown in figure 3,
Subsequent block records the cryptographic Hash of leading block.New data will be added, it is necessary to be put into a new block.And this block
Whether (and transaction in block) be legal, can quickly be tested out by way of calculating cryptographic Hash.Any maintenance node is all
Possess the record of whole blocks, and can propose a new legal block, however has to pass through certain common recognition mechanism and come pair
The block of final choice is reached an agreement.
In the application, the random number generated at random can be recorded in the transaction of block, and utilize the mechanism of block chain
To realize a credible and reliable lottery system.
In conjunction with above-mentioned introduction, below by from the angle of server, it is situated between to the verification method of resource distribution in the application
It continues, referring to Fig. 4, Fig. 4 is a kind of schematic diagram of the verification method of resource distribution provided by the embodiments of the present application;The application is implemented
Verification method one embodiment of resource distribution includes: in example
401, it obtains confidential information to be added and resource distribution indicates information;
In the present embodiment, before server carries out resource distribution, confidential information to be added is obtained first and resource distribution refers to
Show information.Specifically, resource distribution can be probabilistic type sweepstake and (carry out prize or bonus according to probability distribution
Distribution), including but not limited to turntable, board turning either prize drawing such as horse race lamp form.Wherein, confidential information to be added can be one with
Machine number, resource distribution instruction information then can be reward distribution configuration, pass through random number to be encrypted and reward distribution configuration
It can determine specific reward, i.e. acquisition drawing outcomes.Wherein, random number to be encrypted can be is generated at random by server
, reward distribution configuration is also possible to server generation, or by sweepstake hold personnel it is pre-set and
It stores in the server, herein and is not specifically limited.
402, encryption information is treated using check information to be encrypted, obtain cipher-text information;
In the present embodiment, server can generate check information at random, and using the check information to be encrypted
Random number is encrypted, to obtain cipher-text information (i.e. encrypted random number);In addition, check information be also possible to it is pre-
It is first stored in server, server can randomly select one of check information to treat from check information set
The random number of encryption is encrypted.
403, cipher-text information and resource distribution instruction information are recorded to block chain and synchronizes storage, so that client
Cipher-text information is obtained by block chain and resource distribution indicates information;
In the present embodiment, after random number to be encrypted is encrypted, obtained ciphertext will can be encrypted
Information and resource distribution instruction information are recorded to being stored on block chain.Wherein, cipher-text information be by check information into
Row encryption, resource distribution instruction information can be without encryption, it is also possible to carry out encryption,
In the case where resource distribution instruction information is without encryption, user can just be known before resource distribution starts
Corresponding resource distribution indicates information;And in the case where resource distribution instruction information has carried out encryption, user is in resource
Before configuration starts, it is merely able to obtain encrypted resource distribution instruction information.It is understood that indicating to believe in resource distribution
Breath be specifically reward distribution configuration scene under, user only know reward distribution configuration on drawing outcomes be do not influence (quite
The rule of reward distribution is only known in user), user must be known by corresponding random number, can obtain in conjunction with reward distribution configuration
Know final drawing outcomes, therefore, recording to the resource distribution instruction information on block chain can be by encryption,
It can be and do not encrypt.
Specifically, can be refering to the signal that table 1, table 1 are block where cipher-text information, i.e., cipher-text information is stored in area
Format sample in block chain.
Table 1
Field | Description | Size |
pre-tx-hash | Indicate the verification cryptographic Hash of a transaction full content | 32 bytes |
timestamp | Submit the timestamp of transaction | 4 bytes |
size | The length of this block | 4 bytes |
message | Cipher-text information | Random length |
Transaction-hash | The cryptographic Hash obtained after Hash calculation is carried out to above-mentioned field | 32 bytes |
Content shown in table 1 is only a signal, and " size " field can be set in block, can also be not provided with " size "
The size of field, each field can be defined according to the actual situation.
404, Resource-Allocation Result is determined according to confidential information to be added and resource distribution instruction information;
In the present embodiment, server is after acquiring confidential information to be added and resource distribution instruction information, Ke Yigen
Resource-Allocation Result is obtained according to confidential information to be added and resource distribution instruction information determination;Wherein, according to confidential information to be added and resource
Configuration instruction information determine obtain Resource-Allocation Result can be by cipher-text information and resource distribution instruction information record to area
Block chain synchronize storage before carry out, be also possible to cipher-text information and resource distribution instruction information record to block chain into
It is carried out after the synchronous storage of row, can also be synchronous progress, herein and be not specifically limited.
405, check information and Resource-Allocation Result are sent to client, so that client is according to check information and ciphertext
Information generates target information, determines target configuration result according to target information and resource distribution instruction information, target is configured and is tied
Fruit and Resource-Allocation Result are compared, and are verified result.
In the present embodiment, after server has determined Resource-Allocation Result, resource can be sent to client and matched
It sets as a result, so that client can obtain corresponding Resource-Allocation Result.Generally, resource is sent to client in server
While configuration result, check information can also be sent to client, which can be used in decryption and be recorded in block chain
On cipher-text information, and obtain the corresponding target information of cipher-text information.That is, client get check information it
It afterwards, can be based on check information to being acquired from block chain if user needs to verify Resource-Allocation Result
Cipher-text information is decrypted, and obtains target information, and determine target according to target information and resource distribution instruction information
Target configuration result and Resource-Allocation Result are compared configuration result, if target configuration result and Resource-Allocation Result
Unanimously, then it represents and is verified, the related data of resource distribution is not tampered with;If target configuration result and resource distribution knot
Fruit is inconsistent, then represents verifying and do not pass through, the related data of resource distribution may be distorted, and user can be to relevant money
Source configuration side or relevant contact staff feed back or complain.In addition, server is in addition to sending resource to client simultaneously
Configuration result and check information can also be and first send Resource-Allocation Result to client at the first moment, in resource distribution knot
After fruit is sent, server sends check information to client at the second moment, the first moment usually earlier than the second moment,
That is, client receives check information again after receiving Resource-Allocation Result, then, client uses check information again
The Resource-Allocation Result received is verified.
It is worth noting that, check information is other than it can be used in encrypting confidential information to be added, additionally it is possible to for record
Cipher-text information on to block chain is decrypted;Specifically, which can be symmetric key, which can incite somebody to action
Confidential information to be added is encrypted to cipher-text information, additionally it is possible to which cipher-text information is reduced into the confidential information to be added.In addition, check information is specific
It can also be unsymmetrical key, such as check information is a public key, then carrying out treating encryption information using check information
After encrypting and obtaining cipher-text information, need for the corresponding decruption key of check information to be sent to client, such as believe in verification
The corresponding private key of the public key is sent to client when breath is a public key, so that client can be corresponding according to check information
Decruption key cipher-text information is decrypted.By taking check information is symmetric key as an example, server can using reliably with
Machine number or random string algorithm, obtain a key, and key is the salt (salt) that would generally be used in hashing algorithm.Its
In, in random string algorithm, give a character set, and the length of the given character string generated at random, Ji Kesui
Machine generates character string, for example, given character set is { a ... .., z } and length 5, then random to generate a length be 5
Character string.Server can obtain a random number using random algorithm, for example generate one at random using random () function
Number.Wherein, server can be secure hash algorithm (Secure by the Encryption Algorithm that key pair confidential information to be added is encrypted
Hash Algorithm), it specifically can be SHA-224, SHA-256, SHA-384, SHA-512, SHA-512/224 and SHA-
512/256.The format of data at abstract, so that data volume becomes smaller, is fixed up message or data compression by hash function.It should
Data are upset mixing by function, re-create the fingerprint for being called hashed value (or cryptographic Hash).Hashed value is usually used one short
Random letters and the character string of number composition represent.
Optionally, on the basis of above-mentioned Fig. 4 corresponding each embodiment, resource distribution provided by the embodiments of the present application
In one alternative embodiment of verification method, confidential information to be added and resource distribution instruction information are obtained, comprising:
The first random number and resource distribution instruction information are obtained, resource distribution instruction information includes that Interval Set conjunction and resource are matched
Information aggregate is set, section set includes M section, and resource allocation information set includes M resource allocation information, and M is greater than 1
Integer, section and resource allocation information have unique corresponding relationship, and the first random number is in the range of M section;
Encryption information is treated using check information to be encrypted, and obtains cipher-text information, comprising:
The first random number is encrypted using check information, obtains cipher-text information;
Resource-Allocation Result is determined according to confidential information to be added and resource distribution instruction information, comprising:
Determine that target interval, target interval belong to section set according to the first random number;
According to target interval and resource distribution set, Resource-Allocation Result is determined.
In the present embodiment, server can generate first random number at random, which is used to combine money
Source configuration instruction information obtains Resource-Allocation Result.Wherein, resource distribution instruction information can specifically include by M section structure
At section combine and the resource allocation information set that is made of M resource allocation information, each of section is gathered area
Between with a resource allocation information of resource allocation information set have unique corresponding relationship.That is, generating the
After one random number, it can be dropped into the target interval with the target interval in determination section set, the first random number, then again
According to the unique corresponding relation between section and resource allocation information, corresponding resource distribution letter can be determined according to target interval
Breath.
For example, it is assumed that in sweepstake, there are four reward distribution configuration (i.e. resource distribution instruction information) specifically includes
Section, respectively section 1 [0,0.1), section 2 [0.1,0.3), section 3 [0.3,0.6) and section 4 [0.6,1.0], wherein area
Between 1 [0,0.1) it is corresponding reward be the first prize, section 2 [0.1,0.3) it is corresponding reward then be second prize, section 3 [0.3,
0.6) corresponding reward is third prize, and section 4 [0.6,1.0] corresponding reward is then consolation prize.Obviously, section 1 to section 4
It is then four sections in the set of section, and the first prize, second prize, third prize and consolation prize are then each in gathering with section
The corresponding resource allocation information in section.Therefore, server can generate a random number at random between section [0,1], be based on
The numerical value of random number can determine which section is random number drop into, then the section fallen into based on random number is determined and corresponded to
Reward.For example, when server random number generated is 0.5, random number 0.5 drop into section 3 [0.3,0.6) in, i.e., pair
The reward answered is third prize.
Optionally, on the basis of above-mentioned Fig. 4 corresponding each embodiment, resource distribution provided by the embodiments of the present application
In one alternative embodiment of verification method, confidential information to be added and resource distribution instruction information are obtained, comprising:
It obtains random algorithm, random seed and resource distribution and indicates that information, resource distribution instruction information include that Interval Set closes
With resource allocation information set, section set includes M section, and resource allocation information set includes M resource allocation information, area
Between with resource allocation information have unique corresponding relationship;
Encryption information is treated using check information to be encrypted, and obtains cipher-text information, comprising:
Random algorithm and random seed are encrypted using check information, obtain cipher-text information, cipher-text information packet
Include algorithm cipher-text information and seed cipher-text information;
Resource-Allocation Result is determined according to confidential information to be added and resource distribution instruction information, comprising:
The second random number is generated according to random algorithm and random seed, the second random number is in the range of M section;
Determine that target interval, target interval belong to section set according to the second random number;
According to target interval and resource distribution set, Resource-Allocation Result is determined.
In the present embodiment, a random number can be generated using random seed and random algorithm, and using should be with
Machine number determines Resource-Allocation Result.Wherein, random algorithm, which can be, is pre-stored in server, including but not limited to numerical value
Probabilistic algorithm, Las Vegas algorithm, Monte Carlo EGS4 method or Sherwood algorithm etc..Random seed then be for combine with
The seed of machine algorithm generation random number, it is believed that be the initial value or initiation sequence for generating random number.
Equally, when user needs whether correct by client validation Resource-Allocation Result, user can pass through client
End first obtains corresponding algorithm cipher-text information and seed cipher-text information from block chain, and based on check information to algorithm ciphertext
Information and seed cipher-text information are decrypted, and random algorithm and random seed are obtained, then according to random seed and random algorithm
A random number is generated, target configuration result is determined according to the random number, finally compared target configuration result again and receive
Whether Resource-Allocation Result is consistent, to complete the verifying of resource distribution.
It is understood that since the corresponding algorithm cipher-text information of random algorithm and random is disclosed on block chain in advance
The corresponding seed cipher-text information of seed and resource distribution indicate information, user can based on the random algorithm that decryption obtains and
Random seed determines Resource-Allocation Result, and thus, there is no the space for having black-box operation during resource distribution, resource distributions
The result is that will not change, it can guarantee the disclosure and justice of resource distribution in this way.
Optionally, on the basis of above-mentioned Fig. 4 corresponding each embodiment, resource distribution provided by the embodiments of the present application
In one alternative embodiment of verification method, encryption information is treated using check information and is encrypted, cipher-text information is obtained,
Include:
Generate random key;
Encryption information is treated using random key to be encrypted, and obtains cipher-text information;
Check information and Resource-Allocation Result are sent to client, comprising:
Random key and Resource-Allocation Result are sent to client.
In the present embodiment, server can generate a random key at random and carry out at encryption to treat encryption information
Reason, and while sending Resource-Allocation Result to client or later, the random key is sent to client, so that
Client can be decrypted cipher-text information based on the random key.Wherein, which specifically can be one symmetrically
Key is based on the random key, can either treat encryption information and be encrypted, obtain cipher-text information;It also can be to ciphertext
Information is decrypted, and obtains the corresponding solution confidential information of cipher-text information.
In conjunction with above-mentioned introduction, below by from the angle of client, to the verification method of resource distribution in the embodiment of the present application
It is introduced, referring to Fig. 5, Fig. 5 is a kind of flow example figure of the verification method of resource distribution provided by the embodiments of the present application;
Verification method one embodiment of resource distribution in the embodiment of the present application includes:
501, cipher-text information is obtained by block chain and resource distribution indicates information, wherein block chain is that server will be close
What literary information and resource distribution instruction information obtained after being stored, cipher-text information is that server uses check information to be encrypted
What information obtained after being encrypted;
In the present embodiment, after server records cipher-text information and resource distribution instruction information to block chain,
Client can obtain cipher-text information and resource distribution instruction information on block chain.Specifically, cipher-text information can be service
What device was obtained after random number is encrypted using the random key generated at random;Cipher-text information is also possible to include to calculate
Method cipher-text information and seed cipher-text information, wherein algorithm cipher-text information is that server carries out random algorithm using random key
What encryption obtained, seed cipher-text information is that server is encrypted to obtain using random key to random algorithm, random algorithm
With random seed for obtaining random number.
502, check information and Resource-Allocation Result that server is sent are received;
In the present embodiment, the Resource-Allocation Result that client can be sent in the first reception server, then exists
The check information that second reception server is sent, wherein the first moment usually will be earlier than the second moment, that is to say, that visitor
Family end receives check information again after receiving Resource-Allocation Result, in order to which client uses check information to the money received again
Source configuration result is verified.
503, target information is generated according to check information and cipher-text information;
In the present embodiment, client is receiving the check information of server transmission and is getting from block chain close
After literary information, cipher-text information can be decrypted using check information, obtain target information.
504, target configuration result is determined according to target information and resource distribution instruction information;
In the present embodiment, in the case where confidential information to be added is random number, cipher-text information is carried out using check information
The target information that decryption processing obtains equally is a random number, and therefore, the random number and resource distribution obtained according to decryption refers to
Show that information can determine target configuration result.In the case where confidential information to be added is random algorithm and random seed, using verification
Information is then random algorithm and random seed to the target information that cipher-text information is decrypted, and is needed at this time first according to random
Algorithm and random seed obtain corresponding random number, determine target configuration knot further according to the random number and resource distribution instruction information
Fruit.
505, target configuration result and Resource-Allocation Result are compared, are verified result.
It in the present embodiment, can be by target configuration result kimonos after client determination obtains target configuration result
The Resource-Allocation Result that business device is sent is compared, if target configuration result is consistent with Resource-Allocation Result, represents resource
Configuration result is not tampered with, and Resource-Allocation Result is correct;If target configuration result and Resource-Allocation Result are inconsistent,
Then representing Resource-Allocation Result may have been tampered with, and Resource-Allocation Result is wrong.
In the embodiment of the present application, client can based on server send check information, be stored on block chain
Cipher-text information and resource distribution indicate information, counter to push away whether received Resource-Allocation Result is tampered, due to prior
Cipher-text information and resource distribution instruction information are disclosed on block chain, and the cipher-text information and resource that store on block chain are matched
It sets instruction information to be difficult to be tampered, therefore, the verification of Resource-Allocation Result can be effectively performed, there is no in active procedure
The space of black-box operation advantageously ensures that the disclosure, just, fair of resource distribution.
Optionally, on the basis of above-mentioned Fig. 5 corresponding each embodiment, resource distribution provided by the embodiments of the present application
In one alternative embodiment of verification method, after obtaining cipher-text information and resource distribution instruction information by block chain, method
Further include:
Receive ciphertext idsplay order and configuration instruction idsplay order;
In response to ciphertext idsplay order and configuration instruction idsplay order, cipher-text information and money are shown by interactive application interface
Source configuration instruction information.
In the present embodiment, before Resource-Allocation Result announcement, if client has got ciphertext letter by block chain
Breath and resource distribution indicate information, then the ciphertext idsplay order and configuration instruction idsplay order of available user's triggering are rung
It should show that cipher-text information and resource distribution indicate by interactive application interface in ciphertext idsplay order and configuration instruction idsplay order
Information enables a user to view corresponding cipher-text information and resource distribution instruction information.
Optionally, on the basis of above-mentioned Fig. 5 corresponding each embodiment, resource distribution provided by the embodiments of the present application
In one alternative embodiment of verification method, check information and Resource-Allocation Result that server is sent are received, comprising:
It receives and applies enabled instruction;
In response to applying enabled instruction, the Resource-Allocation Result that server is sent is received;
After receiving Resource-Allocation Result, reception result checking command;
In response to result checking command, the random key that server is sent is received.
In the present embodiment, when user is after client is triggered using enabled instruction, client can be in response to answering
With enabled instruction, Resource-Allocation Result is received from server, and is shown on the interactive application interface of client.Right
After Resource-Allocation Result is shown, if user needs to verify Resource-Allocation Result, user can trigger result school
Instruction is tested, client end response receives random key in the result checking command, from server, and using the random key to area
Cipher-text information on block chain is decrypted, and obtains target information, and based on target information and resource distribution instruction information to money
Source configuration result is verified.
In order to make it easy to understand, below with reference to specific example to the authentication of resource distribution provided by the embodiments of the present application
Method is described in detail.Referring to Fig. 6, Fig. 6 is that a cipher-text information based on block chain compares convection current in the embodiment of the present application
Journey schematic diagram.It is as shown in the figure:
S1, server after generating the random number, encrypt random number with check information and are stored in block chain,
Wherein, pre-set prize drawing distribution configuration is also stored in block chain;
S2, the player for participating in prize drawing may be implemented to get encrypted random number from block chain and prize drawing distribution is matched
It sets;
S3, after prize drawing, i.e., after drawing outcomes are announced, player can be with the check information that server provides to adding
Random number after close is decrypted, and obtains target information, is then corresponded to again based on the target information and prize drawing distribution configuration
Target drawing outcomes, finally target drawing outcomes and practical drawing outcomes are compared, if two drawing outcomes are consistent,
Then representing drawing outcomes is correctly, not to be maliciously tampered, if two drawing outcomes are inconsistent, it is wrong for representing drawing outcomes
Accidentally, it has been maliciously tampered.
Referring to Fig. 7, Fig. 7 is a prize drawing interface schematic diagram based on block chain in the embodiment of the present application;Such as Fig. 7 institute
Show, what (a) was indicated is the main interface of prize drawing in Fig. 7, and user can be taken out in the main interface of prize drawing by spending integral
Prize, the form of prize drawing is specially turntable form, is divided into four first prize, second prize, third prize and consolation prize awards;Fig. 7
In (b) indicate is the prize drawing interface shown after user clicks " spend 20 integral take out primary " button, wherein the prize drawing
Showing interface is before formally being drawn a lottery, if needs to announce cipher-text information and prize drawing distribution configuration in advance, user can be with
" announcing cipher-text information and prize drawing distribution configuration in advance " and " does not have to announce, directly open pumping!" selected between two options
It takes.
Referring to Fig. 8, Fig. 8 is another prize drawing interface schematic diagram in the embodiment of the present application based on block chain;In Fig. 8
(a) what is indicated is user " announcing cipher-text information and prize drawing distribution configuration in advance " and " does not have to announce, directly open pumping!" two
Option is chosen and clicks first button;That (b) is indicated in Fig. 8 is user click " announce in advance cipher-text information and
After prize drawing distribution configuration ", corresponding cipher-text information and reward distribution configuration are shown on prize drawing interface.
Referring to Fig. 9, Fig. 9 is another prize drawing interface schematic diagram in the embodiment of the present application based on block chain;In Fig. 9
(a) it indicates, after prize drawing terminates, user can be between " verifying drawing outcomes " and " continuing to draw a lottery " two options
It is selected;(b) is indicated in Fig. 9, and after user has selected " verifying drawing outcomes " option, prize drawing interface can be shown
Client from the received checking information of server, and user can by click " key verifying " option in current interface come
Carry out the verifying of drawing outcomes;(c) is indicated in Fig. 9, and user is clicking " key verifying " on interface, triggering verifying behaviour
After work, the shown verification result on prize drawing interface, verification result is specially to be verified.
The verifying device of the resource distribution in the application is described in detail below, referring to Fig. 10, Figure 10 is this Shen
Please in embodiment resource distribution verifying device one embodiment schematic diagram, the verifying device 100 of resource distribution includes:
Acquiring unit 1001, for obtaining confidential information to be added and resource distribution instruction information;
Encryption unit 1002 is encrypted for treating encryption information using check information, obtains cipher-text information;
Storage unit 1003, for recording to block chain to synchronize and deposit cipher-text information and resource distribution instruction information
Storage, so that client obtains cipher-text information by block chain and resource distribution indicates information;
Determination unit 1004, for determining Resource-Allocation Result according to confidential information to be added and resource distribution instruction information;
Transmission unit 1005, for sending check information and Resource-Allocation Result to client so that client according to
Check information and cipher-text information generate target information, determine target configuration knot according to target information and resource distribution instruction information
Target configuration result and Resource-Allocation Result are compared, are verified result by fruit.
Optionally, on the basis of Figure 10, one of the verifying device 100 of resource distribution provided by the embodiments of the present application can
It selects in embodiment,
Acquiring unit 1001, is also used to obtain the first random number and resource distribution instruction information, and resource distribution indicates information
Including section set and resource allocation information set, section set includes M section, and resource allocation information set includes M money
Source configuration information, M are the integer greater than 1, and section and resource allocation information have unique corresponding relationship, and the first random number is in M
In the range of a section;
Encryption unit 1002 is also used to that the first random number is encrypted using check information, obtains cipher-text information;
Determination unit 1004 is also used to determine that target interval, target interval belong to section set according to the first random number;
Determination unit 1004 is also used to determine Resource-Allocation Result according to target interval and resource distribution set.
Optionally, on the basis of Figure 10, one of the verifying device 100 of resource distribution provided by the embodiments of the present application can
It selects in embodiment, further includes generation unit 1006;
Acquiring unit 1001 is also used to obtain random algorithm, random seed and resource distribution instruction information, resource distribution and refers to
Show that information includes Interval Set conjunction and resource allocation information set, section set includes M section, and resource allocation information set includes
M resource allocation information, section and resource allocation information have unique corresponding relationship;
Encryption unit 1002 is also used to that random algorithm and random seed is encrypted using check information, obtained
Cipher-text information, cipher-text information include algorithm cipher-text information and seed cipher-text information;
Generation unit 1006, for generating the second random number according to random algorithm and random seed, the second random number is at M
In the range of section;
Determination unit 1004 is also used to determine that target interval, target interval belong to section set according to the second random number;
Determination unit 1004 is also used to determine Resource-Allocation Result according to target interval and resource distribution set.
Optionally, on the basis of Figure 10, one of the verifying device 100 of resource distribution provided by the embodiments of the present application can
It selects in embodiment,
Generation unit 1006 is also used to generate random key;
Encryption unit 1002 is also used to treat encryption information using random key being encrypted, obtains cipher-text information;
Transmission unit 1005 is also used to send random key and Resource-Allocation Result to client.
The verifying device of the resource distribution in the application is described in detail below, please refers to Figure 11, Figure 11 is this Shen
Please in embodiment resource distribution verifying device one embodiment schematic diagram, the verifying device 110 of resource distribution includes:
Acquiring unit 1101, for obtaining cipher-text information and resource distribution instruction information by block chain, wherein block chain
It is to be obtained after server is stored cipher-text information and resource distribution instruction information, cipher-text information is server using verification
Information, which is treated, to be obtained after encryption information is encrypted;
Receiving unit 1102, for receiving the check information and Resource-Allocation Result of server transmission;
Generation unit 1103, for generating target information according to check information and cipher-text information;
Determination unit 1104, for determining target configuration result according to target information and resource distribution instruction information;
Comparing unit 1105 is verified result for target configuration result and Resource-Allocation Result to be compared.
Optionally, on the basis of Figure 11, one of the verifying device 110 of resource distribution provided by the embodiments of the present application can
It selects in embodiment, further includes display unit 1106;
Receiving unit 1102 is also used to receive ciphertext idsplay order and configuration instruction idsplay order;
Display unit 1106 is used in response to ciphertext idsplay order and configuration instruction idsplay order, by interactive application circle
Face shows that cipher-text information and resource distribution indicate information.
Optionally, on the basis of Figure 11, one of the verifying device 110 of resource distribution provided by the embodiments of the present application can
It selects in embodiment,
Receiving unit 1102 is also used to receive using enabled instruction;
Receiving unit 1102 is also used in response to receiving the Resource-Allocation Result that server is sent using enabled instruction;
Receiving unit 1102, is also used to after receiving Resource-Allocation Result, reception result checking command;
Receiving unit 1102 is also used to receive the random key that server is sent in response to result checking command.
Figure 12 is a kind of server architecture schematic diagram provided by the embodiments of the present application, which can be because of configuration or property
Energy is different and generates bigger difference, may include one or more central processing units (central processing
Units, CPU) 1222 (for example, one or more processors) and memory 1232, one or more storage applications
The storage medium 1230 (such as one or more mass memory units) of program 1242 or data 1244.Wherein, memory
1232 and storage medium 1230 can be of short duration storage or persistent storage.The program for being stored in storage medium 1230 may include one
A or more than one module (diagram does not mark), each module may include to the series of instructions operation in server.More into
One step, central processing unit 1222 can be set to communicate with storage medium 1230, execute storage medium on server 1200
Series of instructions operation in 1230.
Server 1200 can also include one or more power supplys 1226, one or more wired or wireless nets
Network interface 1250, one or more input/output interfaces 1258, and/or, one or more operating systems 1241, example
Such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM etc..
The step as performed by server can be based on server architecture shown in the Figure 12 in above-described embodiment.
In the embodiment of the present application, CPU 1222 included by the server is also with the following functions:
Obtain confidential information to be added and resource distribution instruction information;
Encryption information is treated using check information to be encrypted, and obtains cipher-text information;
Cipher-text information and resource distribution instruction information are recorded to block chain and synchronize storage, so that client passes through
Block chain obtains cipher-text information and resource distribution indicates information;
Resource-Allocation Result is determined according to confidential information to be added and resource distribution instruction information;
Check information and Resource-Allocation Result are sent to client, so that client is according to check information and cipher-text information
Generate target information, target configuration result determined according to target information and resource distribution instruction information, by target configuration result and
Resource-Allocation Result is compared, and is verified result.
The embodiment of the present application also provides another clients, as shown in figure 13, for ease of description, illustrate only and this
Apply for the relevant part of embodiment, it is disclosed by specific technical details, please refer to the embodiment of the present application method part.The terminal is set
It include mobile phone, tablet computer, personal digital assistant (Personal Digital Assistant, PDA), sale end for that can be
Any terminal devices such as end equipment (Point of Sales, POS), vehicle-mounted computer, by taking terminal device is mobile phone as an example:
Figure 13 shows the block diagram of the part-structure of mobile phone relevant to terminal device provided by the embodiments of the present application.Ginseng
Figure 13 is examined, mobile phone includes: radio frequency (Radio Frequency, RF) circuit 1310, memory 1320, input unit 1330, display
Unit 1340, sensor 1350, voicefrequency circuit 1360, Wireless Fidelity (wireless fidelity, WiFi) module 1370, place
Manage the components such as device 1380 and power supply 1390.It will be understood by those skilled in the art that the not structure of handset structure shown in Figure 13
The restriction of pairs of mobile phone may include perhaps combining certain components or different components than illustrating more or fewer components
Arrangement.
It is specifically introduced below with reference to each component parts of the Figure 13 to mobile phone:
RF circuit 1310 can be used for receiving and sending messages or communication process in, signal sends and receivees, particularly, by base station
After downlink information receives, handled to processor 1380;In addition, the data for designing uplink are sent to base station.In general, RF circuit
1310 include but is not limited to antenna, at least one amplifier, transceiver, coupler, low-noise amplifier (Low Noise
Amplifier, LNA), duplexer etc..In addition, RF circuit 1310 can also be logical with network and other equipment by wireless communication
Letter.Any communication standard or agreement, including but not limited to global system for mobile communications (Global can be used in above-mentioned wireless communication
System of Mobile communication, GSM), general packet radio service (General Packet Radio
Service, GPRS), CDMA (Code Division Multiple Access, CDMA), wideband code division multiple access
(Wideband Code Division Multiple Access, WCDMA), long term evolution (Long Term Evolution,
LTE), Email, short message service (Short Messaging Service, SMS) etc..
Memory 1320 can be used for storing software program and module, and processor 1380 is stored in memory by operation
1320 software program and module, thereby executing the various function application and data processing of mobile phone.Memory 1320 can be led
It to include storing program area and storage data area, wherein storing program area can be needed for storage program area, at least one function
Application program (such as sound-playing function, image player function etc.) etc.;Storage data area, which can be stored, uses institute according to mobile phone
Data (such as audio data, phone directory etc.) of creation etc..In addition, memory 1320 may include high random access storage
Device, can also include nonvolatile memory, and a for example, at least disk memory, flush memory device or other volatibility are solid
State memory device.
Input unit 1330 can be used for receiving the number or character information of input, and generate with the user setting of mobile phone with
And the related key signals input of function control.Specifically, input unit 1330 may include touch panel 1331 and other inputs
Equipment 1332.Touch panel 1331, also referred to as touch screen collect touch operation (such as the user of user on it or nearby
Use the behaviour of any suitable object or attachment such as finger, stylus on touch panel 1331 or near touch panel 1331
Make), and corresponding attachment device is driven according to preset formula.Optionally, touch panel 1331 may include touch detection
Two parts of device and touch controller.Wherein, the touch orientation of touch detecting apparatus detection user, and detect touch operation band
The signal come, transmits a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and by it
It is converted into contact coordinate, then gives processor 1380, and order that processor 1380 is sent can be received and executed.In addition,
Touch panel 1331 can be realized using multiple types such as resistance-type, condenser type, infrared ray and surface acoustic waves.In addition to touch surface
Plate 1331, input unit 1330 can also include other input equipments 1332.Specifically, other input equipments 1332 may include
But in being not limited to physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, operating stick etc.
It is one or more.
Display unit 1340 can be used for showing information input by user or be supplied to user information and mobile phone it is each
Kind menu.Display unit 1340 may include display panel 1341, optionally, can use liquid crystal display (Liquid
CrystalDisplay, LCD), the forms such as Organic Light Emitting Diode (Organic Light-Emitting Diode, OLED) come
Configure display panel 1341.Further, touch panel 1331 can cover display panel 1341, when touch panel 1331 detects
After touch operation on it or nearby, processor 1380 is sent to determine the type of touch event, is followed by subsequent processing device 1380
Corresponding visual output is provided on display panel 1341 according to the type of touch event.Although in Figure 13, touch panel
1331 and display panel 1341 are the input and input function for realizing mobile phone as two independent components, but in certain realities
Apply in example, can be integrated by touch panel 1331 and display panel 1341 and that realizes mobile phone output and input function.
Mobile phone may also include at least one sensor 1350, such as optical sensor, motion sensor and other sensors.
Specifically, optical sensor may include ambient light sensor and proximity sensor, wherein ambient light sensor can be according to ambient light
Light and shade adjust the brightness of display panel 1341, proximity sensor can close display panel when mobile phone is moved in one's ear
1341 and/or backlight.As a kind of motion sensor, accelerometer sensor can detect in all directions (generally three axis) and add
The size of speed can detect that size and the direction of gravity when static, can be used to identify application (such as the horizontal/vertical screen of mobile phone posture
Switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap) etc.;Also as mobile phone
The other sensors such as configurable gyroscope, barometer, hygrometer, thermometer, infrared sensor, details are not described herein.
Voicefrequency circuit 1360, loudspeaker 1361, microphone 1362 can provide the audio interface between user and mobile phone.Audio
Electric signal after the audio data received conversion can be transferred to loudspeaker 1361, be converted by loudspeaker 1361 by circuit 1360
For voice signal output;On the other hand, the voice signal of collection is converted to electric signal by microphone 1362, by voicefrequency circuit 1360
Audio data is converted to after reception, then by after the processing of audio data output processor 1380, through RF circuit 1310 to be sent to ratio
Such as another mobile phone, or audio data is exported to memory 1320 to be further processed.
WiFi belongs to short range wireless transmission technology, and mobile phone can help user's transceiver electronics postal by WiFi module 1370
Part, browsing webpage and access streaming video etc., it provides wireless broadband internet access for user.Although Figure 13 is shown
WiFi module 1370, but it is understood that, and it is not belonging to must be configured into for mobile phone, it can according to need do not changing completely
Become in the range of the essence of invention and omits.
Processor 1380 is the control centre of mobile phone, using the various pieces of various interfaces and connection whole mobile phone,
By running or execute the software program and/or module that are stored in memory 1320, and calls and be stored in memory 1320
Interior data execute the various functions and processing data of mobile phone, to carry out integral monitoring to mobile phone.Optionally, processor
1380 may include one or more processing units;Optionally, processor 1380 can integrate application processor and modulation /demodulation processing
Device, wherein the main processing operation system of application processor, user interface and application program etc., modem processor is mainly located
Reason wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 1380.
Mobile phone further includes the power supply 1390 (such as battery) powered to all parts, and optionally, power supply can pass through power supply
Management system and processor 1380 are logically contiguous, to realize management charging, electric discharge and power consumption pipe by power-supply management system
The functions such as reason.
Although being not shown, mobile phone can also include camera, bluetooth module etc., and details are not described herein.
In the embodiment of the present application, processor 1080 included by the terminal device is also with the following functions:
Cipher-text information is obtained by block chain and resource distribution indicates information, wherein block chain is that server believes ciphertext
What breath and resource distribution instruction information obtained after being stored, cipher-text information is that server uses check information to treat encryption information
It is obtained after being encrypted;
Receive check information and Resource-Allocation Result that server is sent;
Target information is generated according to check information and cipher-text information;
Target configuration result is determined according to target information and resource distribution instruction information;
Target configuration result and Resource-Allocation Result are compared, result is verified.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed system, device and method can be with
It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit
It divides, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components
It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or
The mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, the indirect coupling of device or unit
It closes or communicates to connect, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product
When, it can store in a computer readable storage medium.Based on this understanding, the technical solution of the application is substantially
The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words
It embodies, which is stored in a storage medium, including some instructions are used so that a computer
Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the application
Portion or part steps.And storage medium above-mentioned include: USB flash disk, mobile hard disk, read-only memory (read-only memory,
ROM), random access memory (random access memory, RAM), magnetic or disk etc. are various can store program
The medium of code.
The above, above embodiments are only to illustrate the technical solution of the application, rather than its limitations;Although referring to before
Embodiment is stated the application is described in detail, those skilled in the art should understand that: it still can be to preceding
Technical solution documented by each embodiment is stated to modify or equivalent replacement of some of the technical features;And these
It modifies or replaces, the spirit and scope of each embodiment technical solution of the application that it does not separate the essence of the corresponding technical solution.
Claims (10)
1. a kind of verification method of resource distribution characterized by comprising
Obtain confidential information to be added and resource distribution instruction information;
The confidential information to be added is encrypted using check information, obtains cipher-text information;
The cipher-text information and resource distribution instruction information are recorded to block chain and synchronize storage, so that client
The cipher-text information is obtained by the block chain and the resource distribution indicates information;
Resource-Allocation Result is determined according to the confidential information to be added and resource distribution instruction information;
The check information and the Resource-Allocation Result are sent to the client, so that the client is according to the school
It tests information and the cipher-text information generates target information, mesh is determined according to the target information and resource distribution instruction information
Standard configuration is set as a result, the target configuration result and the Resource-Allocation Result are compared, and result is verified.
2. the verification method of resource distribution according to claim 1, which is characterized in that described to obtain confidential information to be added and money
Source configuration instruction information, comprising:
The first random number and resource distribution instruction information are obtained, the resource distribution instruction information includes that Interval Set conjunction and resource are matched
Information aggregate is set, the section set includes M section, and the resource allocation information set includes M resource allocation information, institute
Stating M is the integer greater than 1, and the section and the resource allocation information have unique corresponding relationship, first random number
In the range of the M section;
It is described that the confidential information to be added is encrypted using check information, obtain cipher-text information, comprising:
First random number is encrypted using check information, obtains cipher-text information;
It is described that Resource-Allocation Result is determined according to the confidential information to be added and resource distribution instruction information, comprising:
Determine that target interval, the target interval belong to the section set according to first random number;
According to the target interval and the resource distribution set, the determining Resource-Allocation Result.
3. the verification method of resource distribution according to claim 1, which is characterized in that described to obtain confidential information to be added and money
Source configuration instruction information, comprising:
It obtains random algorithm, random seed and resource distribution and indicates that information, the resource distribution instruction information include that Interval Set closes
With resource allocation information set, the section set includes M section, and the resource allocation information set includes that M resource is matched
Confidence breath, the section and the resource allocation information have unique corresponding relationship;
It is described that the confidential information to be added is encrypted using check information, obtain cipher-text information, comprising:
The random algorithm and the random seed are encrypted using check information, obtain the cipher-text information, institute
Stating cipher-text information includes algorithm cipher-text information and seed cipher-text information;
It is described that Resource-Allocation Result is determined according to the confidential information to be added and resource distribution instruction information, comprising:
The second random number is generated according to the random algorithm and the random seed, second random number is in the M section
In the range of;
Determine that target interval, the target interval belong to the section set according to second random number;
According to the target interval and the resource distribution set, the determining Resource-Allocation Result.
4. the verification method of resource distribution according to claim 1, which is characterized in that described to use check information to described
Confidential information to be added is encrypted, and obtains cipher-text information, comprising:
Generate random key;
The confidential information to be added is encrypted using the random key, obtains cipher-text information;
The check information and the Resource-Allocation Result are sent to the client, comprising:
The random key and the Resource-Allocation Result are sent to the client.
5. a kind of verification method of resource distribution characterized by comprising
Cipher-text information is obtained by block chain and resource distribution indicates information, wherein the block chain is that server will be described close
What literary information and resource distribution instruction information obtained after being stored, the cipher-text information is the server using verification
Information, which is treated, to be obtained after encryption information is encrypted;
Receive the check information and the Resource-Allocation Result that server is sent;
Target information is generated according to the check information and the cipher-text information;
Target configuration result is determined according to the target information and resource distribution instruction information;
The target configuration result and the Resource-Allocation Result are compared, result is verified.
6. the verification method of resource distribution according to claim 5, which is characterized in that described to obtain ciphertext by block chain
After information and resource distribution instruction information, the method also includes:
Receive ciphertext idsplay order and configuration instruction idsplay order;
In response to the ciphertext idsplay order and the configuration instruction idsplay order, the ciphertext is shown by interactive application interface
Information and the resource distribution indicate information.
7. the verification method of resource distribution according to claim 5, which is characterized in that the institute for receiving server and sending
State check information and the Resource-Allocation Result, comprising:
It receives and applies enabled instruction;
Enabled instruction is applied in response to described, receives the Resource-Allocation Result that the server is sent;
After receiving the Resource-Allocation Result, reception result checking command;
In response to the result checking command, the random key that server is sent is received.
8. a kind of verifying device of resource distribution characterized by comprising
Acquiring unit, for obtaining confidential information to be added and resource distribution instruction information;
Encryption unit obtains cipher-text information for the confidential information to be added to be encrypted using check information;
Storage unit, for recording to block chain to synchronize and deposit the cipher-text information and resource distribution instruction information
Storage, so that client obtains the cipher-text information by the block chain and the resource distribution indicates information;
Determination unit, for determining Resource-Allocation Result according to the confidential information to be added and resource distribution instruction information;
Transmission unit, for sending the check information and the Resource-Allocation Result to the client, so that the visitor
Family end generates target information according to the check information and the cipher-text information, according to the target information and the resource distribution
Instruction information determines target configuration result, and the target configuration result and the Resource-Allocation Result are compared, tested
Demonstrate,prove result.
9. a kind of verifying device of resource distribution characterized by comprising
Acquiring unit, for obtaining cipher-text information and resource distribution instruction information by block chain, wherein the block chain is clothes
What business device obtained after being stored the cipher-text information and resource distribution instruction information, the cipher-text information is the clothes
Business device is treated using check information and is obtained after encryption information is encrypted;
Receiving unit, for receiving the check information and the Resource-Allocation Result of server transmission;
Generation unit, for generating target information according to the check information and the cipher-text information;
Determination unit, for determining target configuration result according to the target information and resource distribution instruction information;
Comparing unit is verified result for the target configuration result and the Resource-Allocation Result to be compared.
10. a kind of server characterized by comprising memory, transceiver, processor and bus system;
Wherein, the memory is for storing program;
The processor is used to execute the program in the memory, includes the following steps:
Obtain confidential information to be added and resource distribution instruction information;
The confidential information to be added is encrypted using check information, obtains cipher-text information;
The cipher-text information and resource distribution instruction information are recorded to block chain and synchronize storage, so that client
The cipher-text information is obtained by the block chain and the resource distribution indicates information;
Resource-Allocation Result is determined according to the confidential information to be added and resource distribution instruction information;
The check information and the Resource-Allocation Result are sent to the client, so that the client is according to the school
It tests information and the cipher-text information generates target information, mesh is determined according to the target information and resource distribution instruction information
Standard configuration is set as a result, the target configuration result and the Resource-Allocation Result are compared, and result is verified;
The bus system is for connecting the memory and the processor, so that the memory and the processor
It is communicated.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910780153.5A CN110474918B (en) | 2019-08-22 | 2019-08-22 | Resource allocation verification method and related device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910780153.5A CN110474918B (en) | 2019-08-22 | 2019-08-22 | Resource allocation verification method and related device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110474918A true CN110474918A (en) | 2019-11-19 |
CN110474918B CN110474918B (en) | 2022-06-07 |
Family
ID=68513408
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910780153.5A Active CN110474918B (en) | 2019-08-22 | 2019-08-22 | Resource allocation verification method and related device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110474918B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111259019A (en) * | 2020-01-09 | 2020-06-09 | 腾讯科技(深圳)有限公司 | Resource allocation method, device, equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109644136A (en) * | 2016-09-27 | 2019-04-16 | 英特尔公司 | The believable vehicle remote information processing analyzed using block chain data |
CN109636998A (en) * | 2019-01-09 | 2019-04-16 | 山东浪潮质量链科技有限公司 | A kind of method and device drawn a lottery using block chain |
CN109672693A (en) * | 2019-02-02 | 2019-04-23 | 江苏通付盾科技有限公司 | Lottery rewarding method and device based on block chain |
CN109767271A (en) * | 2019-01-18 | 2019-05-17 | 众安信息技术服务有限公司 | Lottery drawing method and equipment based on block chain |
CN110020901A (en) * | 2018-12-25 | 2019-07-16 | 阿里巴巴集团控股有限公司 | Resource allocation methods and device and electronic equipment based on block chain |
-
2019
- 2019-08-22 CN CN201910780153.5A patent/CN110474918B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109644136A (en) * | 2016-09-27 | 2019-04-16 | 英特尔公司 | The believable vehicle remote information processing analyzed using block chain data |
CN110020901A (en) * | 2018-12-25 | 2019-07-16 | 阿里巴巴集团控股有限公司 | Resource allocation methods and device and electronic equipment based on block chain |
CN109636998A (en) * | 2019-01-09 | 2019-04-16 | 山东浪潮质量链科技有限公司 | A kind of method and device drawn a lottery using block chain |
CN109767271A (en) * | 2019-01-18 | 2019-05-17 | 众安信息技术服务有限公司 | Lottery drawing method and equipment based on block chain |
CN109672693A (en) * | 2019-02-02 | 2019-04-23 | 江苏通付盾科技有限公司 | Lottery rewarding method and device based on block chain |
Non-Patent Citations (1)
Title |
---|
ROSS ANDERSON: "How to cheat at the lottery (or, massively parallel requirements engineering)", 《PROCEEDINGS 15TH ANNUAL COMPUTER SECURITY APPLICATIONS CONFERENCE (ACSAC"99)》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111259019A (en) * | 2020-01-09 | 2020-06-09 | 腾讯科技(深圳)有限公司 | Resource allocation method, device, equipment and storage medium |
US12063167B2 (en) | 2020-01-09 | 2024-08-13 | Tencent Technology (Shenzhen) Company Limited | Resource configuration method and apparatus, device, and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN110474918B (en) | 2022-06-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106789089B (en) | The method, apparatus and system and server of management certificate | |
US10484347B2 (en) | Method and apparatus for supporting secure chat | |
CN110505065B (en) | Trusted timestamp adding method and device and storage medium | |
CN104836664B (en) | A kind of methods, devices and systems executing business processing | |
CN111612168A (en) | Management method and related device for machine learning task | |
CN104580167B (en) | A kind of methods, devices and systems transmitting data | |
CN107852416A (en) | The life cycle of monitoring computer network connection | |
CN106888087B (en) | A kind of method and apparatus of management certificate | |
WO2018032661A1 (en) | Information displaying method for terminal device, and terminal device | |
CN110430194A (en) | A kind of method of Information Authentication, the method and device of chess and card Information Authentication | |
CN110545190A (en) | signature processing method, related device and equipment | |
CN110933113B (en) | Block chain-based interactive behavior detection method, device, equipment and storage medium | |
CN104735657B (en) | Security terminal verification method, wireless access point binding method, apparatus and system | |
CN109768977A (en) | Streaming medium data processing method, device and relevant device and medium | |
CN107070654B (en) | Information acquisition method and device | |
CN108874612A (en) | A kind of method of acquisition of information, relevant device and system | |
CN106250770B (en) | Electronic device and method for encrypting content | |
CN108123945A (en) | Distribution method, system and the intelligent terminal of random data | |
CN109816375A (en) | Method and device for paying public payment fee and subway fee by scanning code | |
CN111339181B (en) | Block storage method, block storage device, node equipment and storage medium | |
CN106657166B (en) | A kind of method of authentication, terminal device and server | |
CN114039726B (en) | Key generation method, key acquisition method, related device and medium | |
CN106130735A (en) | The processing method of a kind of communication information, device and mobile terminal | |
CN110362969A (en) | A kind of resource rights check method, apparatus and equipment | |
CN107124407B (en) | Data transmission method, device, readable storage medium storing program for executing, electronic equipment and system |
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 |