A kind of data transmission method and system
Technical field
The present invention relates to field of data transmission, passes through custom system more particularly between personal computer and mobile device
Realize the method and system of orientation Point-to-Point Data Transmission.
Background technology
Custom system major function be identification user identity, username and password is verified, can distinct device,
Same natural person user is identified in different platform.The major function of point-to-point transmission is to share in point to point network specifically
Data.
Directional data transmission between personal computer and mobile device at present, there is two kinds of universal methods:1)Pass through data
Line physical connection carries out data transmission;2)Wireless connection is established by local area wireless network, carried out data transmission.Both sides
Method is required for two equipment in nearer distance, and need the data transmitted full storage in a certain equipment.
The shortcomings that prior art, is that function can not be realized in farther physical space, and must possess as a side of data source
Complete data file.
Mobile device leans on merely Point-to-Point Data Transmission, because of its limited computing capability, it is possible to can encounter the number of acquisition
It is insufficient according to source, it is not sufficiently stable, speed is slow.
The content of the invention
Present invention aim to address above mentioned problem, proposes that a kind of realized by custom system orients Point-to-Point Data Transmission
Technical scheme, on the basis of the shortcomings that overcoming two kinds of traditional schemes of custom system and point-to-point directional transmissions each, protect
The technical advantage of two schemes is stayed, realizes the fast and reliable transmission of data.
To achieve the above object, the present invention provides a kind of data transmission method, and this method is based on personal computer, movement is set
Standby and service end is carried out;Including:
The service end is to the user account number and password of personal computer and the user account number and password of the mobile device
Carry out matching certification;
The service end obtains user profile and link information and the user of the personal computer of the mobile device
Information and link information, a matching combination is formed, and record and manage the matching combination;
Combined according to the matching, the mobile device creates assignment instructions and sent to the personal computer;
Mobile device of the personal computer according to assignment instructions by required data transfer to matching.
Optionally, in an embodiment of the present invention, the matching is combined using UserID as unique mark, in addition to 2
SessionID and 2 PeerID;The UserID of i.e. described mobile device is identical with the UserID of the personal computer.
Optionally, in an embodiment of the present invention, described to be combined according to the matching, the mobile device creates task and referred to
Making and sending to the step of personal computer includes:
The link information of the personal computer is obtained according to the PeerID of personal computer under same UserID;
Long connection is established according to the link information, between the mobile device and the personal computer;Connected by long
Connect and send assignment instructions to the personal computer.
Optionally, in an embodiment of the present invention, the link information includes:IP, port numbers, verification Key.
Optionally, in an embodiment of the present invention, the personal computer only transmits required data according to assignment instructions
To matching mobile device the step of include:
According to assignment instructions, by other task records unrelated with task and suspend;
Data file block message needed for the mobile device is sent to the personal computer;
Obtain data file block needed for the mobile device and transmit to the mobile device.
Optionally, in an embodiment of the present invention, it is described by data file block message needed for the mobile device send to
The step of personal computer, includes:
According to priority by data file block list needed for the mobile device, and send to the personal computer;
Data are obtained according to list, and transmitted blocks of files to the mobile device according to priority.
To achieve the above object, the present invention also provides a kind of data transmission system, and the system is based on personal computer and shifting
Carried out between dynamic equipment;Including:
Custom system authentication service module, user account number and password and the mobile device for the personal computer
User account number and password carry out matching certification;
Service module is matched, for obtaining the user profile and link information and the personal computer of the mobile device
User profile and link information, form one matching combination, and record and manage it is described matching combination;
Task creation module, for being combined according to the matching, the mobile device creates assignment instructions and sent to institute
State personal computer;
Data transmission module, the movement for the personal computer according to assignment instructions by required data transfer to matching
Equipment.
Optionally, in an embodiment of the present invention, the matching that the matching service module obtains is combined using UserID as only
One mark, in addition to 2 SessionID and 2 PeerID;The UserID of i.e. described mobile device and the personal computer
UserID is identical.
Optionally, in an embodiment of the present invention, the task creation module includes:
Point-to-point Scout service unit, the individual is obtained for the PeerID according to personal computer under same UserID
The link information of computer;
First client orients connection component unit, for according to the link information, the mobile device with described
Long connection is established between people's computer;Assignment instructions are sent to the personal computer by long connection.
Optionally, in an embodiment of the present invention, the link information includes:IP, port numbers, verification Key.
Optionally, in an embodiment of the present invention, the data transmission module includes:
Second client orients connection component unit, for according to assignment instructions, other tasks unrelated with task to be remembered
Record and suspend;
First client-side program P2P components, for data file block message needed for the mobile device to be sent to described
Personal computer;
Second client-side program P2P components, for obtaining data file block needed for the mobile device and transmitting to described
Mobile device.
Optionally, in an embodiment of the present invention, the first client-side program P2P components include:
Required data file block list cell, for carrying out data file block needed for the mobile device according to priority
List, and send to the personal computer;
Blocks of files list transmission unit, for obtaining data according to list, and blocks of files is transmitted to institute according to priority
State mobile device.
Above-mentioned technical proposal has the advantages that:The technical program realizes is used as by the personal computer of free time
Auxiliary equipment provides more stable data source so that mobile device can obtain more high-quality Point-to-Point Data source, under lifting
Carry speed.The idle personal computer need not be on hand, it is only necessary to is connected to internet, and is stepped on by client-side program
Record personal account number.By the personal account number of custom system, two equipment can be with mutual authentication, and establishes the point-to-point transmission of orientation
Passage.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this
Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with
Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is a kind of one of data transmission method flow chart proposed by the present invention;
Fig. 2 is the two of a kind of data transmission method flow chart proposed by the present invention;
Fig. 3 is the three of a kind of data transmission method flow chart proposed by the present invention;
Fig. 4 is the four of a kind of data transmission method flow chart proposed by the present invention;
Fig. 5 is a kind of one of data transmission system block diagram proposed by the present invention;
Fig. 6 is the two of a kind of data transmission system block diagram proposed by the present invention;
Fig. 7 is the three of a kind of data transmission system block diagram proposed by the present invention;
Fig. 8 is the four of a kind of data transmission system block diagram proposed by the present invention;
Fig. 9 is that device identification matches and recorded flow chart in a kind of data transmission method in embodiment;
Figure 10 is equipment room point-to-point operation flow chart in a kind of data transmission method in embodiment.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation describes.Obviously, described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art are obtained every other under the premise of creative work is not made
Embodiment, belong to the scope of protection of the invention.
As shown in figure 1, it is a kind of data transmission method flow chart proposed by the present invention.This method be based on personal computer and
Mobile device is carried out;Including:
Step 101):The user account number and password of the personal computer and the user account number and password of the mobile device
Carry out matching certification;Wherein, the user account number of the personal computer should be identical with the user account number of the mobile device;It is described
The password of personal computer should be identical with the password of the mobile device;
Step 102):The service end obtains the user profile and link information and the individual calculus of the mobile device
The user profile and link information of machine, a matching combination is formed, and record and manage the matching combination;Wherein, described in acquisition
UserID, SessionID, PeerID of mobile device and the personal computer UserID, SessionID, PeerID, structure
Into a matching combination, and record and manage the matching combination;
Step 103):Combined according to the matching, the mobile device creates assignment instructions and sent to the personal meter
Calculation machine;
Step 104):The personal computer is only transmitted required data to the mobile device of matching according to assignment instructions.
The matching combination is using UserID as unique mark, in addition to 2 SessionID and 2 PeerID;I.e. described shifting
The UserID of dynamic equipment is identical with the UserID of the personal computer.
As shown in Fig. 2 two for a kind of data transmission method flow chart proposed by the present invention.In the technical side that Fig. 1 is provided
On the basis of case, the step 103)Including:
Step 1031):The connection of the personal computer is obtained according to the PeerID of personal computer under same UserID
Information;
Step 1032):Long connect is established according to the link information, between the mobile device and the personal computer
Connect;Assignment instructions are sent to the personal computer by long connection.
The link information includes:IP, port numbers, verification Key.
As shown in figure 3, three for a kind of data transmission method flow chart proposed by the present invention.In the technical side that Fig. 2 is provided
On the basis of case, the step 104)Including:
Step 1041):According to assignment instructions, by other task records unrelated with task and suspend;
Step 1042):Data file block message needed for the mobile device is sent to the personal computer;
Step 1043):Obtain data file block needed for the mobile device and transmit to the mobile device.
As shown in figure 4, four for a kind of data transmission method flow chart proposed by the present invention.In the technical side that Fig. 3 is provided
On the basis of case, the step 1042)Including:
Step 10421):According to priority by data file block list needed for the mobile device, and send to described
People's computer;
Step 10422):Data are obtained according to list, and transmitted blocks of files to the mobile device according to priority.
As shown in figure 5, it is a kind of one of data transmission system block diagram proposed by the present invention.The data transmission system 500
Based on being carried out between personal computer and mobile device;Including:
Custom system authentication service module 501, user account number and password and the movement for the personal computer
The user account number and password of system carry out matching certification;Wherein, the user account number of the personal computer should be with the mobile system
The user account number of system is identical;The password of the personal computer should be identical with the password of the mobile system;
Service module 502 is matched, for obtaining UserID, SessionID, PeerID of the mobile system and described
UserID, SessionID, PeerID of people's computer, a matching combination is formed, and record and manage the matching combination;
Task creation module 503, for being combined according to the matching, the mobile system creates assignment instructions and sent extremely
The personal computer;
Data transmission module 504, required data are only transmitted to matching according to assignment instructions for the personal computer
Mobile system.
The matching that the matching service module obtains is combined using UserID as unique mark, in addition to 2 SessionID and
2 PeerID;The UserID of i.e. described mobile system is identical with the UserID of the personal computer.
As shown in fig. 6, two for a kind of data transmission system block diagram proposed by the present invention.It is described on the basis of Fig. 5
Task creation module 503 includes:
Point-to-point Scout service unit 5031, described in being obtained according to the PeerID of personal computer under same UserID
The link information of personal computer;
First client orients connection component 5032, for according to the link information, the mobile system with described
Long connection is established between people's computer;Assignment instructions are sent to the personal computer by long connection.
The link information includes:IP, port numbers, verification Key.
As shown in fig. 7, three for a kind of data transmission system block diagram proposed by the present invention.The data transmission module
504 include:
Second client orients connection component 5041, for according to assignment instructions, other tasks unrelated with task to be remembered
Record and suspend;
First client-side program P2P components 5042, for by data file block message needed for the mobile system send to
The personal computer;
Second client-side program P2P components 5043, for obtain data file block needed for the mobile system and transmit to
The mobile system.
As shown in figure 8, four for a kind of data transmission system block diagram proposed by the present invention.It is described on the basis of Fig. 7
First client-side program P2P components 5042 include:
Required data file block list cell 50421, for according to priority by data file needed for the mobile system
Block enters row-column list, and sends to the personal computer;
Blocks of files list transmission unit 50422, for obtaining data according to list, and blocks of files is transmitted according to priority
To the mobile system.
Embodiment:
Associated by user's system banner with what point-to-point transmission network node identified, can allow two machine mutual authentications
Other side owns for same person.After completing certification, mobile system is operated by user and sends the instruction of establishment task to personal meter
Calculation machine, create point-to-point downloading task.File block priority adjustment is carried out to the task by personal computer again, is by mobile
Downloading task of the download piecemeal not completed on system as high priority.Data transfer task is not completed in mobile system and is not broken
When opening connection, personal computer will be downloaded from different node needed for data and be only pushed to the mobile system of matching, until
Data transfer is completed or mobile system break link, and personal computer can just enter point to point network and provide number to other nodes
According to.
The technical scheme at least needs to be provided with the participation of two hardware systems of client-side program, a mobile system,
One personal computer, and require that this two systems can just be often connected to internet.Technical scheme is divided into two big steps,
1)System banner matches and record, and 2)Point-to-point operation between system.
The technical scheme should include following several parts:
Custom system certificate server, book server function are to provide the checking of account number (UserID) password, and are verifying
Distribution and management session identification after success(SessionID).
Point-to-point Scout service device, the server capability are that management point identifies to point tracking(PeerID), and assist node
Between establish connection.
Match server, the server capability are record and the pair relationhip for managing SessionID and PeerID.
First client-side program P2P components, PeerID is responsible for, creates downloading task, file block.
Second client-side program P2P components, it is responsible for the transmission of data message.
Client-side program login component, it is responsible for communicating with custom system authentication service, obtains SessionID.
First client orients connection component, is responsible for the long connection established between two custom systems, and transmit long-range wound
Build the instruction of task.
Second client orients connection component, is responsible for other task records unrelated with task and suspends.
As described in Figure 9, it is that system banner matches and recorded flow chart in a kind of data transmission method in embodiment.Specific stream
Journey includes:
1):It is respectively started client-side program on personal computer and mobile system, and with same set of user account number, password
Log in, i.e., user account number and password are sent to custom system certificate server and carry out matching certification, by certification i.e. log in into
Work(.
2):When same user account number is logged in custom system certificate server with different system, at once to client
End sends the message for starting matching.
3):After client receives startup matching message, UserID, SessionID, PeerID group are sent to match server
Close.Preserved by match server and manage the matching and combined, using UserID as unique mark in a matching combination, record includes
2 SessionID and 2 PeerID.Match server can keep communicating with custom system certificate server, and obtaining the user is
The no message for also keeping logging in, if user offline, corresponding UserID, SessionID, PeerID combination is eliminated.
Belong to the first big step of the technical scheme of the present embodiment above:System banner matches and record.
Belong to the second largest step of the technical scheme of the present embodiment below:Point-to-point operation between system.As shown in Figure 10, it is
Point-to-point operation flow chart between system in a kind of data transmission method in embodiment.
A downloading task is created on mobile system, and clicks on orientation and accelerates button.First client orients connection group
Part is to the Peer that another login system of the User ID acquisition requests in the User ID under one's name is sent to Point matching server
ID。
The backward point-to-point Scout service device that mobile system obtains corresponding personal computer Peer ID asks this to be
The connection relevant information of system(The information needed for connection is established including safety such as IP, port numbers, verification Key), the first client determines
Long connection is established with personal computer after relevant information is obtained to connection component, download will remotely be created by long connection
The message hair past of task.After establishing long connection, whether cycle criterion length connection keeps, when disconnecting long connection, flow of task
Just terminate.
Personal computer creates the task after the long-range instruction for creating task is obtained in the machine, if the task has been created
Build, skip this step.
Second client-side program orients connection component when receiving establishment assignment instructions, can be by other incoherent task shapes
State carries out snapshot, records.Now other tasks upload and download can all be suspended, only retain mobile system remotely create
Network task data upload download activity, and data upload only be only oriented to mobile system offer.
First client-side program P2P components can calculate file block, and also unfinished block list is sent into the second visitor
Family end program P2P components, the downloading task as its highest priority.
Second client-side program P2P components, will be by the file needed for mobile system point after certain data are obtained
The block transmission past.
Connected when mobile system disconnects the length between personal computer, personal computer also can be according to task shape before
State snapshot recovers the progress of each task.Disconnecting the situation of long connection includes the completion of data downloading task, user's manual termination
Orientation accelerates, network connection disconnects.
Above-described embodiment, the purpose of the present invention, technical scheme and beneficial effect are carried out further
Describe in detail, should be understood that the embodiment that the foregoing is only the present invention, be not intended to limit the present invention
Protection domain, within the spirit and principles of the invention, any modification, equivalent substitution and improvements done etc., all should include
Within protection scope of the present invention.