Data uploading method and system
Technical Field
The invention relates to the technical field of computers, in particular to a data uploading method and system.
Background
With the improvement of information technology, computer application programs on the internet are more and more popularized, and the user experience requirements on the application programs are higher and higher. The compatibility of the application program as software with hardware and the compatibility with a system are always concerned, and the acquisition of the user use data is an indispensable link for improving and upgrading the application program in time.
At present, a data transmission channel is generally established between a client and a server, and data to be transmitted is transmitted to the server through the transmission channel, so that the transmission process is slow, and the data transmission amount is long.
Disclosure of Invention
In view of this, the present invention provides a data uploading method and system with higher transmission efficiency.
The technical scheme of the invention is realized as follows: the invention provides a data uploading method, which comprises the following steps:
the client monitors the running state of the software and records a cache file generated by the software;
judging whether the characteristic value of the current cache file is matched with the preset cache file characteristic value every time the cache file is recorded, if so, continuing monitoring and recording the cache file;
and if not, uploading the cache file to the server.
On the basis of the above technical solution, preferably, before the client uploads the cache file to the server, the method further includes:
judging whether other uploading tasks for uploading the same cache file are uploaded completely or not;
if yes, sending a message that the uploading of the cache file is finished to the client;
if not, the cache file is continuously uploaded to the server.
On the basis of the above technical solution, preferably, before the client sends the data upload request, the method further includes:
the characteristic value of the cache file is sent to a server, the server judges whether other uploading tasks upload the cache file with the same characteristic value or not according to the characteristic value comparison of the cache file, if so, the server firstly traverses the cache file with the characteristic value, and simultaneously the server sends traversal result information to a client;
if not, the server sends execution uploading information to the client, and the client continues to upload the cache file.
On the basis of the above technical solution, preferably, the traversal result information includes data offset information of an uploaded part of the cache file and upload execution information.
Further preferably, the method further comprises the steps of acquiring data of each parameter in the software running process while recording the cache file generated by the software;
and when the data of the parameters are not in the corresponding standard data error range, acquiring the data of the parameters, and uploading the data of the parameters to a server as a cache file.
A data upload system comprising:
an operation monitoring module, a file judging module, a task judging module and a file transmission module,
the operation monitoring module is used for monitoring the software operation state of the client, including monitoring the cache file generated by the software and the operation parameters of the software;
the file judgment module is used for judging whether the cache file generated by the software and various parameters of the software operation are normal or not;
the task judging module is used for judging whether data transmitted between the client and the server are repeatedly uploaded or not and generating judging information to the file transmission module;
the file transmission module is used for transmitting files between the client and the server.
On the basis of the above technical solution, preferably, the operation monitoring module includes a data capture unit and a data simulation unit, the data capture unit is configured to capture a file generated in the software operation process and obtain various parameters, and the data simulation unit is configured to provide a preset cache file and various parameters generated by normal operation of the software.
On the basis of the above technical solution, preferably, the file judgment module includes a judgment unit, a determination unit and an output unit, the judgment unit is configured to compare the captured file and the captured parameter with the simulated file and the captured parameter, the determination unit outputs a judgment result according to the comparison result of the judgment unit, and the output unit sends the judgment result to the task judgment module.
On the basis of the above technical solution, preferably, the task determination module includes a feature value calculation unit, a feature value comparison unit and a transmission unit, the feature value calculation unit is configured to calculate feature values of the cache files on the client and the server, the feature value comparison unit is configured to compare the feature values of the cache files on the client and the server, and send a comparison result to the transmission unit, and the transmission unit summarizes whether the cache file and the parameter of the client need to be transmitted according to the comparison result and a determination result from the output unit, and sends the summary result to the transmission module.
On the basis of the above technical solution, preferably, the file transmission module includes an uploading unit, a downloading unit, and a command receiving unit, the command receiving unit receives the summary result from the task determining module, and executes uploading and downloading according to the summary result, the uploading unit is configured to upload client data to the server, and the downloading unit is configured to download data of the server to the client.
Compared with the prior art, the data uploading method and the data uploading system have the following beneficial effects:
the data uploading method and the data uploading system can enable the data to be uploaded more timely, can effectively avoid repeated uploading of the data, can avoid repeated uploading even if the data is uploaded at the same time, can enable the data which is not transmitted for one time to be continuously transmitted for the next time, and avoid repeated uploading caused by the fact that the data is not uploaded for one time.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of a data uploading method according to the present invention;
FIG. 2 is a flow chart of a data uploading method according to the present invention;
fig. 3 is a block diagram of a data uploading system according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to 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 obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
As shown in fig. 1 and in combination with fig. 2, the data uploading method of the present invention includes the following specific steps:
the client monitors the running state of the software and records a cache file generated by the software;
judging whether the characteristic value of the current cache file is matched with the preset cache file characteristic value every time the cache file is recorded, if so, continuing monitoring and recording the cache file;
and if not, uploading the cache file to the server.
In a specific embodiment, before uploading the cached file to the server, the client further includes:
judging whether other uploading tasks for uploading the same cache file are uploaded completely or not;
if yes, sending a message that the uploading of the cache file is finished to the client;
if not, the cache file is continuously uploaded to the server.
In a specific embodiment, before sending the data upload request, the client further includes:
the characteristic value of the cache file is sent to a server, the server judges whether other uploading tasks upload the cache file with the same characteristic value or not according to the characteristic value comparison of the cache file, if so, the server firstly traverses the cache file with the characteristic value, and simultaneously the server sends traversal result information to a client;
if not, the server sends execution uploading information to the client, and the client continues to upload the cache file.
In a specific embodiment, the traversal result information includes data offset information of an uploaded part of the cache file and upload execution information.
In a specific implementation mode, the method further comprises the steps of recording a cache file generated by the software, and simultaneously acquiring data of each parameter in the software operation process;
and when the data of the parameters are not in the corresponding standard data error range, acquiring the data of the parameters, and uploading the data of the parameters to a server as a cache file.
As shown in fig. 3, a data upload system includes:
the system comprises an operation monitoring module, a file judging module, a task judging module and a file transmission module;
the operation monitoring module is used for monitoring the software operation state of the client, including monitoring the cache file generated by the software and the operation parameters of the software;
the file judgment module is used for judging whether the cache file generated by the software and various parameters of the software operation are normal or not;
the task judging module is used for judging whether data transmitted between the client and the server are repeatedly uploaded or not and generating judging information to the file transmission module;
the file transmission module is used for transmitting files between the client and the server.
In a specific embodiment, the operation monitoring module includes a data capture unit and a data simulation unit, the data capture unit is configured to capture a file generated in the software operation process and obtain various parameters, and the data simulation unit is configured to provide a preset cache file and various parameters generated by normal operation of the software.
In a specific embodiment, the file judgment module includes a determination judgment unit and an output unit, the judgment unit is configured to compare the captured file and the captured parameter with the simulated file and the simulated parameter, the determination unit outputs a judgment result according to the comparison result of the judgment unit, and the output unit sends the judgment result to the task judgment module.
In a specific embodiment, the task determination module includes a feature value calculation unit, a feature value comparison unit, and a transmission unit, where the feature value calculation unit is configured to calculate feature values of cache files on the client and the server, the feature value comparison unit is configured to compare the feature values of the cache files on the client and the server, and send a comparison result to the transmission unit, and the transmission unit summarizes whether to transmit the cache file and the parameter of the client according to the comparison result and a determination result from the output unit, and sends the summary result to the transmission module.
In a specific embodiment, the file transmission module includes an uploading unit, a downloading unit, and a command receiving module, the command receiving module receives the summary result from the task determining module, and executes uploading and downloading according to the summary result, the uploading unit is configured to upload client data to the server, and the downloading unit is configured to download data of the server to the client.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.