CN105282198A - Task data processing method based on P2P network and apparatus thereof - Google Patents

Task data processing method based on P2P network and apparatus thereof Download PDF

Info

Publication number
CN105282198A
CN105282198A CN201410321471.2A CN201410321471A CN105282198A CN 105282198 A CN105282198 A CN 105282198A CN 201410321471 A CN201410321471 A CN 201410321471A CN 105282198 A CN105282198 A CN 105282198A
Authority
CN
China
Prior art keywords
data
data transfer
transfer information
bag
server
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
Application number
CN201410321471.2A
Other languages
Chinese (zh)
Other versions
CN105282198B (en
Inventor
仝达
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN201410321471.2A priority Critical patent/CN105282198B/en
Publication of CN105282198A publication Critical patent/CN105282198A/en
Application granted granted Critical
Publication of CN105282198B publication Critical patent/CN105282198B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a task data processing method based on a P2P network and an apparatus thereof. The task data processing method based on the P2P network comprises the following steps that a server receives data transfer information packets sent by a plurality of clients; the server carries out merging processing on the data transfer information packets sent by the plurality of clients so that the merged data transfer information packet is acquired; and the server broadcasts the merged data transfer information packet to the P2P network. Through the method and the apparatus in the invention, a problem that task data processing based on the P2P network needs high a commission charge in the correlation technology is solved.

Description

Based on data processing method and the device of the task of P2P network
Technical field
The present invention relates to data processing field, in particular to a kind of data processing method and device of the task based on P2P network.
Background technology
Equipment in equivalent network (PeertoPeer is called for short P2P) on each node may be used to perform electron exchange medium (as electronic money etc.) transferred account service.
Such as, the equipment in P2P network can be transferred accounts to bit coin, wherein, transfers accounts to be carry out data processing to task to bit coin.In the related, when transferring accounts to bit coin, generally in units of single client, every bit coin being transferred accounts and being broadcast to separately in P2P network.Like this, every bit coin all can produce transfer charge separately, thus can increase the expense that bit coin transfers accounts, this is because:
1. transfer charge is charged according to the data batchmove mission bit stream packet length of transferring accounts, and have a preset length radix due to the data batchmove mission bit stream packet length of transferring accounts to every, a corresponding service charge radix of preset length radix, service charge only collects the integral multiple of service charge radix.When data batchmove mission bit stream packet length is greater than the N of preset length radix doubly, when being less than or equal to the N+1 times of preset length radix, collect N+1 service charge radix doubly.Therefore, even if single client needs the data batchmove mission bit stream packet length of transferring accounts lower than this preset length radix, also can charge according to 1 part of service charge radix; If data batchmove mission bit stream packet length has exceeded the N of preset length radix doubly, but when being less than the N+1 times of preset length radix, also will according to N+1 service charge radix payment procedure expense doubly.Thus cause the service charge of cost too high.
2. bit coin is transferred accounts in the mode of data batchmove mission bit stream bag, and each data batchmove mission bit stream bag carries package informatin.Wherein, the package informatin length of bit coin can be 10 bytes.Like this, the data batchmove mission bit stream packet length of no matter transferring accounts is how many, all needs to add corresponding package informatin, causes the quantity of package informatin too much, and then the data traffic added in P2P network and memory data output, causes the wasting of resources.
Need based on the data processing of the task of P2P network the problem spending higher service charge in correlation technique, not yet propose effective solution at present.
Summary of the invention
Main purpose of the present invention is the data processing method and the device that provide a kind of task based on P2P network, needs to spend the problem of higher service charge to solve in correlation technique based on the data processing of the task of P2P network.
To achieve these goals, according to an aspect of the present invention, a kind of data processing method of the task based on P2P network is provided.The method comprises: server receives the data transfer information bag that multiple client sends; Server carries out merging treatment to the data transfer information bag that multiple client sends, and obtains the data transfer information bag after merging; And server by merge after data transfer information packet broadcast in P2P network.
Further, receive the data transfer information bag of multiple client transmission at server before, data transfer information bag is sent to server by multiple client in the following manner: multiple client receives data batchmove task request message; Multiple client generates data transfer information bag according to data batchmove task request message; And data transfer information bag is sent to server by multiple client.
Further, before data transfer information bag is sent to server by multiple client, this data processing method also comprises: multiple client carries out digital signature to data transfer information bag corresponding with self in data transfer information bag respectively, obtain the data transfer information bag after digital signature, wherein, the data transfer information bag after the digital signature corresponding with self is sent to server by multiple client respectively.
Further, multiple client generates data transfer information bag in the following manner: multiple client obtains governable data batchmove input information; Multiple client is according to governable data batchmove input information and data batchmove task request message and preset data jump condition determination data batchmove output information; And multiple client generates data transfer information bag according to governable data batchmove input information and data batchmove output information and the first preset format.
Further, at server, merging treatment is carried out to the data transfer information bag that multiple client sends, after obtaining the data transfer information bag after merging, this data processing method also comprises: the data batchmove output information in the data transfer information bag after merging is sent to multiple client by server; Multiple client carries out digital signature to data batchmove output information respectively, obtains the digital signature corresponding with self; The digital signature corresponding with self is fed back to server by multiple client respectively; And the digital signature corresponding with self of multiple client is merged in the data transfer information bag after merging by server, obtain the data transfer information bag of the digital signature corresponding with self comprising multiple client, wherein, server will comprise the data transfer information packet broadcast of the digital signature corresponding with self of multiple client in P2P network.
Further, after the digital signature corresponding with self is fed back to server by multiple client respectively, data processing method also comprises: server judges that receive in the first preset time period whether to reach preset value with the number of each corresponding digital signature in multiple client; And if server is judged that receive in the first preset time period not reach preset value with the number of each corresponding digital signature in multiple client, then the data transfer information bag not receiving digital signature is deleted, and return and perform server merging treatment is carried out to the data transfer information bag that multiple client sends, obtain the step of the data transfer information bag after merging.
Further, server carries out merging treatment to the data transfer information bag that multiple client sends, and obtains the data transfer information handbag after merging and draws together: server judges whether the data transfer information bag received is valid data transinformation bag; If server judges that the data transfer information bag received is valid data transinformation bag, then valid data transinformation bag is combined, obtain the valid data transinformation bag after combining; And the valid data transinformation bag after combination is generated the data transfer information bag after merging according to the second preset format by server.
Further, after obtaining the valid data transinformation bag after combining, this data processing method also comprises: server determines the length value of the valid data transinformation bag after combining; Server judges whether the difference of the integral multiple of length value and preset length value is minimum value, wherein, if server judges that the difference of the integral multiple of length value and preset length value is minimum value, then the valid data transinformation bag after combination is generated the data transfer information bag after merging according to the second preset format by server.
Further, at server by after the data transfer information packet broadcast after merging is in P2P network, data processing method also comprises: server receives the forwarding information of data transfer information bag after merging and confirmation from P2P network; Server judges whether the hop count corresponding with forwarding information reaches default hop count threshold value in the second preset time period; Server judges whether receive confirmation in default P2P network validation numbers range; If server judges that the hop count corresponding with forwarding information does not reach default hop count threshold value in the second preset time period, if or server judges whether receive confirmation in default P2P network validation numbers range, then return and perform server and merging treatment is carried out to the data transfer information bag that multiple client sends, obtain the step of the data transfer information bag after merging.
To achieve these goals, according to a further aspect in the invention, a kind of data processing equipment of the task based on P2P network is provided.This device comprises: the first receiving element, is provided for the data transfer information bag that server receives the transmission of multiple client; First merge cells, is provided for server and carries out merging treatment to the data transfer information bag that multiple client sends, and obtains the data transfer information bag after merging; And radio unit, be provided for server by the data transfer information packet broadcast after merging in P2P network.
Further, this data processing equipment also comprises: the second receiving element, and be provided for before server receives the data transfer information bag of multiple client transmission, multiple client receives data batchmove task request message; Generation unit, is provided for multiple client and generates data transfer information bag according to data batchmove task request message; And first transmitting element, be provided for multiple client and data transfer information bag is sent to server.
Further, this data processing equipment also comprises: the first signature unit, be provided for before data transfer information bag is sent to server by multiple client, multiple client carries out digital signature to data transfer information bag corresponding with self in data transfer information bag respectively, obtain the data transfer information bag after digital signature, wherein, the first transmitting element is also provided for multiple client and respectively the data transfer information bag after the digital signature corresponding with self is sent to server.
Further, generation unit comprises: acquisition module, is provided for multiple client and obtains governable data batchmove input information; Determination module, is provided for multiple client according to governable data batchmove input information and data batchmove task request message and preset data jump condition determination data batchmove output information; And first generation module, be provided for multiple client and generate data transfer information bag according to governable data batchmove input information and data batchmove output information and the first preset format.
Further, this data processing equipment also comprises: the second transmitting element, be provided for, at server, merging treatment carried out to the data transfer information bag that multiple client sends, after obtaining the data transfer information bag after merging, the data batchmove output information in the data transfer information bag after merging is sent to multiple client by server; Second signature unit, is provided for multiple client and carries out digital signature to data batchmove output information respectively, obtain the digital signature corresponding with self; Feedback unit, is provided for multiple client and respectively the digital signature corresponding with self is fed back to server; And second merge cells, being provided for server is merged in the data transfer information bag after merging by the digital signature corresponding with self of multiple client, obtain the data transfer information bag of the digital signature corresponding with self comprising multiple client, wherein, radio unit is also provided for server and will comprises the data transfer information packet broadcast of the digital signature corresponding with self of multiple client in P2P network.
Further, this data processing equipment also comprises: the first judging unit, be provided for after the digital signature corresponding with self is fed back to server by multiple client respectively, server judges that receive in the first preset time period whether to reach preset value with the number of each corresponding digital signature in multiple client; And delete cells, if be provided for server to judge that receive in the first preset time period not reach preset value with the number of each corresponding digital signature in multiple client, the data transfer information bag then not receiving digital signature is deleted, and returns and perform the function of the first merge cells.
Further, the first merge cells comprises: judge module, is provided for whether the data transfer information bag that server judges to receive is valid data transinformation bag; Composite module, if being provided for the data transfer information bag that server judges to receive is valid data transinformation bag, then combines valid data transinformation bag, obtains the valid data transinformation bag after combining; And second generation module, be provided for server and the valid data transinformation bag after combination is generated the data transfer information bag after merging according to the second preset format.
Further, this data processing equipment also comprises: determining unit, and be provided for after obtaining the valid data transinformation bag after combining, server determines the length value of the valid data transinformation bag after combining; Second judging unit, be provided for server and judge whether the difference of the integral multiple of length value and preset length value is minimum value, wherein, if the first merge cells is also provided for server and judges that the difference of the integral multiple of length value and preset length value is minimum value, then the valid data transinformation bag after combination is generated the data transfer information bag after merging according to the second preset format by server.
Further, this data processing equipment also comprises: the 3rd receiving element, be provided at server by after the data transfer information packet broadcast after merging is in P2P network, server receives the forwarding information of data transfer information bag after merging and confirmation from P2P network; 3rd judging unit, is provided for server and judges whether the hop count corresponding with forwarding information reaches default hop count threshold value in the second preset time period; 4th judging unit, is provided for server and judges whether receive confirmation in default P2P network validation numbers range; Wherein, if server judges that the hop count corresponding with forwarding information does not reach default hop count threshold value in the second preset time period, if or server judges whether receive confirmation in default P2P network validation numbers range, then return and perform the function of the first merge cells.
By the present invention, server is adopted to receive the data transfer information bag of multiple client transmission; Server carries out merging treatment to the data transfer information bag that multiple client sends, and obtains the data transfer information bag after merging; And server by merge after data transfer information packet broadcast in P2P network, the service charge that data transfer information bag reduces each client expenditure is sent by merging, solve the problem needing to spend higher service charge in correlation technique based on the data processing of the task of P2P network, and then reach the effect reducing the service charge of carrying out data batchmove task based on P2P network.
Accompanying drawing explanation
The accompanying drawing forming a application's part is used to provide a further understanding of the present invention, and schematic description and description of the present invention, for explaining the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is the schematic diagram of the data processing equipment of the task based on P2P network according to the embodiment of the present invention;
Fig. 2 is the schematic diagram of the data processing equipment of the preferred task based on P2P network according to the embodiment of the present invention;
Fig. 3 is the another preferred schematic diagram based on the data processing equipment of the task of P2P network according to the embodiment of the present invention;
Fig. 4 is the flow chart of the data processing method of the task based on P2P network according to the embodiment of the present invention;
Fig. 5 is the flow chart of the data processing method of the preferred task based on P2P network according to the embodiment of the present invention;
Fig. 6 is the another preferred flow chart based on the data processing method of the task of P2P network according to the embodiment of the present invention; And
Fig. 7 is the preferred flow chart based on the data processing method of the task of P2P network again according to the embodiment of the present invention.
Embodiment
It should be noted that, when not conflicting, the embodiment in the application and the feature in embodiment can combine mutually.Below with reference to the accompanying drawings and describe the present invention in detail in conjunction with the embodiments.
Better the present invention program is understood in order to make those skilled in the art, below in conjunction with the accompanying drawing in the embodiment of the present invention, to being clearly and completely described in the embodiment of the present invention, obviously, described embodiment is only the embodiment of a part of the present invention, instead of whole embodiments.Based on the embodiment in the present invention, the every other embodiment obtained under those of ordinary skill in the art do not make creative work prerequisite, all should belong to protection scope of the present invention.
It should be noted that, term " first ", " second " etc. in specification of the present invention and claims and above-mentioned accompanying drawing are for distinguishing similar object, and need not be used for describing specific order or precedence.Should be appreciated that the data used like this can be exchanged in the appropriate case, so as embodiments of the invention described herein can with except here diagram or describe those except order implement.In addition, term " comprises " and " having " and their any distortion, and intention is to cover not exclusive comprising.
Embodiment one:
According to embodiments of the invention, provide a kind of data processing equipment of the task based on P2P network, this device is for reducing the service charge spent when carrying out the process of data batchmove task based on P2P network.
Fig. 1 is the schematic diagram of the data processing equipment of the task based on P2P network according to the embodiment of the present invention.
As shown in Figure 1, this device comprises: the first receiving element 10, first merge cells 20 and radio unit 30.
First receiving element 10 is provided for the data transfer information bag that server receives the transmission of multiple client.
Server can for being connected to a terminal in P2P network, and can be mobile phone terminal, terminal and dull and stereotyped computer terminal etc. as the terminal of server.Multiple client also can be multiple terminal, and also can be mobile phone terminal, terminal and dull and stereotyped computer terminal etc. as the terminal of client.
After client and server set up correspondence, client can send data batchmove mission bit stream bag to server, and after user end to server sends data batchmove mission bit stream bag, server can receive the data batchmove mission bit stream bag that multiple client sends, and merging treatment is carried out to these data transfer information bags, obtain the data transfer information bag after merging, and by the data transfer information packet broadcast after merging in P2P network.
Wherein, the content of data transfer information bag can comprise: one or more data batchmove input information and one or more data batchmove output information.Data transfer information bag can be the data transfer information bag of bit coin.Be described in detail for bit coin below.
It should be noted that, bit coin system is the system that a set of bit coin data based on P2P network store, shift, record.Can carry out transferring accounts of bit coin by bit coin system, wherein, transferring accounts of bit coin is data task transfer.Transferring accounts of bit coin, is undertaken forwarding and having confirmed by directional bit coin P2P network broadcast data transinformation bag of transferring accounts, P2P network.It should be noted that, bit coin is after digital signature, and the length of its input information can be 148 bytes, and the length of its output information can be 34 bytes.
Server can adopt various communication modes to receive data transfer information bag from client, and wherein, the communication modes that can adopt can be the Internet, local area network (LAN), scanning Quick Response Code, bluetooth communication, AM/FM communication, GSM communication, NFC and sound wave communication etc.
It should be noted that, server also as a client, can generate data transfer information bag, for completing the later-mentioned step of this method voluntarily.
First merge cells 20 is provided for server and carries out merging treatment to the data transfer information bag that multiple client sends, and obtains the data transfer information bag after merging.
Data transfer information bag after merging can comprise the input of one or more data batchmove information, one or more data batchmove output information and package informatin.The form of data batchmove input information and date transfer output information can be identical with the form of the data transfer information bag that client sends.The length of package informatin can be preset length, and for bit coin, the length of package informatin can be 10 bytes.
For bit coin, server can preserve the data transfer information bag obtained from multiple client, and choose data transfer information bag, until the total length of the data transfer information bag chosen reaches length threshold according to the time order and function order of the data transfer information bag received.Calculate the quantity of input information of the data transfer information bag that these are selected, the quantity of output information, generate package informatin, according to the form of bit coin network convention, arrange the input of these data batchmove information, data batchmove output information, package informatin, generate the data transfer information bag after merging.
Radio unit 30 is provided for server by the data transfer information packet broadcast after merging in P2P network.
For bit coin, service can connect the one or more nodes in bit coin P2P network, the data transfer information bag after merging is sent to the bit coin P2P node of all connections.Wherein, P2P node is client.
Particularly, such as, client 1 have sent data transfer information bag 1 by the Internet to server, wherein, data transfer information bag 1 can comprise: 1 data batchmove input information and 1 data batchmove output information, and total length can be 148+34=182 byte; Client 2 have sent data transfer information bag 2 by the Internet to server, and wherein, data transfer information bag 2 can comprise: 1 data batchmove input information and 2 data batchmove output informations, total length can be 148+34x2=216 byte.Aforesaid 2 data transfer information bags can merge by server, obtain the data transfer information bag after merging, wherein, data transfer information bag after merging can comprise: 2 data batchmove input information, 3 data batchmove output informations and 1 part of package informatin, total length can be 148x2+34x3+10=408 byte.After server is connected to node 1 in the P2P network of bit coin and node 2, the data transfer information bag after merging can be sent to node 1 and node 2 by server.
It should be noted that, in P2P network, the long measure that service charge when bit coin is transferred accounts is collected can be 1024 bytes.If client 1 and client 2 send data transfer information bag separately, then need each payment 1 part of service charge; And if the length of data transfer information bag after merging is less than 1024 bytes, then both only need pay 1 part of service charge, thus saves a service charge, reaches the effect of saving service charge.
Pass through the embodiment of the present invention, server is adopted to receive the data transfer information bag of multiple client transmission, server carries out merging treatment to the data transfer information bag that multiple client sends, obtain the data transfer information packet server after merging by the data transfer information packet broadcast after merging in P2P network, the service charge occurred due to the data transfer information bag after merging independently sends lower than each client the service charge sum that data transfer information contracts for fixed output quotas raw, therefore, the effect of saving service charge is reached.In addition, because the data transfer information bag after merging only has a package informatin, if each client independently sends data transfer information bag, multiple package informatin be produced, therefore reach and save the transmission of data transfer information bag and the effect of memory space.Simultaneously, due to the data transfer information bag from completely irrelevant multiple clients is merged, thus be difficult to identify which data batchmove input information points to which data batchmove output information, therefore also reaches the effect improving client anonymity easily.
Preferably, in embodiments of the present invention, this data processing equipment can also comprise: the second receiving element, generation unit and the first transmitting element.
Second receiving element may be used for making before server receives the data transfer information bag of multiple client transmission, and multiple client receives data batchmove task request message.
Data batchmove task request message can comprise: data batchmove target account information and request msg transfer quantity information.
For bit coin, the request msg transfer quantity in request msg transfer quantity information is exactly the quantity needing the bit coin of transferring accounts.The account of bit coin is a public, private key pair, can derive a bit coin address by PKI simultaneously.Data batchmove target account information can be the PKI of target account, also can be the address of target account.
Client can receive data batchmove task request message from the instruction of user's input or information carrier or other terminal.Such as, the command reception data batchmove task request message that the method that it can pass through input through keyboard input from user; Or data batchmove task request message can be received by the method for scanning Quick Response Code from printed matter; Or data batchmove task request message can be received by the Internet from other terminal.
Generation unit may be used for making multiple client generate data transfer information bag according to data batchmove task request message.
Data transfer information bag can input information by one or more data batchmove, one or more data batchmove output information is formed.Data batchmove output information can comprise data batchmove target account and data batchmove quantity.Data batchmove input information can be the output information of the data transfer information bag of account that controls by the sensing client of P2P network reception.
Client according to the request msg transfer quantity in data batchmove task request message, can find and can meet data batchmove input information corresponding to request msg transfer quantity; And data batchmove output information can be generated according to the data batchmove target account information of data batchmove task request message and request msg transfer quantity.
Such as, in bit coin system, client can control one or more bit coin account.Client can find governable data batchmove input information from controlled bit coin account.Wherein, governable data batchmove input information can be not yet by that use, last point to client the data batchmove output information of the data transfer information bag of account that controls.The each data batchmove output information of bit coin network provision can only be only used once.Client constantly can be chosen from governable data batchmove input information, until the service charge sum that total input data volume of the governable data batchmove input information chosen is more than or equal to request msg transfer quantity and should shares according to treaty rule, then these selected data batchmove input information can be used as the data batchmove input information of data transfer information bag.
The the first data batchmove output information generated can be information and the request msg transfer quantity information of target account.Wherein, if the service charge sum that total input data volume of governable data batchmove input information is greater than request msg transfer quantity and should shares according to treaty rule, can generating content be then the second data batchmove output information of the accounts information that client controls, and total input data volume of governable data batchmove input information deduct request msg transfer quantity and deduct volume residual after the service charge should shared according to treaty rule again.
Selected data batchmove input information and the first data batchmove output information of generation and the second data batchmove output information can be generated data transfer information bag according to preset format by client.
First transmitting element may be used for making multiple client that data transfer information bag is sent to server.
To be sent as example by the Internet, multiple client can find server by the domain name of server or IP address, and can initiatively connect with server, and then initiatively data transfer information bag can be sent to server.
Before transmission data transfer information bag, manual confirmation can be carried out by the user of client.The mode of manual confirmation can be that the confirmations such as input password, button, voice confirm.
Pass through the embodiment of the present invention, multiple client is adopted to receive data batchmove task request message, multiple client generates data transfer information bag according to data batchmove task request message, data transfer information bag is sent to server by multiple client, because multiple data transfer information bag can be submitted to server by multiple irrelevant client on one's own initiative, therefore, reach and realize server and obtain from the effect of the data transfer information bag of multiple client.
Preferably, in embodiments of the present invention, this data processing equipment can also comprise: the first signature unit.
First signature unit may be used for making before data transfer information bag is sent to server by multiple client, multiple client carries out digital signature to data transfer information bag corresponding with self in data transfer information bag respectively, obtains the data transfer information bag after digital signature.
Wherein, the first transmitting element can also be provided for multiple client and respectively the data transfer information bag after the digital signature corresponding with self is sent to server.
Wherein, after the data transfer information bag after obtaining digital signature, S6 can be that the data transfer information bag after the digital signature corresponding with self is sent to server by multiple client respectively.
It should be noted that, to be initiated by account controlling party to ensure to transfer accounts, the digital signature that P2P network can require the data transfer information bag of transferring accounts must provide the private key inputting account corresponding to information by data batchmove to carry out.P2P network can require that each data batchmove in data transfer information bag inputs information and provides a digital signature.Wherein, the mode of digital signature can be only point to the signature of data batchmove input information, also can be the signature pointing to data batchmove input information and a data batchmove output information.
Data transfer information bag after digital signature can comprise data batchmove input information, each data batchmove inputs information corresponding digital signature, data batchmove output information.
Pass through the embodiment of the present invention, multiple client is adopted to carry out digital signature to data transfer information bag corresponding with self in data transfer information bag respectively, just digital signature can be carried out owing to only having control account private key, therefore, reach the requirement meeting P2P network data transinformation packet format, and improve the effect of data transfer security.
Preferably, in embodiments of the present invention, this generation unit can comprise: acquisition module, determination module and the first generation module.
Acquisition module may be used for making multiple client obtain governable data batchmove input information.
Client finds governable data batchmove input information from controlled account.It should be noted that, client can control one or more account.Data batchmove input information can be the data batchmove output information of the data transfer information bag of account that controls by the sensing client of P2P network validation.The each data batchmove output information of bit coin network provision can only be only used once.Governable data batchmove input information can be not yet by the data batchmove input information used.Client can input the minimum principle of information number according to data batchmove and obtain governable data batchmove input information, or when data batchmove input information number is identical, the minimum principle of data batchmove output information number obtains governable data batchmove input information.
Such as, the service charge sum whether the input data bulk first can searching existing governable data batchmove input information just equals request msg transfer quantity and should share according to treaty rule.It should be noted that, the treaty rule that service charge is shared can be share according to the length of data transfer information bag.For bit coin network, the length of a data batchmove input information can be 148 bytes, and the long measure that service charge is collected can be 1024 bytes, then a data batchmove inputs the service charge that information should share 148/1024 part.It should be noted that, if had, then can obtain this governable data batchmove input information.If the service charge sum that the input data bulk whether having governable data batchmove to input information is greater than request msg transfer quantity and should shares according to treaty rule no, then can be searched.If had, then can obtain input data bulk and be greater than in request msg transfer quantity and the data batchmove input information of the domination of service charge sum that should share according to treaty rule and input a minimum governable data batchmove input information of data bulk.If do not had, then constantly can choose by data batchmove quantity order from big to small from the governable data batchmove input information that data batchmove quantity is maximum, until the service charge sum that total input data volume of the governable data batchmove quantity input information chosen is more than or equal to request msg transfer quantity and should shares according to treaty rule, these selected data batchmove quantity input information can be used as the data batchmove quantity input information of data transfer information bag.
Determination module may be used for making multiple client according to governable data batchmove input information and data batchmove task request message and preset data jump condition determination data batchmove output information.
Data batchmove output information can comprise target account information and the data batchmove quantity corresponding with this target account.It should be noted that, bit coin system has one " small change " mechanism.Namely the data batchmove quantity sum of all data batchmove quantity input information deducts request msg transfer quantity, after deducting the service charge that rule needs are shared according to a preconcerted arrangement again, if there is remaining data amount, then need to output to the account that a transmit leg provides, i.e. " small change ".Preset data jump condition can be that setting small change points to one or more account.Such as, the content of the data batchmove output information 1 of generation can be information and the request msg transfer quantity of target account.The content of the data batchmove output information 2 generated can be the small change account of preset data jump condition setting and remaining data amount.
First generation module may be used for making multiple client input information and data batchmove output information and the first preset format according to governable data batchmove and generates data transfer information bag.
Such as, the first preset format can be: the number of data batchmove input information, integer 1 byte; The data batchmove input information of corresponding number; The number of data batchmove output information, integer 1 byte; The data batchmove output information of corresponding number.
Each client can arrange according to the data batchmove of various acquisition the number that data batchmove input information calculates data batchmove input information; And the number of data batchmove output information can be calculated according to the data batchmove output information generated; And data transfer information bag can be generated according to the order of the first preset format.
Pass through the embodiment of the present invention, multiple client is adopted to obtain governable data batchmove input information, multiple client is according to governable data batchmove input information and data batchmove task request message and preset data jump condition determination data batchmove output information, multiple client inputs information and data batchmove output information and the first preset format according to governable data batchmove and generates data transfer information bag, because under the prerequisite meeting data transfer request, data transfer information packet length is the shortest, therefore, reach the effect of saving service charge and saving the bag transmission of P2P network data transinformation and memory space.
Fig. 2 is the schematic diagram of the data processing equipment of the preferred task based on P2P network according to the embodiment of the present invention.
As shown in Figure 2, this embodiment can as preferred implementation embodiment illustrated in fig. 1, the data processing equipment of the task based on P2P network of this embodiment, except the first receiving element 10, first merge cells 20 of comprising previous embodiment and radio unit 30, also comprises the second transmitting element 40, second signature unit 50, feedback unit 60 and the second merge cells 70.
First receiving element 10 and the effect of the first merge cells 20 and identical in previous embodiment, do not repeat them here.
Second transmitting element 40 may be used for making to carry out merging treatment at server to the data transfer information bag that multiple client sends, after obtaining the data transfer information bag after merging, the data batchmove output information in the data transfer information bag after merging is sent to multiple client by server.
At server, merging treatment is carried out to the data transfer information bag that multiple client sends, after obtaining the data transfer information bag after merging, perform the function of the second transmitting element 40.It should be noted that, in order to ensure that data batchmove task is initiated by the controlling party of data, P2P network can require that each data batchmove inputs information and will have corresponding digital signature.
The mode of digital signature can be for a data batchmove input information, or can be all data batchmove output informations for whole data transfer information bag.Thus, server only has and carries out merging treatment to the data transfer information bag that multiple client sends, and obtains the data transfer information bag after merging, after determining all data batchmove output information, just can carry out the signature of this type.
When carrying out digital signature, the total data of the data transfer information bag after merging transfer output information can be sent to the client of the correspondence of each data transfer information bag of the data transfer information bag after forming this merging by server.The communication modes that server sends data batchmove output information can be adopt the mode identical with the mode obtaining data transfer information bag, does not repeat them here.For the ease of coupling, server can send the sequence number that server is the data transfer information bag setting after this merging simultaneously.
Second signature unit 50 may be used for making multiple client carry out digital signature to data batchmove output information respectively, obtains the digital signature corresponding with self.
The digital signature that digital signature can be all data batchmove output information for data batchmove input information and whole data transfer information bag and carry out.The method of digital signature can be adopt elliptic curve encryption algorithm, the private key corresponding according to data batchmove input information and digital signature for the cryptographic Hash of information, calculate digital signature information.
Such as, digital signature for information can be data batchmove input information A and data batchmove output information B, data batchmove output information C.First data batchmove can be inputted information A and data batchmove output information B by client, data batchmove output information C tri-information merge into information for calculating cryptographic Hash.Client can use SHA256D algorithm to carry out computing for the information for calculating cryptographic Hash, obtains the cryptographic Hash being used for digital signature.Client can use ECDSA algorithm, utilizes data batchmove to input private key corresponding to information A and the cryptographic Hash for digital signature, calculates digital signature information.
Feedback unit 60 may be used for making multiple client respectively the digital signature corresponding with self be fed back to server.
The communication modes of self corresponding digital signature of user end to server feedback can be adopt the communication modes sending data transfer information bag, does not repeat them here.
It should be noted that, for the ease of coupling, client can send to server the sequence number that server is the data transfer information bag setting after this merging; Or client is the sequence number of the data transfer information bag setting corresponding with self.
Second merge cells 70 may be used for the digital signature corresponding with self of multiple client is merged in the data transfer information bag after merging by server, obtains the data transfer information bag of the digital signature corresponding with self comprising multiple client.
Such as, the data transfer information bag after merging can comprise: 2 data batchmove input information and 3 data batchmove output informations.Server can receive 2 corresponding digital signature of 2 data batchmove input information.Each data batchmove input information can be merged into the data batchmove after digital signature with corresponding digital signature and input information by server; The content comprising the data transfer information bag of the digital signature corresponding with self of multiple client is: data batchmove input information, data batchmove output information number numeral the 3, the 1st data batchmove output information, the 2nd data batchmove output information and the 3rd data batchmove output information after the data batchmove input information after data batchmove input information number numeral the 2, the 1st digital signature, the 2nd digital signature.
Wherein, radio unit 30 can also be provided for server and will comprise the data transfer information packet broadcast of the digital signature corresponding with self of multiple client in P2P network.
Pass through the embodiment of the present invention, adopt server that the data batchmove output information in the data transfer information bag after merging is sent to multiple client, multiple client carries out digital signature to data batchmove output information respectively, obtains the digital signature corresponding with self; The digital signature corresponding with self is fed back to server by multiple client respectively; The digital signature corresponding with self of multiple client is merged in the data transfer information bag after merging by server, obtains the data transfer information bag of the digital signature corresponding with self comprising multiple client; Server will comprise the data transfer information packet broadcast of the digital signature corresponding with self of multiple client in P2P network, just digital signature can be carried out owing to only having the data transfer information bag after generating merging, only control account private key and just can carry out digital signature, therefore, reach the requirement meeting P2P network data transinformation packet format, and improve the effect of data transfer security.
Preferably, in embodiments of the present invention, this data processing equipment can also comprise: the first judging unit and delete cells.
First judging unit may be used for making after the digital signature corresponding with self is fed back to server by multiple client respectively, and server judges that receive in the first preset time period whether to reach preset value with the number of each corresponding digital signature in multiple client.
It should be noted that, in order to ensure the safety of data batchmove, P2P network can require that each data batchmove in data transfer information bag inputs information and will have corresponding digital signature.Thus, as long as lack a digital signature, whole data transfer information bag all cannot be accepted by P2P network.Thus, should timeout mechanism be set, with prevent certain client because of certain reason cannot feedback digital signature and cause the data transfer information bag of other client cannot be merged and be broadcast in P2P network.
It should be noted that, the preset value of digital signature number can be the number of the data batchmove input information in the data transfer information bag after merging.First preset time period can be a time span value, such as 1 second.
If delete cells may be used for making server to judge that receive in the first preset time period not reach preset value with the number of each corresponding digital signature in multiple client, the data transfer information bag then not receiving digital signature is deleted, and returns and perform the function of the first merge cells 20.
Such as, one merge after data transfer information bag formed by 10 data transfer information inclusions, thus, need 10 corresponding client feedback digital signature.Timing can be started after the data batchmove output information in the data transfer information bag after merging is sent to 10 clients by server, if the time reaches the first preset time period (as 1 second), and server only have received the digital signature of 9 client feedback, then the data transfer information bag that client that server can delete non-feedback digital signature is submitted to.Simultaneously, in this first preset time period (as 1 second), server have received again 2 new data transfer information bags, then server can by originally remaining 9 add 2 the data transfer information bags newly received, be merged into the data transfer information bag after new merging, the data batchmove output information in the data transfer information bag after new merging can be sent to 11 clients by server.
By the embodiment of the present invention, server is adopted to judge that receive in the first preset time period whether to reach preset value with the number of each corresponding digital signature in multiple client, if server is judged that receive in the first preset time period not reach preset value with the number of each corresponding digital signature in multiple client, then the data transfer information bag not receiving digital signature is deleted, and return and perform server merging treatment is carried out to the data transfer information bag that multiple client sends, obtain the step of the data transfer information bag after merging, owing to setting the timeout mechanism of digital signature feedback, therefore, reach avoid certain client because of certain reason cannot feedback digital signature and cause the data transfer information bag of other client cannot the merged and effect that is broadcast in P2P network.
Fig. 3 is the another preferred schematic diagram based on the data processing equipment of the task of P2P network according to the embodiment of the present invention.
As shown in Figure 3, this embodiment can as preferred implementation embodiment illustrated in fig. 1, the data processing equipment of the task based on P2P network of this embodiment is except comprising the first receiving element 10, first merge cells 20 and radio unit 30 of previous embodiment, wherein, the first merge cells 20 comprises judge module 201, composite module 202 and the second generation module 203.
First receiving element 10 and the effect of radio unit 30 and identical in previous embodiment, do not repeat them here.
Whether the data transfer information bag that judge module 201 may be used for making server judge to receive is valid data transinformation bag.
It should be noted that, only have valid data transinformation bag could be accepted by P2P network, data batchmove task just can be reached.As long as have in data transfer information bag one invalid, the data transfer information bag after merging is exactly invalid.Thus, must first judge whether the data transfer information bag received is valid data transinformation bag before generating the data transfer information bag merged.
Server judges that whether the data transfer information bag that receives is the method for valid data transinformation bag, can comprise: judge that whether the form of data transfer information bag is correct; Judge that whether each data batchmove input information is as arranging data batchmove input information; Judge whether the input data volume sum of data transfer information bag is greater than output data quantity sum and adds regular service charge of sharing according to a preconcerted arrangement; Judge that whether the digital signature that each data batchmove inputs information corresponding is correct; If above any one is judged as NO, then judge that this data transfer information bag is not valid data transinformation bag.
If the data transfer information bag that composite module 202 may be used for making server judge to receive is valid data transinformation bag, then valid data transinformation bag is combined, obtain the valid data transinformation bag after combining.
Server to the method that valid data transinformation bag combines can be: judge whether the summation of the length value of all valid data transinformation bags is greater than the second length value, if be not more than, then all valid data transinformation packages are combined into the valid data transinformation bag after combination; If exceeded, then reject valid data transinformation bag one by one according to time inverted order, until the summation of the length value of remaining valid data transinformation bag is less than or equal to the second length value, then remaining valid data transinformation package is combined into the valid data transinformation bag after combination.
It should be noted that, based on the service charge collection methods of bit coin network, the data transfer information Bao Yuechang of merging, then the service charge of saving is more.But the length of the data transfer information bag that bit coin network is combined has a upper limit requirement; In addition, the data transfer information Bao Yuechang after merging, then need the data transfer information Bao Yue merged many, also just mean that the times more of a specified duration such as needs just can gather together enough, mean that the stand-by period of client can be elongated.So server according to the data transfer information bag quantity received in the unit interval and can stand-by period of client tolerance, can decide length limit---second length value of data transfer information bag after the merging merged.
Second generation module 203 may be used for making server that the valid data transinformation bag after combination is generated the data transfer information bag after merging according to the second preset format.
Second preset format can be the data transfer information packet format of bit coin P2P network convention, and it can comprise: the number of version information, data batchmove input information, data batchmove input information, the number of data batchmove output information, data batchmove output information and locking time.
Wherein, version information can be the version of the second preset format; Locking time can be can by the shortest time of again shifting from the data transfer information packet broadcast after this merging to output information wherein.In example of the present invention, locking time can be set to 0.
Pass through the embodiment of the present invention, server is adopted to judge whether the data transfer information bag received is valid data transinformation bag, if server judges that the data transfer information bag received is valid data transinformation bag, then valid data transinformation bag is combined, obtain the valid data transinformation bag after combining, valid data transinformation bag after combination is generated the data transfer information bag after merging according to the second preset format by server, due to the data transfer information Bao Yuechang merged, the service charge of then saving is more, therefore, reach the effect of saving service charge further.
Preferably, in embodiments of the present invention, this data processing equipment can also comprise: determining unit, the second judging unit
Determining unit may be used for making after obtaining the valid data transinformation bag after combining, and server determines the length value of the valid data transinformation bag after combining.
It should be noted that, the length value of the valid data transinformation bag after combination can be the summation of each valid data transinformation packet length value in combination, adds packet length information.
Second judging unit may be used for that server is judged, and whether the difference of the integral multiple of length value and preset length value is minimum value.
Wherein, if the first merge cells 20 can also be provided for server and judge that the difference of the integral multiple of length value and preset length value is minimum value, then the valid data transinformation bag after combination is generated the data transfer information bag after merging according to the second preset format by server.
It should be noted that, service charge collection methods due to bit coin network collects according to the integral multiple of preset length value, collecting by upper integral multiple of not enough integral multiple, so the length of data transfer information bag is more close to the integral multiple of preset length value, then the service charge of saving is more.
Such as, in bit coin system, have 10 valid data transinformation bags, be 1 input, 1 output, then length is 182 bytes.So, the length value of the valid data transinformation bag after combination, can have 10 kinds, be 192 respectively, 374,556,738,920,1102,1284,1466,1648,1830.And the preset length value that the service charge of bit coin is collected is 1024 bytes, thus be less than preset length value integral multiple and difference minimum be 920, differ 104 bytes.Thus, 5 valid data transinformation bags are chosen as the valid data transinformation bag after combination.
Pass through the embodiment of the present invention, server is adopted to determine the length value of the valid data transinformation bag after combining, server judges whether the difference of the integral multiple of length value and preset length value is minimum value, if server judges that the difference of the integral multiple of length value and preset length value is minimum value, then the valid data transinformation bag after combination is generated the data transfer information bag after merging according to the second preset format by server, because the length of data transfer information bag is more close to the integral multiple of preset length value, the service charge of then saving is more, therefore, reach the effect of saving service charge further.
Preferably, in embodiments of the present invention, this data processing equipment can also comprise: the 3rd receiving element, the 3rd judging unit and the 4th judging unit.
3rd receiving element may be used for making at server by after the data transfer information packet broadcast after merging is in P2P network, and server receives forwarding information and the confirmation of the data transfer information bag after merging from P2P network.
It should be noted that, the data transfer information bag after merging only has and is accepted by P2P network, and data batchmove just can come into force.Data transfer information bag after merging is not obtain in the waiting process of data transfer information bag and digital signature at server by the main reason of P2P network reception, some data batchmove input information is made to have used up in addition, cause having occurred invalid data transfer input information, and then the data transfer information bag after whole merging was lost efficacy, therefore, need to follow the trail of the data transfer information bag after broadcasting.
Whether the data transfer information bag after bit coin network is combined effectively judges can comprise: forward and confirm.
Wherein, forwarding is after the data transfer information bag after P2P node receives a merging, carries out Effective judgement to it, if it is determined that be effectively, then all P2P nodes connected to this node send the data transfer information bag after this merging.If the data transfer information bag after a merging is effective, then can spread all over whole P2P network very soon, and multiple P2P nodes that can connect from server repeatedly pass server back.Data transfer information package informatin after the merging that server receives from P2P node, referred to as forwarding information.
Confirm to refer to and can prevent dual payment by affirmation mechanism.Dual payment refers to that same data batchmove input information puts into two different data transfer information bags respectively, and points to different output target account, is broadcast to P2P network simultaneously.P2P network can by calculating the bright mechanism of strong evidence, and regular random selecting node confirms the data transfer information bag received.If find dual payment, then only confirm that data transfer information bag first received, after the calcellation that receives.The data transfer information bag of confirmation is packaged into confirmation bag by this node, is broadcast to P2P network.The confirmation packets of information that server receives from P2P network node, if wherein contain the data transfer information bag after described merging, referred to as confirmation.
3rd judging unit may be used for that server is judged, and whether the hop count corresponding with forwarding information reaches default hop count threshold value in the second preset time period.
Such as, presetting hop count threshold value is 2, and the second Preset Time is 1 minute.If the hop count of the forwarding information received in 1 minute is less than 2 times, then judged result is no; Otherwise be yes.
4th judging unit may be used for making server judge whether receive confirmation in default P2P network validation numbers range.
Such as, presetting P2P network validation numbers range is 2 times.If do not comprise the data transfer information bag after this merging in first confirmation bag after the data transfer information bag after merging is issued, but include the data transfer information bag after merging in second confirmation bag, then judged result is yes.
Wherein, if server judges that the hop count corresponding with forwarding information does not reach default hop count threshold value in the second preset time period, if or server judges whether receive confirmation in default P2P network validation numbers range, then return and perform the function of the first merge cells 20.
If server judges that the hop count corresponding with forwarding information does not reach default hop count threshold value in the second preset time period, if or server is judged not receive confirmation in default P2P network validation numbers range, then mean that the data transfer information bag after merging is refused by P2P network, namely the data transfer information bag after merging is invalid data transinformation bag, should cancel.This wherein probably has one or more data transfer information bag to become invalid data transinformation bag, so need to get back to initial server to carry out merging treatment to the data transfer information bag that multiple client sends, obtain the step of the data transfer information bag after merging.
Pass through the embodiment of the present invention, adopt server from P2P network, receive forwarding information and the confirmation of the data transfer information bag after merging, server judges whether the hop count corresponding with forwarding information reaches default hop count threshold value in the second preset time period, server judges whether receive confirmation in default P2P network validation numbers range, if server judges that the hop count corresponding with forwarding information does not reach default hop count threshold value in the second preset time period, if or server judges whether receive confirmation in default P2P network validation numbers range, then return and perform server and merging treatment is carried out to the data transfer information bag that multiple client sends, obtain the step of the data transfer information bag after merging, owing to passing through whether to follow the trail of the data transfer information bag after merging by P2P network reception, therefore, reach the effect avoided because partial data transfer input information is caused the data transfer information bag from multiple client to perform a data-transfer operation by using in addition.
Embodiment two
According to embodiments of the invention, additionally provide a kind of data processing method of the task based on P2P network, for reducing the service charge spent when carrying out the process of data batchmove task based on P2P network.Should may operate on computer-processing equipment based on the data processing method of the task of P2P network.Data processing method based on the task of P2P network can be performed by the data processing equipment of the task based on P2P network of the embodiment of the present invention, and the data processing equipment of the task based on P2P network of the embodiment of the present invention also may be used for the data processing method of the task based on P2P network performing the embodiment of the present invention.
Fig. 4 is the flow chart of the data processing method of the task based on P2P network according to the embodiment of the present invention.
As shown in Figure 4, the method comprises following step:
Step S402, server receives the data transfer information bag that multiple client sends.
Server can for being connected to a terminal in P2P network, and can be mobile phone terminal, terminal and dull and stereotyped computer terminal etc. as the terminal of server.Multiple client also can be multiple terminal, and also can be mobile phone terminal, terminal and dull and stereotyped computer terminal etc. as the terminal of client.
After client and server set up correspondence, client can send data batchmove mission bit stream bag to server, and after user end to server sends data batchmove mission bit stream bag, server can receive the data batchmove mission bit stream bag that multiple client sends, and merging treatment is carried out to these data transfer information bags, obtain the data transfer information bag after merging, and by the data transfer information packet broadcast after merging in P2P network.
Wherein, the content of data transfer information bag can comprise: one or more data batchmove input information and one or more data batchmove output information.Data transfer information bag can be the data transfer information bag of bit coin.Be described in detail for bit coin below.
It should be noted that, bit coin system is the system that a set of bit coin data based on P2P network store, shift, record.Can carry out transferring accounts of bit coin by bit coin system, wherein, transferring accounts of bit coin is data task transfer.Transferring accounts of bit coin, is undertaken forwarding and having confirmed by directional bit coin P2P network broadcast data transinformation bag of transferring accounts, P2P network.It should be noted that, bit coin is after digital signature, and the length of its input information can be 147-148 byte, and the length of its output information can be 33-34 byte.
Server can adopt various communication modes to receive data transfer information bag from client, and wherein, the communication modes that can adopt can be the Internet, local area network (LAN), scanning Quick Response Code, bluetooth communication, AM/FM communication, GSM communication, NFC and sound wave communication etc.
It should be noted that, server also as a client, can generate data transfer information bag, for completing the later-mentioned step of this method voluntarily.
Step S404, server carries out merging treatment to the data transfer information bag that multiple client sends, and obtains the data transfer information bag after merging.
Data transfer information bag after merging can comprise the input of one or more data batchmove information, one or more data batchmove output information and package informatin.The form of data batchmove input information and date transfer output information can be identical with the form of the data transfer information bag that client sends.The length of package informatin can be preset length, and for bit coin, the length of package informatin can be 10 bytes.
For bit coin, server can preserve the data transfer information bag obtained from multiple client, and choose data transfer information bag, until the total length of the data transfer information bag chosen reaches length threshold according to the time order and function order of the data transfer information bag received.Calculate the quantity of input information of the data transfer information bag that these are selected, the quantity of output information, generate package informatin, according to the form of bit coin network convention, arrange the input of these data batchmove information, data batchmove output information, package informatin, generate the data transfer information bag after merging.
Step S406, server by merge after data transfer information packet broadcast in P2P network.
For bit coin, service can connect the one or more nodes in bit coin P2P network, the data transfer information bag after merging is sent to the bit coin P2P node of all connections.Wherein, P2P node is client.
Particularly, such as, client 1 have sent data transfer information bag 1 by the Internet to server, wherein, data transfer information bag 1 can comprise: 1 data batchmove input information and 1 data batchmove output information, and total length can be 148+34=182 byte; Client 2 have sent data transfer information bag 2 by the Internet to server, and wherein, data transfer information bag 2 can comprise: 1 data batchmove input information and 2 data batchmove output informations, total length can be 148+34x2=216 byte.Aforesaid 2 data transfer information bags can merge by server, obtain the data transfer information bag after merging, wherein, data transfer information bag after merging can comprise: 2 data batchmove input information, 3 data batchmove output informations and 1 part of package informatin, total length can be 148x2+34x3+10=408 byte.After server is connected to node 1 in the P2P network of bit coin and node 2, the data transfer information bag after merging can be sent to node 1 and node 2 by server.
It should be noted that, in P2P network, the long measure that service charge when bit coin is transferred accounts is collected can be 1024 bytes.If client 1 and client 2 send data transfer information bag separately, then need each payment 1 part of service charge; And if the length of data transfer information bag after merging is less than 1024 bytes, then both only need pay 1 part of service charge, thus saves a service charge, reaches the effect of saving service charge.
Pass through the embodiment of the present invention, server is adopted to receive the data transfer information bag of multiple client transmission, server carries out merging treatment to the data transfer information bag that multiple client sends, obtain the data transfer information packet server after merging by the data transfer information packet broadcast after merging in P2P network, the service charge occurred due to the data transfer information bag after merging independently sends lower than each client the service charge sum that data transfer information contracts for fixed output quotas raw, therefore, the effect of saving service charge is reached.In addition, because the data transfer information bag after merging only has a package informatin, if each client independently sends data transfer information bag, multiple package informatin be produced, therefore reach and save the transmission of data transfer information bag and the effect of memory space.Simultaneously, due to the data transfer information bag from completely irrelevant multiple clients is merged, thus be difficult to identify which data batchmove input information points to which data batchmove output information, therefore also reaches the effect improving client anonymity easily.
Preferably, in embodiments of the present invention, receive the data transfer information bag of multiple client transmission at server before, data transfer information bag can be sent to server by multiple client in the following manner:
S2, multiple client receives data batchmove task request message.
Data batchmove task request message can comprise: data batchmove target account information and request msg transfer quantity information.
For bit coin, the request msg transfer quantity in request msg transfer quantity information is exactly the quantity needing the bit coin of transferring accounts.The account of bit coin is a public, private key pair, can derive a bit coin address by PKI simultaneously.Data batchmove target account information can be the PKI of target account, also can be the address of target account.
Client can receive data batchmove task request message from the instruction of user's input or information carrier or other terminal.Such as, the command reception data batchmove task request message that the method that it can pass through input through keyboard input from user; Or data batchmove task request message can be received by the method for scanning Quick Response Code from printed matter; Or data batchmove task request message can be received by the Internet from other terminal.
S4, multiple client generates data transfer information bag according to data batchmove task request message.
Data transfer information bag can input information by one or more data batchmove, one or more data batchmove output information is formed.Data batchmove output information can comprise data batchmove target account and data batchmove quantity.Data batchmove input information can be the output information of the data transfer information bag of account that controls by the sensing client of P2P network reception.
Client according to the request msg transfer quantity in data batchmove task request message, can find and can meet data batchmove input information corresponding to request msg transfer quantity; And data batchmove output information can be generated according to the data batchmove target account information of data batchmove task request message and request msg transfer quantity.
Such as, in bit coin system, client can control one or more bit coin account.Client can find governable data batchmove input information from controlled bit coin account.Wherein, governable data batchmove input information can be not yet by that use, last point to client the data batchmove output information of the data transfer information bag of account that controls.The each data batchmove output information of bit coin network provision can only be only used once.Client constantly can be chosen from governable data batchmove input information, until the service charge sum that total input data volume of the governable data batchmove input information chosen is more than or equal to request msg transfer quantity and should shares according to treaty rule, then these selected data batchmove input information can be used as the data batchmove input information of data transfer information bag.
The the first data batchmove output information generated can be information and the request msg transfer quantity information of target account.Wherein, if the service charge sum that total input data volume of governable data batchmove input information is greater than request msg transfer quantity and should shares according to treaty rule, can generating content be then the second data batchmove output information of the accounts information that client controls, and total input data volume of governable data batchmove input information deduct request msg transfer quantity and deduct volume residual after the service charge should shared according to treaty rule again.
Selected data batchmove input information and the first data batchmove output information of generation and the second data batchmove output information can be generated data transfer information bag according to preset format by client.
S6, data transfer information bag is sent to server by multiple client.
To be sent as example by the Internet, multiple client can find server by the domain name of server or IP address, and can initiatively connect with server, and then initiatively data transfer information bag can be sent to server.
Before transmission data transfer information bag, manual confirmation can be carried out by the user of client.The mode of manual confirmation can be that the confirmations such as input password, button, voice confirm.
Pass through the embodiment of the present invention, multiple client is adopted to receive data batchmove task request message, multiple client generates data transfer information bag according to data batchmove task request message, data transfer information bag is sent to server by multiple client, because multiple data transfer information bag can be submitted to server by multiple irrelevant client on one's own initiative, therefore, reach and realize server and obtain from the effect of the data transfer information bag of multiple client.
Further preferably, in embodiments of the present invention, before data transfer information bag is sent to server by multiple client, this data processing method can also comprise:
S8, multiple client carries out digital signature to data transfer information bag corresponding with self in data transfer information bag respectively, obtains the data transfer information bag after digital signature.
Wherein, after the data transfer information bag after obtaining digital signature, S6 can be that the data transfer information bag after the digital signature corresponding with self is sent to server by multiple client respectively.
It should be noted that, to be initiated by account controlling party to ensure to transfer accounts, the digital signature that P2P network can require the data transfer information bag of transferring accounts must provide the private key inputting account corresponding to information by data batchmove to carry out.P2P network can require that each data batchmove in data transfer information bag inputs information and provides a digital signature.Wherein, the mode of digital signature can be only point to the signature of data batchmove input information, also can be the signature pointing to data batchmove input information and a data batchmove output information.
Data transfer information bag after digital signature can comprise data batchmove input information, each data batchmove inputs information corresponding digital signature, data batchmove output information.
Pass through the embodiment of the present invention, multiple client is adopted to carry out digital signature to data transfer information bag corresponding with self in data transfer information bag respectively, just digital signature can be carried out owing to only having control account private key, therefore, reach the requirement meeting P2P network data transinformation packet format, and improve the effect of data transfer security.
Preferably, in embodiments of the present invention, multiple client can generate data transfer information bag in the following manner:
S10, multiple client obtains governable data batchmove input information.
Client finds governable data batchmove input information from controlled account.It should be noted that, client can control one or more account.Data batchmove input information can be the data batchmove output information of the data transfer information bag of account that controls by the sensing client of P2P network validation.The each data batchmove output information of bit coin network provision can only be only used once.Governable data batchmove input information can be not yet by the data batchmove input information used.Client can input the minimum principle of information number according to data batchmove and obtain governable data batchmove input information, or when data batchmove input information number is identical, the minimum principle of data batchmove output information number obtains governable data batchmove input information.
Such as, the service charge sum whether the input data bulk first can searching existing governable data batchmove input information just equals request msg transfer quantity and should share according to treaty rule.It should be noted that, the treaty rule that service charge is shared can be share according to the length of data transfer information bag.For bit coin network, the length of a data batchmove input information can be 148 bytes, and the long measure that service charge is collected can be 1024 bytes, then a data batchmove inputs the service charge that information should share 148/1024 part.It should be noted that, if had, then can obtain this governable data batchmove input information.If the service charge sum that the input data bulk whether having governable data batchmove to input information is greater than request msg transfer quantity and should shares according to treaty rule no, then can be searched.If had, then can obtain input data bulk and be greater than in request msg transfer quantity and the data batchmove input information of the domination of service charge sum that should share according to treaty rule and input a minimum governable data batchmove input information of data bulk.If do not had, then constantly can choose by data batchmove quantity order from big to small from the governable data batchmove input information that data batchmove quantity is maximum, until the service charge sum that total input data volume of the governable data batchmove quantity input information chosen is more than or equal to request msg transfer quantity and should shares according to treaty rule, these selected data batchmove quantity input information can be used as the data batchmove quantity input information of data transfer information bag.
S12, multiple client is according to governable data batchmove input information and data batchmove task request message and preset data jump condition determination data batchmove output information.
Data batchmove output information can comprise target account information and the data batchmove quantity corresponding with this target account.It should be noted that, bit coin system has one " small change " mechanism.Namely the data batchmove quantity sum of all data batchmove quantity input information deducts request msg transfer quantity, after deducting the service charge that rule needs are shared according to a preconcerted arrangement again, if there is remaining data amount, then need to output to the account that a transmit leg provides, i.e. " small change ".Preset data jump condition can be that setting small change points to one or more account.Such as, the content of the data batchmove output information 1 of generation can be information and the request msg transfer quantity of target account.The content of the data batchmove output information 2 generated can be the small change account of preset data jump condition setting and remaining data amount.
S14, multiple client inputs information and data batchmove output information and the first preset format according to governable data batchmove and generates data transfer information bag.
Such as, the first preset format can be: the number of data batchmove input information, integer 1 byte; The data batchmove input information of corresponding number; The number of data batchmove output information, integer 1 byte; The data batchmove output information of corresponding number.
Each client can arrange according to the data batchmove of various acquisition the number that data batchmove input information calculates data batchmove input information; And the number of data batchmove output information can be calculated according to the data batchmove output information generated; And data transfer information bag can be generated according to the order of the first preset format.
Pass through the embodiment of the present invention, multiple client is adopted to obtain governable data batchmove input information, multiple client is according to governable data batchmove input information and data batchmove task request message and preset data jump condition determination data batchmove output information, multiple client inputs information and data batchmove output information and the first preset format according to governable data batchmove and generates data transfer information bag, because under the prerequisite meeting data transfer request, data transfer information packet length is the shortest, therefore, reach the effect of saving service charge and saving the bag transmission of P2P network data transinformation and memory space.
Fig. 5 is the flow chart of the data processing method of the preferred task based on P2P network according to the embodiment of the present invention.
As shown in Figure 5, should comprise following step S502 to step S514 based on the data processing method of the task of P2P network, this embodiment can as preferred implementation embodiment illustrated in fig. 4.
Step S502 and step S504, respectively with step S402 embodiment illustrated in fig. 4 and step S404, does not repeat them here.
Step S506, the data batchmove output information in the data transfer information bag after merging is sent to multiple client by server.
At server, merging treatment is carried out to the data transfer information bag that multiple client sends, after obtaining the data transfer information bag after merging, perform step S506.It should be noted that, in order to ensure that data batchmove task is initiated by the controlling party of data, P2P network can require that each data batchmove inputs information and will have corresponding digital signature.
The mode of digital signature can be for a data batchmove input information, or can be all data batchmove output informations for whole data transfer information bag.Thus, server only has and carries out merging treatment to the data transfer information bag that multiple client sends, and obtains the data transfer information bag after merging, after determining all data batchmove output information, just can carry out the signature of this type.
When carrying out digital signature, the total data of the data transfer information bag after merging transfer output information can be sent to the client of the correspondence of each data transfer information bag of the data transfer information bag after forming this merging by server.The communication modes that server sends data batchmove output information can be adopt the mode identical with the mode obtaining data transfer information bag, does not repeat them here.For the ease of coupling, server can send the sequence number that server is the data transfer information bag setting after this merging simultaneously.
Step S508, multiple client carries out digital signature to data batchmove output information respectively, obtains the digital signature corresponding with self.
The digital signature that digital signature can be all data batchmove output information for data batchmove input information and whole data transfer information bag and carry out.The method of digital signature can be adopt elliptic curve encryption algorithm, the private key corresponding according to data batchmove input information and digital signature for the cryptographic Hash of information, calculate digital signature information.
Such as, digital signature for information can be data batchmove input information A and data batchmove output information B, data batchmove output information C.First data batchmove can be inputted information A and data batchmove output information B by client, data batchmove output information C tri-information merge into information for calculating cryptographic Hash.Client can use SHA256D algorithm to carry out computing for the information for calculating cryptographic Hash, obtains the cryptographic Hash being used for digital signature.Client can use ECDSA algorithm, utilizes data batchmove to input private key corresponding to information A and the cryptographic Hash for digital signature, calculates digital signature information.
Step S510, the digital signature corresponding with self is fed back to server by multiple client respectively.
The communication modes of self corresponding digital signature of user end to server feedback can be adopt the communication modes sending data transfer information bag, does not repeat them here.
It should be noted that, for the ease of coupling, client can send to server the sequence number that server is the data transfer information bag setting after this merging; Or client is the data transfer information bag setting sequence number corresponding with self.
Step S512, the digital signature corresponding with self of multiple client is merged in the data transfer information bag after merging by server, obtains the data transfer information bag of the digital signature corresponding with self comprising multiple client.
Such as, the data transfer information bag after merging can comprise: 2 data batchmove input information and 3 data batchmove output informations.Server can receive 2 corresponding digital signature of 2 data batchmove input information.Each data batchmove input information can be merged into the data batchmove after digital signature with corresponding digital signature and input information by server; The content comprising the data transfer information bag of the digital signature corresponding with self of multiple client is: data batchmove input information, data batchmove output information number numeral the 3, the 1st data batchmove output information, the 2nd data batchmove output information and the 3rd data batchmove output information after the data batchmove input information after data batchmove input information number numeral the 2, the 1st digital signature, the 2nd digital signature.
Step S514, server will comprise the data transfer information packet broadcast of the digital signature corresponding with self of multiple client in P2P network.
The concrete grammar of this step can be consistent with step S406, again repeats no more.
Pass through the embodiment of the present invention, adopt server that the data batchmove output information in the data transfer information bag after merging is sent to multiple client, multiple client carries out digital signature to data batchmove output information respectively, obtains the digital signature corresponding with self; The digital signature corresponding with self is fed back to server by multiple client respectively; The digital signature corresponding with self of multiple client is merged in the data transfer information bag after merging by server, obtains the data transfer information bag of the digital signature corresponding with self comprising multiple client; Server will comprise the data transfer information packet broadcast of the digital signature corresponding with self of multiple client in P2P network, just digital signature can be carried out owing to only having the data transfer information bag after generating merging, only control account private key and just can carry out digital signature, therefore, reach the requirement meeting P2P network data transinformation packet format, and improve the effect of data transfer security.
Preferably, in embodiments of the present invention, after the digital signature corresponding with self is fed back to server by multiple client respectively, this data processing method can also comprise:
S16, server judges that receive in the first preset time period whether to reach preset value with the number of each corresponding digital signature in multiple client.
It should be noted that, in order to ensure the safety of data batchmove, P2P network can require that each data batchmove in data transfer information bag inputs information and will have corresponding digital signature.Thus, as long as lack a digital signature, whole data transfer information bag all cannot be accepted by P2P network.Thus, should timeout mechanism be set, with prevent certain client because of certain reason cannot feedback digital signature and cause the data transfer information bag of other client cannot be merged and be broadcast in P2P network.
It should be noted that, the preset value of digital signature number can be the number of the data batchmove input information in the data transfer information bag after merging.First preset time period can be a time span value, such as 1 second.
S18, if server is judged that receive in the first preset time period not reach preset value with the number of each corresponding digital signature in multiple client, then the data transfer information bag not receiving digital signature is deleted.And return and perform server merging treatment is carried out to the data transfer information bag that multiple client sends, obtain the step of the data transfer information bag after merging.
Such as, one merge after data transfer information bag formed by 10 data transfer information inclusions, thus, need 10 corresponding client feedback digital signature.Timing can be started after the data batchmove output information in the data transfer information bag after merging is sent to 10 clients by server, if the time reaches the first preset time period (as 1 second), and server only have received the digital signature of 9 client feedback, then the data transfer information bag that client that server can delete non-feedback digital signature is submitted to.Simultaneously, in this first preset time period (as 1 second), server have received again 2 new data transfer information bags, then server can by originally remaining 9 add 2 the data transfer information bags newly received, be merged into the data transfer information bag after new merging, the data batchmove output information in the data transfer information bag after new merging can be sent to 11 clients by server.
By the embodiment of the present invention, server is adopted to judge that receive in the first preset time period whether to reach preset value with the number of each corresponding digital signature in multiple client, if server is judged that receive in the first preset time period not reach preset value with the number of each corresponding digital signature in multiple client, then the data transfer information bag not receiving digital signature is deleted, and return and perform server merging treatment is carried out to the data transfer information bag that multiple client sends, obtain the step of the data transfer information bag after merging, owing to setting the timeout mechanism of digital signature feedback, therefore, reach avoid certain client because of certain reason cannot feedback digital signature and cause the data transfer information bag of other client cannot the merged and effect that is broadcast in P2P network.
Fig. 6 is the another preferred flow chart based on the data processing method of the task of P2P network according to the embodiment of the present invention.
As shown in Figure 6, should comprise following step S602 to step S610 based on the data processing method of the task of P2P network, this embodiment can as preferred implementation embodiment illustrated in fig. 4.
Step S602, with step S402 embodiment illustrated in fig. 4, does not repeat them here.
Step S604, server judges whether the data transfer information bag received is valid data transinformation bag.
It should be noted that, only have valid data transinformation bag could be accepted by P2P network, data batchmove task just can be reached.As long as have in data transfer information bag one invalid, the data transfer information bag after merging is exactly invalid.Thus, must first judge whether the data transfer information bag received is valid data transinformation bag before generating the data transfer information bag merged.
Server judges that whether the data transfer information bag that receives is the method for valid data transinformation bag, can comprise: judge that whether the form of data transfer information bag is correct; Judge that whether each data batchmove input information is as arranging data batchmove input information; Judge whether the input data volume sum of data transfer information bag is greater than output data quantity sum and adds regular service charge of sharing according to a preconcerted arrangement; Judge that whether the digital signature that each data batchmove inputs information corresponding is correct; If above any one is judged as NO, then judge that this data transfer information bag is not valid data transinformation bag.
Step S606, if server judges that the data transfer information bag received is valid data transinformation bag, then combines valid data transinformation bag, obtains the valid data transinformation bag after combining.
Server to the method that valid data transinformation bag combines can be: judge whether the summation of the length value of all valid data transinformation bags is greater than the second length value, if be not more than, then all valid data transinformation packages are combined into the valid data transinformation bag after combination; If exceeded, then reject valid data transinformation bag one by one according to time inverted order, until the summation of the length value of remaining valid data transinformation bag is less than or equal to the second length value, then remaining valid data transinformation package is combined into the valid data transinformation bag after combination.
It should be noted that, based on the service charge collection methods of bit coin network, the data transfer information Bao Yuechang of merging, then the service charge of saving is more.But the length of the data transfer information bag that bit coin network is combined has a upper limit requirement; In addition, the data transfer information Bao Yuechang after merging, then need the data transfer information Bao Yue merged many, also just mean that the times more of a specified duration such as needs just can gather together enough, mean that the stand-by period of client can be elongated.So server according to the data transfer information bag quantity received in the unit interval and can stand-by period of client tolerance, can decide length limit-the second length value of data transfer information bag after the merging merged.
Step S608, the valid data transinformation bag after combination is generated the data transfer information bag after merging according to the second preset format by server.
Second preset format can be the data transfer information packet format of bit coin P2P network convention, and it can comprise: the number of version information, data batchmove input information, data batchmove input information, the number of data batchmove output information, data batchmove output information and locking time.
Wherein, version information can be the version of the second preset format; Locking time can be can by the shortest time of again shifting from the data transfer information packet broadcast after this merging to output information wherein.In example of the present invention, locking time can be set to 0.
Step S610, with step S406 embodiment illustrated in fig. 4, does not repeat them here.
Pass through the embodiment of the present invention, server is adopted to judge whether the data transfer information bag received is valid data transinformation bag, if server judges that the data transfer information bag received is valid data transinformation bag, then valid data transinformation bag is combined, obtain the valid data transinformation bag after combining, valid data transinformation bag after combination is generated the data transfer information bag after merging according to the second preset format by server, due to the data transfer information Bao Yuechang merged, the service charge of then saving is more, therefore, reach the effect of saving service charge further.
Preferably, in embodiments of the present invention, after obtaining the valid data transinformation bag after combining, this data processing method can also comprise:
S20, server determines the length value of the valid data transinformation bag after combining.
It should be noted that, the length value of the valid data transinformation bag after combination can be the summation of each valid data transinformation packet length value in combination, adds packet length information.
S22, server judges whether the difference of the integral multiple of length value and preset length value is minimum value.
Wherein, if server judges that the difference of the integral multiple of length value and preset length value is minimum value, then the valid data transinformation bag after combination is generated the data transfer information bag after merging according to the second preset format by server.
It should be noted that, service charge collection methods due to bit coin network collects according to the integral multiple of preset length value, collecting by upper integral multiple of not enough integral multiple, so the length of data transfer information bag is more close to the integral multiple of preset length value, then the service charge of saving is more.
Such as, in bit coin system, have 10 valid data transinformation bags, be 1 input, 1 output, then length is 182 bytes.So, the length value of the valid data transinformation bag after combination, can have 10 kinds, be 192 respectively, 374,556,738,920,1102,1284,1466,1648,1830.And the preset length value that the service charge of bit coin is collected is 1024 bytes, thus be less than preset length value integral multiple and difference minimum be 920, differ 104 bytes.Thus, 5 valid data transinformation bags are chosen as the valid data transinformation bag after combination.
Pass through the embodiment of the present invention, server is adopted to determine the length value of the valid data transinformation bag after combining, server judges whether the difference of the integral multiple of length value and preset length value is minimum value, if server judges that the difference of the integral multiple of length value and preset length value is minimum value, then the valid data transinformation bag after combination is generated the data transfer information bag after merging according to the second preset format by server, because the length of data transfer information bag is more close to the integral multiple of preset length value, the service charge of then saving is more, therefore, reach the effect of saving service charge further.
Fig. 7 is the preferred flow chart based on the data processing method of the task of P2P network again according to the embodiment of the present invention.
As shown in Figure 7, should comprise following step S702 to step S714 based on the data processing method of the task of P2P network, this embodiment can as preferred implementation embodiment illustrated in fig. 4.
Step S702 to step S706, respectively with step S402 embodiment illustrated in fig. 4 to step S406, do not repeat them here.
Step S708, server receives forwarding information and the confirmation of the data transfer information bag after merging from P2P network.
It should be noted that, the data transfer information bag after merging only has and is accepted by P2P network, and data batchmove just can come into force.Data transfer information bag after merging is not obtain in the waiting process of data transfer information bag and digital signature at server by the main reason of P2P network reception, some data batchmove input information is made to have used up in addition, cause having occurred invalid data transfer input information, and then the data transfer information bag after whole merging was lost efficacy, therefore, need to follow the trail of the data transfer information bag after broadcasting.
Whether the data transfer information bag after bit coin network is combined effectively judges can comprise: forward and confirm.
Wherein, forwarding is after the data transfer information bag after P2P node receives a merging, carries out Effective judgement to it, if it is determined that be effectively, then all P2P nodes connected to this node send the data transfer information bag after this merging.If the data transfer information bag after a merging is effective, then can spread all over whole P2P network very soon, and multiple P2P nodes that can connect from server repeatedly pass server back.Data transfer information package informatin after the merging that server receives from P2P node, referred to as forwarding information.
Confirm to refer to and can prevent dual payment by affirmation mechanism.Dual payment refers to that same data batchmove input information puts into two different data transfer information bags respectively, and points to different output target account, is broadcast to P2P network simultaneously.P2P network can by calculating the bright mechanism of strong evidence, and regular random selecting node confirms the data transfer information bag received.If find dual payment, then only confirm that data transfer information bag first received, after the calcellation that receives.The data transfer information bag of confirmation is packaged into confirmation bag by this node, is broadcast to P2P network.The confirmation packets of information that server receives from P2P network node, if wherein contain the data transfer information bag after described merging, referred to as confirmation.
Step S710, server judges whether the hop count corresponding with forwarding information reaches default hop count threshold value in the second preset time period.
Such as, presetting hop count threshold value is 2, and the second Preset Time is 1 minute.If the hop count of the forwarding information received in 1 minute is less than 2 times, then judged result is no; Otherwise be yes.
Step S712, server judges whether receive confirmation in default P2P network validation numbers range.
Such as, presetting P2P network validation numbers range is 2 times.If do not comprise the data transfer information bag after this merging in first confirmation bag after the data transfer information bag after merging is issued, but include the data transfer information bag after merging in second confirmation bag, then judged result is yes.
Step S714, if server judges that the hop count corresponding with forwarding information does not reach default hop count threshold value in the second preset time period, if or server judges whether receive confirmation in default P2P network validation numbers range, then return and perform server and merging treatment is carried out to the data transfer information bag that multiple client sends, obtain the step of the data transfer information bag after merging.
If server judges that the hop count corresponding with forwarding information does not reach default hop count threshold value in the second preset time period, if or server is judged not receive confirmation in default P2P network validation numbers range, then mean that the data transfer information bag after merging is refused by P2P network, namely the data transfer information bag after merging is invalid data transinformation bag, should cancel.This wherein probably has one or more data transfer information bag to become invalid data transinformation bag, so need to get back to initial server to carry out merging treatment to the data transfer information bag that multiple client sends, obtain the step of the data transfer information bag after merging.
Pass through the embodiment of the present invention, adopt server from P2P network, receive forwarding information and the confirmation of the data transfer information bag after merging, server judges whether the hop count corresponding with forwarding information reaches default hop count threshold value in the second preset time period, server judges whether receive confirmation in default P2P network validation numbers range, if server judges that the hop count corresponding with forwarding information does not reach default hop count threshold value in the second preset time period, if or server judges whether receive confirmation in default P2P network validation numbers range, then return and perform server and merging treatment is carried out to the data transfer information bag that multiple client sends, obtain the step of the data transfer information bag after merging, owing to passing through whether to follow the trail of the data transfer information bag after merging by P2P network reception, therefore, reach the effect avoided because partial data transfer input information is caused the data transfer information bag from multiple client to perform a data-transfer operation by using in addition.
As can be seen from the above description, present invention achieves following technique effect: the service charge saving P2P network data transfer task; The information saving the transfer of P2P network data sends and memory space; Improve the anonymity of P2P network data transfer.
It should be noted that, can perform in the computer system of such as one group of computer executable instructions in the step shown in the flow chart of accompanying drawing, and, although show logical order in flow charts, but in some cases, can be different from the step shown or described by order execution herein.
Obviously, those skilled in the art should be understood that, above-mentioned of the present invention each module or each step can realize with general calculation element, they can concentrate on single calculation element, or be distributed on network that multiple calculation element forms, alternatively, they can realize with the executable program code of calculation element, thus, they can be stored and be performed by calculation element in the storage device, or they are made into each integrated circuit modules respectively, or the multiple module in them or step are made into single integrated circuit module to realize.Like this, the present invention is not restricted to any specific hardware and software combination.
These are only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (18)

1. based on a data processing method for the task of P2P network, it is characterized in that, comprising:
Server receives the data transfer information bag that multiple client sends;
Described server carries out merging treatment to the data transfer information bag that described multiple client sends, and obtains the data transfer information bag after merging; And
Described server by the data transfer information packet broadcast after described merging in P2P network.
2. data processing method according to claim 1, is characterized in that, receive the data transfer information bag of multiple client transmission at server before, described data transfer information bag is sent to described server by described multiple client in the following manner:
Described multiple client receives data batchmove task request message;
Described multiple client generates described data transfer information bag according to described data batchmove task request message; And
Described data transfer information bag is sent to described server by described multiple client.
3. data processing method according to claim 2, is characterized in that, before described data transfer information bag is sent to described server by described multiple client, described data processing method also comprises:
Described multiple client carries out digital signature to data transfer information bag corresponding with self in described data transfer information bag respectively, obtains the data transfer information bag after digital signature,
Wherein, the data transfer information bag after the described digital signature corresponding with self is sent to described server by described multiple client respectively.
4. data processing method according to claim 2, is characterized in that, described multiple client generates described data transfer information bag in the following manner:
Described multiple client obtains governable data batchmove input information;
Described multiple client is according to described governable data batchmove input information and described data batchmove task request message and preset data jump condition determination data batchmove output information; And
Described multiple client inputs information and data batchmove output information and the first preset format according to described governable data batchmove and generates described data transfer information bag.
5. data processing method according to claim 1, it is characterized in that, carry out merging treatment at described server to the data transfer information bag that described multiple client sends, after obtaining the data transfer information bag after merging, described data processing method also comprises:
Data batchmove output information in data transfer information bag after described merging is sent to described multiple client by described server;
Described multiple client carries out digital signature to described data batchmove output information respectively, obtains the digital signature corresponding with self;
The digital signature corresponding with self is fed back to described server by described multiple client respectively; And
The digital signature corresponding with self of described multiple client is merged in the data transfer information bag after described merging by described server, obtains the data transfer information bag of the digital signature corresponding with self comprising described multiple client,
Wherein, described server by the described data transfer information packet broadcast comprising the digital signature corresponding with self of described multiple client in described P2P network.
6. data processing method according to claim 5, is characterized in that, after the digital signature corresponding with self is fed back to described server by described multiple client respectively, described data processing method also comprises:
Described server judges that receive in the first preset time period whether to reach preset value with the number of each corresponding digital signature in described multiple client; And
If described server is judged that receive in described first preset time period not reach described preset value with the number of each corresponding digital signature in described multiple client, then the data transfer information bag not receiving digital signature is deleted, and return and perform described server merging treatment is carried out to the data transfer information bag that described multiple client sends, obtain the step of the data transfer information bag after merging.
7. data processing method according to claim 1, is characterized in that, described server carries out merging treatment to the data transfer information bag that described multiple client sends, and obtains the data transfer information handbag after merging and draws together:
Described server judges whether the described data transfer information bag received is valid data transinformation bag;
If described server judges that the described data transfer information bag received is described valid data transinformation bag, then described valid data transinformation bag is combined, obtain the valid data transinformation bag after combining; And
Valid data transinformation bag after described combination is generated the data transfer information bag after described merging according to the second preset format by described server.
8. data processing method according to claim 7, is characterized in that, after obtaining the valid data transinformation bag after combining, described data processing method also comprises:
Described server determines the length value of the valid data transinformation bag after described combination;
Described server judges whether the difference of the integral multiple of described length value and preset length value is minimum value,
Wherein, if described server judges that the difference of the integral multiple of described length value and described preset length value is described minimum value, then the valid data transinformation bag after described combination is generated the data transfer information bag after described merging according to described second preset format by described server.
9. data processing method according to claim 1, is characterized in that, at described server by after in the data transfer information packet broadcast after described merging to P2P network, described data processing method also comprises:
Described server receives forwarding information and the confirmation of the data transfer information bag after described merging from described P2P network;
Described server judges whether the hop count corresponding with described forwarding information reaches default hop count threshold value in the second preset time period;
Described server judges whether receive described confirmation in default P2P network validation numbers range;
If described server judges that the described hop count corresponding with described forwarding information does not reach described default hop count threshold value in described second preset time period, if or described server judges whether receive described confirmation in described default P2P network validation numbers range, then return and perform described server and merging treatment is carried out to the data transfer information bag that described multiple client sends, obtain the step of the data transfer information bag after merging.
10. based on a data processing equipment for the task of P2P network, it is characterized in that, comprising:
First receiving element, is provided for the data transfer information bag that server receives the transmission of multiple client;
First merge cells, is provided for described server and carries out merging treatment to the data transfer information bag that described multiple client sends, obtain the data transfer information bag after merging; And
Radio unit, is provided for described server by the data transfer information packet broadcast after described merging in P2P network.
11. data processing equipments according to claim 10, is characterized in that, also comprise:
Second receiving element, is provided for before server receives the data transfer information bag of multiple client transmission, and described multiple client receives data batchmove task request message;
Generation unit, is provided for described multiple client and generates described data transfer information bag according to described data batchmove task request message; And
First transmitting element, is provided for described multiple client and described data transfer information bag is sent to described server.
12. data processing equipments according to claim 11, is characterized in that, also comprise:
First signature unit, be provided for before described data transfer information bag is sent to described server by described multiple client, described multiple client carries out digital signature to data transfer information bag corresponding with self in described data transfer information bag respectively, obtain the data transfer information bag after digital signature
Wherein, described first transmitting element is also provided for described multiple client and respectively the data transfer information bag after the described digital signature corresponding with self is sent to described server.
13. data processing equipments according to claim 11, is characterized in that, described generation unit comprises:
Acquisition module, is provided for described multiple client and obtains governable data batchmove input information;
Determination module, is provided for described multiple client according to described governable data batchmove input information and described data batchmove task request message and preset data jump condition determination data batchmove output information; And
First generation module, is provided for described multiple client and generates described data transfer information bag according to described governable data batchmove input information and data batchmove output information and the first preset format.
14. data processing equipments according to claim 10, is characterized in that, also comprise:
Second transmitting element, be provided for, at described server, merging treatment carried out to the data transfer information bag that described multiple client sends, after obtaining the data transfer information bag after merging, the data batchmove output information in the data transfer information bag after described merging is sent to described multiple client by described server;
Second signature unit, is provided for described multiple client and carries out digital signature to described data batchmove output information respectively, obtain the digital signature corresponding with self;
Feedback unit, is provided for described multiple client and respectively the digital signature corresponding with self is fed back to described server; And
Second merge cells, being provided for described server is merged in the data transfer information bag after described merging by the digital signature corresponding with self of described multiple client, obtain the data transfer information bag of the digital signature corresponding with self comprising described multiple client
Wherein, described radio unit is also provided for described server by the described data transfer information packet broadcast comprising the digital signature corresponding with self of described multiple client in described P2P network.
15. data processing equipments according to claim 14, is characterized in that, also comprise:
First judging unit, be provided for after the digital signature corresponding with self is fed back to described server by described multiple client respectively, described server judges that receive in the first preset time period whether to reach preset value with the number of each corresponding digital signature in described multiple client; And
Delete cells, if be provided for described server to judge that receive in described first preset time period not reach described preset value with the number of each corresponding digital signature in described multiple client, the data transfer information bag then not receiving digital signature is deleted, and returns and perform the function of described first merge cells.
16. data processing equipments according to claim 10, is characterized in that, described first merge cells comprises:
Judge module, is provided for whether the described data transfer information bag that described server judges to receive is valid data transinformation bag;
Composite module, if being provided for the described data transfer information bag that described server judges to receive is described valid data transinformation bag, then combines described valid data transinformation bag, obtains the valid data transinformation bag after combining; And
Second generation module, is provided for described server and the valid data transinformation bag after described combination is generated the data transfer information bag after described merging according to the second preset format.
17. data processing equipments according to claim 16, is characterized in that, also comprise:
Determining unit, be provided for after obtaining the valid data transinformation bag after combining, described server determines the length value of the valid data transinformation bag after described combination;
Second judging unit, is provided for described server and judges whether the difference of the integral multiple of described length value and preset length value is minimum value,
Wherein, if described first merge cells is also provided for described server and judges that the difference of the integral multiple of described length value and described preset length value is described minimum value, then the valid data transinformation bag after described combination is generated the data transfer information bag after described merging according to described second preset format by described server.
18. data processing equipments according to claim 10, is characterized in that, also comprise:
3rd receiving element, be provided at described server by after in the data transfer information packet broadcast after described merging to P2P network, described server receives forwarding information and the confirmation of the data transfer information bag after described merging from described P2P network;
3rd judging unit, is provided for described server and judges whether the hop count corresponding with described forwarding information reaches default hop count threshold value in the second preset time period;
4th judging unit, is provided for described server and judges whether receive described confirmation in default P2P network validation numbers range;
Wherein, if described server judges that the described hop count corresponding with described forwarding information does not reach described default hop count threshold value in described second preset time period, if or described server judges whether receive described confirmation in described default P2P network validation numbers range, then return and perform the function of described first merge cells.
CN201410321471.2A 2014-07-07 2014-07-07 The data processing method and device of task based on P2P network Expired - Fee Related CN105282198B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410321471.2A CN105282198B (en) 2014-07-07 2014-07-07 The data processing method and device of task based on P2P network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410321471.2A CN105282198B (en) 2014-07-07 2014-07-07 The data processing method and device of task based on P2P network

Publications (2)

Publication Number Publication Date
CN105282198A true CN105282198A (en) 2016-01-27
CN105282198B CN105282198B (en) 2018-11-23

Family

ID=55150520

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410321471.2A Expired - Fee Related CN105282198B (en) 2014-07-07 2014-07-07 The data processing method and device of task based on P2P network

Country Status (1)

Country Link
CN (1) CN105282198B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105630609A (en) * 2016-02-24 2016-06-01 杭州复杂美科技有限公司 Block chain packing and storing method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1908971A (en) * 2005-08-05 2007-02-07 英业达股份有限公司 Goods order management system and method
US20130041773A1 (en) * 2011-08-12 2013-02-14 Randall Frank Muse Systems and methods to process online monetary payments dependent on conditional triggers involving future events
CN103795807A (en) * 2014-02-28 2014-05-14 徐刚 Task data processing method, device and system based on P2P network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1908971A (en) * 2005-08-05 2007-02-07 英业达股份有限公司 Goods order management system and method
US20130041773A1 (en) * 2011-08-12 2013-02-14 Randall Frank Muse Systems and methods to process online monetary payments dependent on conditional triggers involving future events
CN103795807A (en) * 2014-02-28 2014-05-14 徐刚 Task data processing method, device and system based on P2P network

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
郑书雯: "基于P2P网络Bitcoin虚拟货币的信用模型", 《信息安全与通信保密》 *
黄冠尧等: "P2P-VCG:一种基于博弈论的带宽分配方案", 《计算机研究与发展》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105630609A (en) * 2016-02-24 2016-06-01 杭州复杂美科技有限公司 Block chain packing and storing method
CN105630609B (en) * 2016-02-24 2021-05-11 杭州复杂美科技有限公司 Block chain packing storage method

Also Published As

Publication number Publication date
CN105282198B (en) 2018-11-23

Similar Documents

Publication Publication Date Title
CN111126988B (en) Block chain-based transfer method, device, equipment and computer medium
CN102088441B (en) Data encryption transmission method and system for message-oriented middleware
EP3477561A1 (en) System for goods delivery
CN112055357B (en) Block chain-based trusted security high-performance intelligent network link networking cooperation method
US9954839B2 (en) Systems and methods for providing distributed authentication of service requests by identity management components
KR20130004841A (en) Method and apparatus for group key menagement to mobile device
CN110380863B (en) Cross-border payment message notification processing method and device based on block chain architecture
Milosavljevic et al. Efficient algorithms for the data exchange problem
Niya et al. Biit: Standardization of blockchain-based i 2 ot systems in the i4 era
CN102088352B (en) Data encryption transmission method and system for message-oriented middleware
Chakrabarti et al. A blockchain based incentive scheme for post disaster opportunistic communication over DTN
Ullah et al. A secure NDN framework for Internet of Things enabled healthcare
Hachem et al. A layered caching architecture for the interference channel
CN112437153A (en) Equipment linkage processing method and device
CN115276976A (en) Quantum key distribution method and device and electronic equipment
JP2005182145A (en) Method for authenticating communication terminal device and communication terminal device
CN105282198A (en) Task data processing method based on P2P network and apparatus thereof
CN112152796A (en) Multicast method based on key dynamic negotiation and related device
KR102399632B1 (en) Method and apparatus for transmitting and receiving data based on blockchain in a wireless communication system
CN115865334A (en) Quantum key distribution method and device and electronic equipment
CN115567930A (en) Security mechanism for establishing connections through multi-hop sidelink
CA3204892A1 (en) Orchestrated quantum key distribution
Soram Mobile sms banking security using elliptic curve cryptosystem
CN111339198A (en) Block chain-based water affair processing method, device, system, equipment and medium
CN115348263B (en) Multi-level block chain system, and multi-level block chain hybrid networking method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20181123

Termination date: 20210707