Designated data sharing method facing personal computer userTechnical Field
The invention relates to the technical field of electric digital data processing, in particular to a specified data sharing method facing to a personal computer user.
Background
The data sharing is that users using different computers and different software in different places can read data of other people and perform various operation operations and analyses, the data sharing degree reflects the information development level of one region and one country, and the higher the data sharing degree is, the higher the information development level is;
at present, two modes of wired and wireless transmission are adopted during data sharing, data on one computer is shared to the content of the other computer, and during wireless transmission, connection needs to be established wirelessly in a Bluetooth or network mode and the like, so that the two computers are configured to transmit the data, and the data are shared;
at present, when two computers share data and establish wireless connection, the two computers cannot be paired in a targeted manner, the transmission of a personal computer cannot be accurately appointed, and the data sharing is easy to be mistakenly connected with other computers, so that the data sharing causes disclosure to other people;
at present, data can not be transmitted according to the flow accepted by a personal computer when data sharing is carried out, when a large amount of data is transmitted, the data driven by the current mobile mode is in explosive growth, the flow of data transmission can not be controlled, the personal computer is easy to cause overload and serious damage during operation, and after the shared data is received, verification cannot be carried out on the data, the data can be damaged or modified in the transmission process, and the normal use of the data is influenced.
Disclosure of Invention
The present invention aims to provide a method for sharing specific data for a personal computer user, so as to solve the problems in the background art.
In order to achieve the above object, the present invention provides a method for sharing designated data for a personal computer user, comprising the steps of:
the first encryption authentication pairing is realized by adopting a wireless encryption pairing algorithm, and the shared link is established after the pairing is completed;
the positioning matching algorithm is adopted again to realize the second encryption authentication pairing, the connection is disconnected after the pairing is failed, the pairing is successfully carried out, a pairing success signal is sent, and through the two times of encryption authentication pairing, the pairing between the two computers is more accurate, and the data error transmission is effectively avoided;
the initiating equipment receives the signal of successful pairing, packages the data needing to be transmitted of the initiating equipment into frames by adopting a multilink packaging algorithm, and keys in the allowed maximum data frame memory to compare with the transmission data frame;
directly transmitting data when the transmission data frame memory is less than or equal to the maximum data frame memory, and sending a transmission signal when the transmission data frame memory is greater than the maximum data frame memory;
the initiating device receives signals, data of a transmission data frame is shaped into a plurality of data blocks by adopting a token bucket segmentation algorithm, the data blocks are integrated and distributed into a token bucket allowing the maximum data frame memory to be smaller than or equal to through a data memory distribution algorithm to share the data, redundant data blocks are buffered and stored until the data in the token bucket are completely transmitted, and the redundant data blocks are integrated into the token bucket until all the data blocks are shared, so that the shared flow is controlled, the phenomenon that the computer is overloaded due to rapid increase of the data is avoided, and the personal computer is protected;
the response equipment receives the shared data, the MD5 file detection algorithm is adopted to check the change before and after the data transmission, verify whether the file is damaged or modified in the transmission process, recover the damaged or modified data, verify the received data, recover the damaged or modified data, ensure the safety of the shared data and improve the sharing quality.
As a further improvement of the technical solution, the wireless encryption pairing algorithm includes the following steps:
initializing a device A, generating a random number a, and transmitting the random number to a device B through a Bluetooth channel, wherein the device A and the device B respectively generate an initialization key K by using a function E22;
the equipment B generates an authentication random number B and sends the authentication random number B to the equipment A, the equipment A calculates a response number S1 with 32 bits through an authentication function E1 and sends the response number S1 to the equipment B, the equipment B also calculates the response number S2 with 32 bits through an authentication function E1 and compares whether the S1 is consistent with the S2 to continuously complete the pairing process, otherwise, the pairing fails;
and then carrying out the authentication in the opposite direction, generating an authentication random number a by the equipment A, sending the authentication random number a to the equipment B, calculating S2 by the equipment B, sending the authentication random number a to the equipment A, comparing whether the calculated S1 is consistent with the information sent by the equipment B by the equipment A, if so, successfully pairing, and otherwise, failing to pair.
As a further improvement of the present technical solution, the positioning matching algorithm includes the following steps:
the initiating equipment keys in the character position information of the responding equipment;
the geographic location of the location-responsive device is calculated as follows:
wherein,
in response to carrier phase observations at time tk from device R to satellite j,
in response to the geometric distance of the device R from the satellite j at time tk,
is the broadcast orbital deviation of satellite j, c is the speed of light in vacuum,
is the clock offset for the satellite j,
in response to the clock difference of the device R,
is the integer ambiguity of the carrier phase,
in response to ionospheric delays in signal propagation between the device R and the satellite j,
in response to tropospheric delays in signal propagation between device R and satellite j,
for errors due to noise of the responding device R,
for errors due to the multipath effect,
is the wavelength of the carrier;
the method and the device have the advantages that the position information input by the initiating device is compared with the position information positioned by the responding device by adopting a position information comparison algorithm, the verification is successful if the position information is matched with the position information of the initiating device, otherwise, the verification fails, when the initiating device is matched with the responding device, the position information is compared, the character position information input by the initiating device is matched with the position information of the responding device, the accurate connection between the initiating device and the responding device is ensured, the misconnection is avoided, and the data transmission is safer.
As a further improvement of the technical solution, the position information comparison algorithm includes the following steps:
reading in a character string X of character position information input by initiating equipment and a character string Y of position information positioned by responding equipment;
dividing the character string X into character sub-strings X1, dividing the character string Y into character sub-strings Y1, inquiring an address matching rule tree, limiting the range of alternative fields during the next search according to the rule tree, and reducing the longitudinal search range of matching inquiry;
the character substrings X1 and Y1 are correspondingly matched, the verification fails when ambiguity occurs between X1 and Y1, and the verification succeeds when the ambiguity occurs between X1 and Y1, so that the comparison between the character position information and the positioned position information is more accurate, the matching verification of the position information is ensured, and the safety is higher.
As a further improvement of the present technical solution, the multilink encapsulation algorithm includes the following steps:
converting the original data into a data segment at a transmission layer;
converting the data segment into a data packet in a network layer;
the data packet is converted into a frame at a link layer, so that the data occupying a larger memory is encapsulated into a frame, the memory occupied by the data is reduced, the load in the transmission process is favorably reduced, and the transmission efficiency is improved.
As a further improvement of the technical solution, the token bucket partitioning algorithm has a calculation formula as follows:
and (3) segmentation calculation:
the token bucket stores data blocks:
number of redundant remaining blocks:
the data transmission method includes the steps that X is all data block memories, X1, X2, the page, xn is a single data block memory, Y is a data block memory stored in a token bucket, M is a memory allowing the maximum data block to pass through, n is the total number of data blocks, k is the number of transmittable data blocks, and Y is the number of data blocks stored in a buffer mode.
As a further improvement of the technical solution, a data amount calculation formula of the data memory allocation algorithm is as follows:
wherein, K is the data amount of transmission, D is the transmission time period, D is the maximum transmission path, M is the total number of times of data block transmission stay, and i is the sequence of the number of times of data block transmission stay.
Compared with the prior art, the invention has the beneficial effects that:
1. in the appointed data sharing method facing to the personal computer user, connection is established through twice encryption authentication pairing, then shared data is packaged into frames in initiating equipment, the data is shaped into small data blocks and stored in a token bucket memory and a buffer memory respectively and sequentially transmitted according to the maximum data frame allowed by keying in of responding equipment, shared flow is controlled, then received data is verified, damaged or modified data is recovered, and the safety of the shared data is guaranteed.
2. According to the designated data sharing method for the personal computer user, the positioning matching algorithm is adopted, so that when the initiating device is matched with the responding device, the position information is compared, the character position information input by the initiating device is matched with the positioning position information of the responding device, the accurate connection between the initiating device and the responding device is ensured, the misconnection is avoided, and the data transmission is safer.
Drawings
FIG. 1 is an overall flow chart of example 1;
FIG. 2 is an overall algorithm block diagram ofembodiment 1;
FIG. 3 is an overall schematic diagram ofembodiment 1;
FIG. 4 is a flowchart of a wireless encryption pairing algorithm ofembodiment 1;
FIG. 5 is a flowchart of the location matching algorithm ofembodiment 1;
FIG. 6 is a flowchart of the multilink encapsulation algorithm ofembodiment 1;
fig. 7 is a flowchart of the token bucket partitioning algorithm ofembodiment 1.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1
Referring to fig. 1-7, the present embodiment provides a method for sharing designated data for a personal computer user, including the following steps:
s1, realizing the first encryption authentication pairing by adopting a wireless encryption pairing algorithm, and completing the pairing to establish a shared link;
s2, the positioning matching algorithm is adopted again to realize the second encryption authentication pairing, the connection is disconnected after the pairing is failed, the pairing is successful, a pairing success signal is sent, the two computers are paired more accurately through the two times of encryption authentication pairing, and the data mistransmission is effectively avoided;
s3, the initiating device receives the signal of 'pairing success', packages the data needing to be transmitted of the initiating device into frames by adopting a multilink packaging algorithm, and keys in the allowed maximum data frame memory to compare with the transmission data frame;
directly transmitting data when the transmission data frame memory is less than or equal to the maximum data frame memory, and sending a transmission signal when the transmission data frame memory is greater than the maximum data frame memory;
s4, the initiating device receives signals, data of a transmission data frame is shaped into a plurality of data blocks by a token bucket segmentation algorithm, the data blocks are integrated and distributed into a token bucket allowing the maximum data frame memory to be smaller than or equal to through a data memory distribution algorithm to share the data, redundant data blocks are buffered and stored until the data in the token bucket are completely transmitted, and the redundant data blocks are integrated into the token bucket until all the data blocks are shared, so that the shared flow is controlled, the phenomenon that the computer is overloaded due to rapid increase of the data is avoided, and the personal computer is protected;
s5, the response device receives the shared data, the MD5 file detection algorithm is adopted to check the change before and after the data transmission, whether the file is damaged or modified in the transmission process is verified, the damaged or modified data is recovered, the received data is verified, the damaged or modified data is recovered, the safety of the shared data is guaranteed, and the sharing quality is improved.
In this embodiment, the wireless encryption pairing algorithm includes the following steps:
initializing a device A, generating a random number a, and transmitting the random number to a device B through a Bluetooth channel, wherein the device A and the device B respectively generate an initialization key K by using a function E22;
the equipment B generates an authentication random number B and sends the authentication random number B to the equipment A, the equipment A calculates a response number S1 with 32 bits through an authentication function E1 and sends the response number S1 to the equipment B, the equipment B also calculates the response number S2 with 32 bits through an authentication function E1 and compares whether the S1 is consistent with the S2 to continuously complete the pairing process, otherwise, the pairing fails;
and then carrying out the authentication in the opposite direction, generating an authentication random number a by the equipment A, sending the authentication random number a to the equipment B, calculating S2 by the equipment B, sending the authentication random number a to the equipment A, comparing whether the calculated S1 is consistent with the information sent by the equipment B by the equipment A, if so, successfully pairing, and otherwise, failing to pair.
Further, the positioning matching algorithm comprises the following steps:
the initiating equipment keys in the character position information of the responding equipment;
the geographic location of the location-responsive device is calculated as follows:
wherein,
in response to carrier phase observations at time tk from device R to satellite j,
in response to the geometric distance of the device R from the satellite j at time tk,
is the broadcast orbital deviation of satellite j, c is the speed of light in vacuum,
is the clock offset for the satellite j,
in response to the clock difference of the device R,
is the integer ambiguity of the carrier phase,
in response to ionospheric delays in signal propagation between the device R and the satellite j,
in response to tropospheric delays in signal propagation between device R and satellite j,
for errors due to noise of the responding device R,
for errors due to the multipath effect,
is the wavelength of the carrier;
the method and the device have the advantages that the position information input by the initiating device is compared with the position information positioned by the responding device by adopting a position information comparison algorithm, the verification is successful if the position information is matched with the position information of the initiating device, otherwise, the verification fails, when the initiating device is matched with the responding device, the position information is compared, the character position information input by the initiating device is matched with the position information of the responding device, the accurate connection between the initiating device and the responding device is ensured, the misconnection is avoided, and the data transmission is safer.
Specifically, the position information comparison algorithm includes the following steps:
reading in a character string X of character position information input by initiating equipment and a character string Y of position information positioned by responding equipment;
dividing the character string X into character sub-strings X1, dividing the character string Y into character sub-strings Y1, inquiring an address matching rule tree, limiting the range of alternative fields during the next search according to the rule tree, and reducing the longitudinal search range of matching inquiry;
the character substrings X1 and Y1 are correspondingly matched, the verification fails when ambiguity occurs between X1 and Y1, and the verification succeeds when the ambiguity occurs between X1 and Y1, so that the comparison between the character position information and the positioned position information is more accurate, the matching verification of the position information is ensured, and the safety is higher.
Further, the multilink encapsulation algorithm comprises the following steps:
converting the original data into a data segment at a transmission layer;
converting the data segment into a data packet in a network layer;
the data packet is converted into a frame at a link layer, so that the data occupying a larger memory is encapsulated into a frame, the memory occupied by the data is reduced, the load in the transmission process is favorably reduced, and the transmission efficiency is improved.
Besides, the token bucket partitioning algorithm is calculated as follows:
and (3) segmentation calculation:
the token bucket stores data blocks:
number of redundant remaining blocks:
the data transmission method includes the steps that X is all data block memories, X1, X2, the page, xn is a single data block memory, Y is a data block memory stored in a token bucket, M is a memory allowing the maximum data block to pass through, n is the total number of data blocks, k is the number of transmittable data blocks, and Y is the number of data blocks stored in a buffer mode.
Specifically, the data amount calculation formula of the data memory allocation algorithm is as follows:
wherein, K is the data amount of transmission, D is the transmission time period, D is the maximum transmission path, M is the total number of times of data block transmission stay, and i is the sequence of the number of times of data block transmission stay.
The foregoing shows and describes the general principles, essential features, and advantages of the invention. It will be understood by those skilled in the art that the present invention is not limited to the embodiments described above, and the preferred embodiments of the present invention are described in the above embodiments and the description, and are not intended to limit the present invention. The scope of the invention is defined by the appended claims and equivalents thereof.