CN108924089A - A kind of client device recognition methods, device and client device - Google Patents
A kind of client device recognition methods, device and client device Download PDFInfo
- Publication number
- CN108924089A CN108924089A CN201810526295.4A CN201810526295A CN108924089A CN 108924089 A CN108924089 A CN 108924089A CN 201810526295 A CN201810526295 A CN 201810526295A CN 108924089 A CN108924089 A CN 108924089A
- Authority
- CN
- China
- Prior art keywords
- client device
- block
- unique identification
- data
- client
- 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
- 238000000034 method Methods 0.000 title claims abstract description 44
- 238000004422 calculation algorithm Methods 0.000 claims description 18
- 238000004590 computer program Methods 0.000 claims description 9
- 238000005516 engineering process Methods 0.000 abstract description 6
- 230000006870 function Effects 0.000 description 14
- 238000010586 diagram Methods 0.000 description 8
- 238000012545 processing Methods 0.000 description 6
- 230000008569 process Effects 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000012795 verification Methods 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 238000012937 correction Methods 0.000 description 2
- 230000008878 coupling Effects 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 241000251468 Actinopterygii Species 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 238000012797 qualification Methods 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
Classifications
-
- 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/10—Network architectures or network communication protocols for network security for controlling access to devices or network resources
-
- 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/08—Network architectures or network communication protocols for network security for authentication of entities
- H04L63/0876—Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/60—Network streaming of media packets
- H04L65/61—Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio
- H04L65/611—Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio for multicast or broadcast
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0861—Generation of secret information including derivation or calculation of cryptographic keys or passwords
- H04L9/0869—Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3236—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Multimedia (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Power Engineering (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The embodiment of the invention discloses a kind of client device recognition methods, device and client devices.Present invention method includes:When direct broadcasting room is added in client device, client device receives the first block that server issues;Client device generates the second block according to the first block and preset client device unique identification information;Second block is broadcast to all clients equipment of target direct broadcasting room by client device, so that the client device of target direct broadcasting room respectively verifies the second block received, determines the legitimacy of client device.For the client device of direct broadcasting room is newly added in the embodiment of the present invention, the unique identification information of the client pre-generated by block chain technology is added in block chain, and it is broadcast in the client of all block chains of direct broadcasting room, carry out verifying the legitimacy of determining client device respectively, client identification information is unique, it is not easy to forge, improves the accuracy of client identification.
Description
Technical field
The present invention relates to field of video broadcasting technology, in particular to a kind of client device recognition methods, device and client
End equipment.
Background technique
Currently, either moving end equipment for the equipment for running program or PC computer equipment, application program being opened
Hair manufacturer is intended to uniquely to identify and identify this equipment, to facilitate positioning user's positioning device.Such as with
Track facility information, for example, statistics application program according to amount etc..However existing algorithm is to generate a random data conduct
The unique ID of equipment can not also identify whether to be unique so that the data are extremely easy to be forged.
Summary of the invention
The embodiment of the invention provides a client device recognition methods, device and client devices, to solve visitor at present
Family end mark is easy to be forged and can not identify whether to be unique problem.
In a first aspect, this application provides a kind of client device recognition methods, this method includes:
When direct broadcasting room is added in client device, the client device receives the first block that server issues;
The client device is raw according to first block and the preset client device unique identification information
At the second block, the client device unique identification information is plurality of devices information meter of the client device according to itself
It obtains;
Second block is broadcast to all clients equipment of the target direct broadcasting room by the client device, so that
Other target client devices for obtaining the target direct broadcasting room respectively verify second block received, determine institute
State the legitimacy of client device.
Further, unique according to first block and the preset client device in the client device
Before identification information generates the second block, the method also includes:
The client device is calculated the client device according to the plurality of devices information of itself and uniquely marks
Know information.
Further, the client device is calculated the client according to the plurality of devices information of itself and sets
Standby unique identification information, specifically includes:
The client device generates the first random data;
The client device receives the second random data that server is sent;
The client device obtains the multiple hardwares information of itself;
The client device is according to first random data, second random data and the client device
The multiple hardwares information of itself, combination obtain the client device unique identification data;
The client device encrypts the client device unique identification data according to preset Encryption Algorithm,
Obtain the client device unique identification information.
Further, the client device is according to first random data, second random data and described
The multiple hardwares information of client device itself, combination obtain the client device unique identification data, specifically include:
According to a variety of hard of first random data, second random data and the client device itself
The preset order of part information is combined sequentially into the client device unique identification data.
Further, first block and second block are same data structure;
The data structure includes the block number of block, the cryptographic Hash of previous block, current time, calculates new block Hash
The number of front 0, random data, the cryptographic Hash of current block and block performance data in value;
Block performance data in second block includes the client device unique identification information.
Further, further include in the method:
The client device receives the third block that target client device is sent, and includes described in the third block
The unique identification information of target client device;
With the presence or absence of in the destination client in each block for the block chain that the client device detection locally saves
The identical identification information of the unique identification information of equipment, if so, then determining that the target client device sets for illegitimate client
It is standby, the third block is not added in the block chain, if nothing, the third block is added to the block chain
In.
Second aspect, the application provide a kind of client device identification device, which includes:
Receiving module, for receiving the first block that server issues when direct broadcasting room is added in client device;
Generation module, for being generated according to first block and the preset client device unique identification information
Second block, the client device unique identification information are that the client device is calculated according to the plurality of devices information of itself
It obtains;
Determining module, for second block to be broadcast to all clients equipment of the target direct broadcasting room, so that
Other target client devices for obtaining the target direct broadcasting room respectively verify second block received, determine institute
State the legitimacy of client device.
Further, described device further includes:
Computing module, for the generation module according to first block and the preset client device only
Before one identification information generates the second block, the client device is calculated only according to the plurality of devices information of itself
One identification information.
Further, the computing module is specifically used for:
Generate the first random data;
Receive the second random data that server is sent;
Obtain the multiple hardwares information of itself;
According to the multiple hardwares of first random data, second random data and the client device itself
Information, combination obtain the client device unique identification data;
The client device unique identification data is encrypted according to preset Encryption Algorithm, obtains the client
Equipment unique identification information.
Further, the computing module is specifically used for:
According to a variety of hard of first random data, second random data and the client device itself
The preset order of part information is combined sequentially into the client device unique identification data.
Further, first block and second block are same data structure;
The data structure includes the block number of block, the cryptographic Hash of previous block, current time, calculates new block needs
Key value, calculate new block cryptographic Hash in front 0 number, random data, the cryptographic Hash of current block and block function number
According to;
Block performance data in second block includes the client device unique identification information.
Further, described device further includes:
Correction verification module includes described in the third block for receiving the third block of target client device transmission
The unique identification information of target client device;It detects in each block of the block chain locally saved with the presence or absence of in the target
The identical identification information of the unique identification information of client device, if so, then determining that the target client device is illegal visitor
The third block is not added in the block chain by family end equipment, if nothing, the third block is added to the area
In block chain.
The third aspect, the present invention also provides a kind of client devices, including:Memory, processor and is stored in described deposit
On reservoir and the computer program that can run on the processor, wherein when the processor executes the computer program
Any method in first aspect may be implemented.
Fourth aspect, the present invention also provides a kind of computer readable storage mediums, are stored thereon with computer program, the journey
Any method in first aspect is realized when sequence is executed by processor.
For the embodiment of the present invention when direct broadcasting room is added in client device, client device receives the firstth area that server issues
Block;Client device generates the second block, client according to the first block and preset client device unique identification information
Equipment unique identification information is that client device is calculated according to the plurality of devices information of itself;Client device is by the secondth area
Block is broadcast to all clients equipment of target direct broadcasting room, so that the client device of target direct broadcasting room is respectively to receiving
Second block is verified, and determines the legitimacy of client device.For the client of direct broadcasting room is newly added in the embodiment of the present invention
The unique identification information of end equipment, the client pre-generated by block chain technology is added in block chain, and is broadcast to straight
Between broadcasting in the client of all block chains, the legitimacy for verifying determining client device, client identification information are carried out respectively
It is uniquely, to be not easy to forge, improves the accuracy of client identification.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, institute in being described below to the embodiment of the present invention
Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the invention
Example, for those of ordinary skill in the art, without creative efforts, can also obtain according to these attached drawings
Obtain other attached drawings.
Fig. 1 is one embodiment schematic diagram of client device recognition methods in the embodiment of the present invention;
Fig. 2 is another embodiment schematic diagram of client device recognition methods in the embodiment of the present invention;
Fig. 3 is a specific embodiment schematic diagram of step of embodiment of the present invention S104;
Fig. 4 be in the embodiment of the present invention on the basis of Fig. 1 or embodiment illustrated in fig. 2, client device recognition methods it is another
One embodiment schematic diagram;
Fig. 5 is one embodiment schematic diagram of client identification device in the embodiment of the present invention;
Fig. 6 is another embodiment schematic diagram of client identification device in the embodiment of the present invention;
Fig. 7 is another embodiment schematic diagram of client device identification device in the embodiment of the present invention
Fig. 8 is one embodiment schematic diagram of client device in the embodiment of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention
Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only
The embodiment of a part of the invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill people
The model that the present invention protects all should belong in member's every other embodiment obtained without making creative work
It encloses.
Description and claims of this specification and the (if present)s such as term " first " in above-mentioned attached drawing, " second "
It is to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that the number used in this way
According to being interchangeable under appropriate circumstances, so as to the embodiments described herein can in addition to the content for illustrating or describing herein with
Outer sequence is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that cover non-exclusive packet
Contain, for example, what the process, method, system, product or equipment for containing a series of steps or units were not necessarily limited to be clearly listed
Those step or units, but may include be not clearly listed or it is intrinsic for these process, methods, product or equipment
Other step or units.
Client device recognition methods is applied to client device identification device in the embodiment of the present invention, which is located at visitor
In the end equipment of family, which can be the client devices such as mobile phone, tablet computer or PC, be also possible to not
Come the client device etc. occurred.
Referring to Fig. 1, client device recognition methods one embodiment includes in the embodiment of the present invention:
S101, when direct broadcasting room is added in client device, client device receives the first block for issuing of server;
In the present embodiment, direct broadcasting room can be the direct broadcasting room of live streaming platform, such as the direct broadcasting room of bucket fish, server can be
The corresponding server of platform is broadcast live.After having spectators to enter room, server can issue original block and be given to the corresponding visitor of spectators
Family end equipment, the data content of original block are all then sky data, and to indicate being original block, client is dependent on original block
It carries out to generate new block.The first block can be original block in the embodiment of the present invention.
S102, client device generate the secondth area according to the first block and preset client device unique identification information
Block, client device unique identification information are that client device is calculated according to the plurality of devices information of itself;
Block chain technology has been used for digital cash at present, has been not necessarily to central authority, the visitor of each block chain
Family end is all total account book with each transaction, and all has the function of checking whether it legal to each transaction.Cause
Block chain thinking is used for the management and identification of client device unique identification information, first the present embodiment meeting by this present embodiment
An equipment unique identification information is generated for client device equipment by certain algorithm, and is stored in client device
On.
It is based on block chain in the embodiment of the present invention come generating device unique identification information, so for client device
It is all a client of block chain for user, thus the functional characteristic with block chain, including generating new block, storage
All blocks have the function of distributed account book, verify to new block, search equipment from distributed account book and do not mark
Know the uniqueness etc. of information.
Second block is broadcast to all clients equipment of the target direct broadcasting room by S103, client device, so that
Other target client devices of target direct broadcasting room respectively verify the second block received, determine client device
Legitimacy.
In the present embodiment, destination client may include pre-set one or more except the client in target direct broadcasting room
Client except end equipment (executing subject), may also mean that in target direct broadcasting room except the client device (executing subject) it
Outer all clients.
For the embodiment of the present invention when direct broadcasting room is added in client device, client device receives the firstth area that server issues
Block;Client device generates the second block, client according to the first block and preset client device unique identification information
Equipment unique identification information is that client device is calculated according to the plurality of devices information of itself;Client device is by the secondth area
Block is broadcast to all clients equipment of target direct broadcasting room, so that the client device of target direct broadcasting room is respectively to receiving
Second block is verified, and determines the legitimacy of client device.For the client of direct broadcasting room is newly added in the embodiment of the present invention
The unique identification information of end equipment, the client pre-generated by block chain technology is added in block chain, and is broadcast to straight
Between broadcasting in the client of all block chains, the legitimacy for verifying determining client device, client identification information are carried out respectively
It is uniquely, to be not easy to forge, improves the accuracy of client identification.
It in the embodiment of the present invention, needs to construct the algorithm of client device unique identification for any client device, comes
A unique identification is generated, and unique identification is encrypted, so that the safety of unique identification is improved, but also it is not easy
In being forged.Since client device unique identification is mark equipment, so being usually by obtaining client device only
One information is come as its unique identification, such as obtains client device type, obtains client device IMEI number, obtains client
End equipment sequence number, however in many cases since many kinds of type of client device is various, also due to the reason of permission,
Usually obtaining can be as the unique identifier for capableing of the unique identification client device less than one.In consideration of it, the present invention is real
Apply example then by data in conjunction with means obtain client device unique identifier.
As shown in Fig. 2, uniquely being marked in client device according to first block and the preset client device
Before knowing information the second block of generation, further, method further includes in the embodiment of the present invention:
Client device unique identification information is calculated according to the plurality of devices information of itself in S104, client device.
Further, as shown in figure 3, above-mentioned steps S104 can specifically include:
S1041, client device generate the first random data;
Specifically, a string of random data can be generated in the present embodiment on a client device first, i.e., herein first with
Machine data.
S1042, client device receive the second random data that server is sent;
Meanwhile after client device connection server, server can generate one section of random data for the client device,
And the second random data herein, second random data can be sent to client after client device connects server and set
It is standby.
In the embodiment of the present invention, the first random data and the second random data can first be combined into a random data, then
It is combined with the multiple hardwares information for obtaining itself, to ensure the randomness of data as far as possible.It can also be such as S1043 and step
It describes in S1044 after the multiple hardwares information for obtaining itself, is combined together with the multiple hardwares information together.
S1043, client device obtain the multiple hardwares information of itself;
Specifically, multiple hardwares information may include IMEI number, equipment Serial Number, equipment model information, equipment CPU number
Equal client devices hardware unique identification on this basis, can also include screen-sized, show in certain embodiments
Show other hardware informations such as type number.
S1044, client device are set according to first random data, second random data and the client
For the multiple hardwares information of itself, combination obtains the client device unique identification data;
Specifically, the first random data and the second random data that can obtain by these hardware informations and before carry out together
An equipment unique identification data is obtained after combination, is implemented as follows:
(1) client device can generate a string of random data (i.e. the first random data).
ClientRand=Rand ();
A string of random data ClientRand are generated by calling system random function Rand.
(2) client device obtains the second random data from server;
In the present embodiment, server also will use random function (can random function identical with client) and generate a string
Random data ServerRand, and it is sent to client.
(3) client can obtain the multiple hardwares information of itself.
Such as IMEI, Serialno, CPUID, SystemModel etc..
(4) to finally obtain a string of combined client device unique identification data DeviceIdData.
DeviceIdData=ClientRand+ServerRand+IMEI+Serialno+CPUID+S ystemModel.
S1045, client device add the client device unique identification data according to preset Encryption Algorithm
It is close, obtain client device unique identification information.
It, then can be to client device unique identification number after obtaining client device unique identification data in the present embodiment
It is specific as follows according to being encrypted:
DeviceId=AES.Encrypt (DeviceIdData, key);
Combined client device unique identification data is encrypted using AES encryption algorithm, to obtain most
Whole client device unique identification value information DeviceId, then the equipment for storing or using in this client device is unique
Identification information is then DeviceId.
This client device unique identification information can be then stored in that client device is preset multiple to be deposited by client device
Address is stored up, so that next time then directly reads the equipment unique identification information of storage by these storage address.
Further, the step S1044 is specifically included:
According to a variety of hard of first random data, second random data and the client device itself
The preset order of part information is combined sequentially into the client device unique identification data.
A common block chain must include some necessary data, so that one can verify block chain itself
Legitimacy, another is but also it is not easy to forge.Block chain data structure in the embodiment of the present invention then depends on
The data of client device unique identification information, so believing in data structure within a block comprising client device unique identification
Breath.Specifically, first block and second block are same data structure;
The data structure includes the block number of block, the cryptographic Hash of previous block, current time, calculates new block Hash
The number of front 0, random data, the cryptographic Hash of current block and block performance data in value;Area in second block
Block performance data includes the client device unique identification information.
It is implemented as follows:
Struct BlockData{
Int64 index;
String previousHash;
Int64 timestamp;
String data;
String zero;
String randdata;
String hash;
}
Wherein, index is used to indicate the block number of block, is usually incremented by since 0;PreviousHash indicates previous area
The hash value (cryptographic Hash) of block;Timestamp indicates current time stamp;Zero indicates to calculate front 0 in the hash value of new block
A data;Randdata then indicates random data, for being added in new block, so that its hash value calculated meets
0 number that server issues;Hash then indicates the hash value of the content of this current block;Data then indicates some data
Splice (i.e. above-mentioned block performance data), the content of this data field is then according to set by the function of completing required for block
Meter, is directed in the embodiment of the present invention, block performance data may include client device unique identification information and the visitor of user
Hardware information of family end equipment equipment, and the data information of application etc., after the design for having this block chain data structure, when
After receiving the newly generated block of other client devices, then it can be verified by the data to the inside.
Further, as shown in figure 4, further including in the method:
S105, client device receive the third block that target client device is sent, and include mesh in the third block
Mark the unique identification information of client device;
With the presence or absence of in the destination client in each block for the block chain that S106, client device detection locally save
The identical identification information of the unique identification information of equipment, if so, then determining that the target client device sets for illegitimate client
It is standby, the third block is not added in the block chain, if nothing, the third block is added to the block chain
In.
It also needs to design the algorithm for generating a new block by a block in the embodiment of the present invention.Each block chain
Client device can then receive the original block that server issues, new area then then can be generated according to original block
It block and is added in block chained list, is implemented as follows:
The data structure of a upper block has been got first, and next block is then the number according to a upper block
According to being generated.The name that a upper block is assumed in the present embodiment is prevblock, and the name of newly-generated block is
newblock。
(1) block number of new block is calculated.
Newblock.index=prevblock.index+1;
Then the block number of new block is that current block number adds 1.
(2) timestamp of new block is calculated.
Newblock.timestamp=time ();
The timestamp of new block is then to obtain the current time.
(3) the hash value of a upper block for new block is calculated.
Newblock.previousHash=prevblock.hash;
The hash value of a upper block for new block is then the hash of the upper block obtained.
(4) data of new block are calculated.
Newblock.data=DeviceId+ClientRand+ServerRand+IMEI+Serial no+CPUID+
SystemModel+data;
When there is new client device to be added, then a new block can be generated, is broadcast in block chain, with notice
Everybody, has new client device to be added.This client then can be by equipment unique identification information that the client generates
The model information of DeviceId and the client device, the information such as IMEI, CPUID, and the data information one of new block is added
It rises and is put into the data of block chain, and this client device unique identification information DeviceId is that have the client according to oneself
Facility information be calculated, calculation method is then the calculation method in step (2).
(5) the randdata value of new block is calculated.
This randdata value is then that client generates at random, to gather together enough before the hash value that just entire new block calculates
Meet 0 number that server issues.
(6) the hash value of new block is calculated.
Newblock.hash=HASH (index+previousHash+timestamp+data+zero+randdata);
The hash value of new block is then to have the index field and previousHash field and timestamp word of new block
Section and data field.
In the present embodiment, the HASH algorithm used is usually SHA-256 algorithm, naturally it is also possible to be calculated using other HASH
Method.
It is achieved that the algorithm that a new block is generated by a block through the above steps.
Generation for new block, can be in the client by Web broadcast to all block chains, and all clients
End is all the client of a block chain, all has and generates new block, and verifies the ability of new block, and the present embodiment
In algorithm be one be the unique identification information for carrying out managing customer end equipment using block chain, then the client of block chain is set
Then it can all go whether the client device unique identification information for verifying new block is one when for for receiving a new block
The client device unique identification information of a qualification, if not will not then be added in block chain, it is believed that this is a forgery
Client device unique identification information.So each block requires to carry out completeness check, it is implemented as follows:
It is common in client, be then that client device has had currently first for other blocks in addition to original block
Then block has received a new block, need to carry out validity judgement to new block.It is implemented as follows:
The name for also assuming that a block is prevblock, then has received the name of a newly-generated block
It is newblock.
(1) first determine whether its index is correct.
Newblock.index!=prevblock.index+1;
If the block number of new block is not the block number plus 1 of a upper block, illustrate that new block is illegal, directly
It connects and returns to block errors information.
(2) then judge the hash value of block.
Newblock.previousHash!=prevblock.hash
New area is thought if the hash value of a upper block for new block is not equal to the hash value of a upper block
Block is illegal, directly return block errors information.
(3) judge the hash value of new block.
The hash value of new block is the hash result of the entire data of new block.
HASH(Newblock.index+Newblock.previousHash+Newblock.timestamp+
Newblock.data+Newblock.randdata+Newblock.zero)!=Newblock.hash;
If the hash value of the data of the entire block of new block is not equal to new block hash value, then it is assumed that new area
Block is illegal, directly return block errors information.
(4) judge the legitimacy of the generation value of the equipment unique identification information of new block.
Since the embodiment of the present invention devises the unique identification information that block chain carrys out managing customer end equipment, then new when having
Block when being added to block chain, can check first change block chain client equipment unique identification information it is whether legal, due to
It is to be generated by certain algorithm in the equipment unique identification information embodiment of the present invention, so any people's fake equipment is unique
Identification information can verify its legitimacy by algorithm.
Specific verification algorithm is as follows:
Client device unique identification letter is taken out from the block data (such as the second block) of block chain being newly added first
Cease DeviceId.
It then takes out and obtains its unique identification data DeviceIdData=ClientRand+ for corresponding to client device
ServerRand+IMEI+Serialno+CPUID+SystemModel;
Then it carries out calculating new client device unique identification information by the information of client device
newDeviceId:
NewDeviceId=AES.Encrypt (DeviceIdData, key);
At this time then can DeviceId in the obtained newDeviceId of comparing calculation and the block data being newly added whether one
It causes, explanation is the equipment unique identification information of a forgery if inconsistent, and the second block is illegal.
(5) judge unique legitimacy of the client device unique identification information of new block.
Carry out the unique identification information of management equipment due to devising block chain in the embodiment of the present invention, then all new visitors
The equipment unique identification information at family end is different, as having 2 there is no different client devices client device
Unique identification information, therefore the client of each block chain receives new block then and can go to inquire the equipment unique identification information
Whether with the equipment unique identification informations of existing all blocks duplicate value is had, if there is then illustrating the equipment unique identification information
It is illegal.So block chain client all has distributed account book, and has recorded the equipment unique identification of all clients
Information, then then can remove to search account book with the presence or absence of one come the equipment unique identification information to new block by distributed account book
A the same equipment unique identification information, and if so, explanation is illegal equipment unique identification information, it is otherwise a conjunction
The equipment unique identification information of method.
, first then can be to new equipment generating device unique identification information when there is new equipment to be added, and new equipment meeting
It is added in block chain, block chain can verify the legitimacy of equipment unique identification information, to ensure all set
The uniqueness of standby unique identification information and prevent forge the characteristics of
As shown in figure 5, the present invention also provides a kind of client device identification device, which includes:
Receiving module 501, for receiving the first block that server issues when direct broadcasting room is added in client device;
Generation module 502, for according to first block and the preset client device unique identification information
The second block is generated, the client device unique identification information is plurality of devices information of the client device according to itself
It is calculated;
Determining module 503, for second block to be broadcast to all clients equipment of the target direct broadcasting room, with
So that other target client devices of the target direct broadcasting room respectively verify second block received, determine
The legitimacy of the client device.
Further, as shown in fig. 6, described device further includes:
Computing module 504, for being set in the generation module according to first block and the preset client
Before standby unique identification information generates the second block, the client is calculated according to the plurality of devices information of itself and is set
Standby unique identification information.
Further, the computing module 504 is specifically used for:
Generate the first random data;
Receive the second random data that server is sent;
Obtain the multiple hardwares information of itself;
According to the multiple hardwares of first random data, second random data and the client device itself
Information, combination obtain the client device unique identification data;
The client device unique identification data is encrypted according to preset Encryption Algorithm, obtains the client
Equipment unique identification information.
Further, the computing module 504 is specifically used for:
According to a variety of hard of first random data, second random data and the client device itself
The preset order of part information is combined sequentially into the client device unique identification data.
Further, first block and second block are same data structure;
The data structure includes the block number of block, the cryptographic Hash of previous block, current time, calculates new block needs
Key value, calculate new block cryptographic Hash in front 0 number, random data, the cryptographic Hash of current block and block function number
According to;
Block performance data in second block includes the client device unique identification information.
Further, as shown in fig. 7, described device further includes:
Correction verification module 505 includes institute in the third block for receiving the third block of target client device transmission
State the unique identification information of target client device;It detects in each block of the block chain locally saved with the presence or absence of in the mesh
The identical identification information of unique identification information for marking client device, if so, then determining that the target client device is illegal
The third block is not added in the block chain by client device, if nothing, the third block is added to described
In block chain.
A kind of client device is also provided in the embodiment of the present invention, refers to Fig. 8, the client device includes:
Memory 801, processor 802 and is stored in the computer that can be run on the memory and on the processor
Program 803, wherein above-mentioned client device identification side may be implemented in the processor 802 when executing the computer program 803
Method.
It should be noted that this application involves client device include but is not limited to be:Mobile terminal (mobile phone, intelligence
Mobile phone, PAD, laptop etc.), fixed terminal (computer).
For ease of description, only parts related to embodiments of the present invention are shown, disclosed by specific technical details, asks
Referring to present invention method part.Memory 801 can be used for storing computer program 803, and above-mentioned computer program includes
Software program, module and data, processor 802 execute the computer program 803 for being stored in memory 801 by running, thus
Execute the various function application and data processing of client device.
In the specific implementation process, memory 801 can be used for storing software program and module, and processor 802 passes through
Operation is stored in the software program and module of memory 801, thereby executing the various function application and number of client device
According to processing.Memory 801 can mainly include storing program area and storage data area, wherein storing program area can store operation system
Application program needed for system, at least one function (such as game class application program, chat class application program) etc.;Storage data area
It can store and created data (game configuration data, audio data) etc. are used according to client device.In addition, memory
801 may include high-speed random access memory, can also include nonvolatile memory, for example, at least a magnetic disk storage
Part, flush memory device or other volatile solid-state parts.Processor 802 is the control centre of client device, and utilization is various
The various pieces of interface and the entire client device of connection, by running or executing the software being stored in memory 801
Program and/or module, and the data being stored in memory 801 are called, execute the various functions and processing of client device
Data, to carry out integral monitoring to client device.Optionally, processor 802 may include one or more processing units;It is excellent
Choosing, processor 802 can integrate application processor, wherein the main processing operation system of application processor, user interface and application
Program etc..
The embodiment of the present invention also provides a kind of computer readable storage medium, wherein the computer readable storage medium can
It is stored with program, which includes the part or complete for the client device recognition methods recorded in above method embodiment when executing
Portion's step.
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, the functional units in various embodiments of the present invention may be integrated into 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, technical solution of the present invention 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 present invention
Portion or part steps.And storage medium above-mentioned includes:USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only
Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store journey
The medium of sequence code.
The above, the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although referring to before
Stating embodiment, invention is explained 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 for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution.
Claims (10)
1. a kind of client device recognition methods, which is characterized in that the method includes:
When target direct broadcasting room is added in client device, the client device receives the first block that server issues;
The client device generates the according to first block and the preset client device unique identification information
Two blocks, the client device unique identification information are that the client device is calculated according to the plurality of devices information of itself
It arrives;
Second block is broadcast to all clients equipment of the target direct broadcasting room by the client device, so that institute
Other target client devices for stating target direct broadcasting room respectively verify second block received, determine the visitor
The legitimacy of family end equipment.
2. the method according to claim 1, wherein the client device according to first block and
Before the preset client device unique identification information generates the second block, the method also includes:
The client device unique identification, which is calculated, according to the plurality of devices information of itself in the client device believes
Breath.
3. according to the method described in claim 2, it is characterized in that, the client device is according to itself plurality of devices information
The client device unique identification information is calculated, specifically includes:
The client device generates the first random data;
The client device receives the second random data that server is sent;
The client device obtains the multiple hardwares information of itself;
The client device is according to first random data, second random data and the client device itself
Multiple hardwares information, combination obtain the client device unique identification data;
The client device encrypts the client device unique identification data according to preset Encryption Algorithm, obtains
The client device unique identification information.
4. according to the method described in claim 3, it is characterized in that, the client device according to first random data,
The multiple hardwares information of second random data and the client device itself, combination obtain the client device only
One mark data, specifically includes:
Believe according to the multiple hardwares of first random data, second random data and the client device itself
The preset order of breath is combined sequentially into the client device unique identification data.
5. the method according to claim 1, wherein first block and second block are same number
According to structure;
The data structure includes the block number of block, the cryptographic Hash of previous block, current time, calculates in new block cryptographic Hash
The number of front 0, random data, the cryptographic Hash of current block and block performance data;
Block performance data in second block includes the client device unique identification information.
6. a kind of client device identification device, which is characterized in that described device includes:
Receiving module, for receiving the first block that server issues when direct broadcasting room is added in client device;
Generation module, for generating second according to first block and the preset client device unique identification information
Block, the client device unique identification information are that the client device is calculated according to the plurality of devices information of itself
It arrives;
Determining module, for second block to be broadcast to all clients equipment of the target direct broadcasting room, so that institute
Other target client devices for stating target direct broadcasting room respectively verify second block received, determine the visitor
The legitimacy of family end equipment.
7. device according to claim 6, which is characterized in that described device further includes:
Computing module, for uniquely being marked in the generation module according to first block and the preset client device
Before knowing information the second block of generation, the client device is calculated according to the plurality of devices information of itself and is uniquely marked
Know information.
8. device according to claim 7, which is characterized in that the computing module is specifically used for:
Generate the first random data;
Receive the second random data that server is sent;
Obtain the multiple hardwares information of itself;
Believed according to the multiple hardwares of first random data, second random data and the client device itself
Breath, combination obtain the client device unique identification data;
The client device unique identification data is encrypted according to preset Encryption Algorithm, obtains the client device
Unique identification information.
9. device according to claim 8, which is characterized in that the computing module is specifically used for:
Believe according to the multiple hardwares of first random data, second random data and the client device itself
The preset order of breath is combined sequentially into the client device unique identification data.
10. a kind of client device, which is characterized in that including:Memory, processor and is stored on the memory and can be
The computer program run on the processor, wherein right may be implemented when executing the computer program in the processor
It is required that 1 to 5 any method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810526295.4A CN108924089B (en) | 2018-05-29 | 2018-05-29 | Client device identification method and device and client device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810526295.4A CN108924089B (en) | 2018-05-29 | 2018-05-29 | Client device identification method and device and client device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108924089A true CN108924089A (en) | 2018-11-30 |
CN108924089B CN108924089B (en) | 2021-11-09 |
Family
ID=64418172
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810526295.4A Active CN108924089B (en) | 2018-05-29 | 2018-05-29 | Client device identification method and device and client device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108924089B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110769274A (en) * | 2019-10-18 | 2020-02-07 | 腾讯科技(深圳)有限公司 | Live broadcast information processing method and device based on block chain network, electronic equipment and storage medium |
CN110798307A (en) * | 2019-10-30 | 2020-02-14 | 武汉极意网络科技有限公司 | Method, device and equipment for marking distributed anti-crawler user equipment and storage medium |
CN113556797A (en) * | 2021-06-29 | 2021-10-26 | 深圳市闪联信息技术有限公司 | A method and system for quickly establishing a connection between a mobile device and a large-screen device |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101873331A (en) * | 2010-07-07 | 2010-10-27 | 中国工商银行股份有限公司 | Safety authentication method and system |
CN106453407A (en) * | 2016-11-23 | 2017-02-22 | 江苏通付盾科技有限公司 | Identity authentication method based on block chain, authentication server and user terminal |
CN106534160A (en) * | 2016-12-02 | 2017-03-22 | 江苏通付盾科技有限公司 | Identity authentication method and system based on block chain |
CN107301546A (en) * | 2017-05-03 | 2017-10-27 | 北京众享比特科技有限公司 | Generating random number and methods for using them and device |
CN107426253A (en) * | 2017-09-26 | 2017-12-01 | 武汉斗鱼网络科技有限公司 | A kind of data verification method and client |
CN107528855A (en) * | 2017-09-26 | 2017-12-29 | 武汉斗鱼网络科技有限公司 | A kind of data verification method and server |
CN107623865A (en) * | 2017-09-26 | 2018-01-23 | 武汉斗鱼网络科技有限公司 | A data verification method and server |
-
2018
- 2018-05-29 CN CN201810526295.4A patent/CN108924089B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101873331A (en) * | 2010-07-07 | 2010-10-27 | 中国工商银行股份有限公司 | Safety authentication method and system |
CN106453407A (en) * | 2016-11-23 | 2017-02-22 | 江苏通付盾科技有限公司 | Identity authentication method based on block chain, authentication server and user terminal |
CN106534160A (en) * | 2016-12-02 | 2017-03-22 | 江苏通付盾科技有限公司 | Identity authentication method and system based on block chain |
CN107301546A (en) * | 2017-05-03 | 2017-10-27 | 北京众享比特科技有限公司 | Generating random number and methods for using them and device |
CN107426253A (en) * | 2017-09-26 | 2017-12-01 | 武汉斗鱼网络科技有限公司 | A kind of data verification method and client |
CN107528855A (en) * | 2017-09-26 | 2017-12-29 | 武汉斗鱼网络科技有限公司 | A kind of data verification method and server |
CN107623865A (en) * | 2017-09-26 | 2018-01-23 | 武汉斗鱼网络科技有限公司 | A data verification method and server |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110769274A (en) * | 2019-10-18 | 2020-02-07 | 腾讯科技(深圳)有限公司 | Live broadcast information processing method and device based on block chain network, electronic equipment and storage medium |
CN110798307A (en) * | 2019-10-30 | 2020-02-14 | 武汉极意网络科技有限公司 | Method, device and equipment for marking distributed anti-crawler user equipment and storage medium |
CN110798307B (en) * | 2019-10-30 | 2023-08-22 | 武汉极意网络科技有限公司 | Decentralized anticreeper user equipment marking method, device, equipment and storage medium |
CN113556797A (en) * | 2021-06-29 | 2021-10-26 | 深圳市闪联信息技术有限公司 | A method and system for quickly establishing a connection between a mobile device and a large-screen device |
Also Published As
Publication number | Publication date |
---|---|
CN108924089B (en) | 2021-11-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109819443B (en) | Registration authentication method, device and system based on block chain | |
CN107396360B (en) | Block verification method and device | |
CN111737360B (en) | Block chain-based equipment management method and device and computer equipment | |
CN108646983A (en) | The treating method and apparatus of storage service data on block chain | |
CN109740384A (en) | Data based on block chain deposit card method and apparatus | |
CN108256353A (en) | A kind of data integrity verifying method, apparatus and client | |
CN110458709B (en) | Resource transfer information transmission method and device, storage medium and electronic device | |
CN108764966A (en) | Advertisement placement method, block chain node device and relevant device | |
CN111523890A (en) | Data processing method and device based on block chain, storage medium and equipment | |
CN109491965A (en) | The storage method and its network and electronic equipment of purchase sale of electricity contract | |
CN111488372A (en) | Data processing method, device and storage medium | |
CN113055176B (en) | Terminal authentication method and system, terminal device, P2P verification platform and medium | |
CN108768672B (en) | Data processing method, device and storage medium | |
CN108260015B (en) | Voting data processing method and device and electronic equipment | |
CN107465698A (en) | A kind of data verification method and server | |
CN112069550A (en) | An electronic contract depository system based on smart contract | |
CN108924089A (en) | A kind of client device recognition methods, device and client device | |
CN110597864A (en) | Block chain-based personal information management method and device | |
CN112448946A (en) | Log auditing method and device based on block chain | |
CN112948499A (en) | Information acquisition method and device, electronic equipment and storage medium | |
CN107679149A (en) | A kind of data processing method and server | |
CN111090386A (en) | Cloud storage method, device and system and computer equipment | |
CN110866265A (en) | Data storage method, device and storage medium based on block chain | |
CN108259489A (en) | A kind of voting data processing method, device and electronic equipment | |
CN107528855A (en) | A kind of data verification method and server |
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 |