CN109783451A - File updating method, device, equipment and medium based on Message Digest 5 - Google Patents
File updating method, device, equipment and medium based on Message Digest 5 Download PDFInfo
- Publication number
- CN109783451A CN109783451A CN201811528174.XA CN201811528174A CN109783451A CN 109783451 A CN109783451 A CN 109783451A CN 201811528174 A CN201811528174 A CN 201811528174A CN 109783451 A CN109783451 A CN 109783451A
- Authority
- CN
- China
- Prior art keywords
- subfile
- message digest
- modified
- library file
- eap
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 46
- 238000003860 storage Methods 0.000 claims abstract description 17
- 230000008859 change Effects 0.000 claims description 54
- 230000004048 modification Effects 0.000 claims description 20
- 238000012986 modification Methods 0.000 claims description 20
- 238000004590 computer program Methods 0.000 claims description 16
- 238000001514 detection method Methods 0.000 claims description 15
- 238000004422 calculation algorithm Methods 0.000 claims description 13
- 230000006870 function Effects 0.000 description 16
- 238000007726 management method Methods 0.000 description 13
- 230000001360 synchronised effect Effects 0.000 description 12
- 230000008569 process Effects 0.000 description 10
- 238000012550 audit Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 239000000203 mixture Substances 0.000 description 2
- 230000015572 biosynthetic process Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000010485 coping Effects 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 238000005429 filling process Methods 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 238000000844 transformation Methods 0.000 description 1
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a kind of file updating method based on Message Digest 5, device, computer equipment and storage mediums, which comprises obtains projects, the projects include the library file downloaded from third-party server;The eap-message digest of each first subfile in the library file is generated by Message Digest 5, and records the eap-message digest;According to the eap-message digest of record, whether each first subfile for detecting the library file is modified;When first subfile is modified, according to first subfile modified, the more new version of the library file is generated, and the more new version of the library file is uploaded in the third-party server.The present invention can be detected automatically after the completion of library file editor, the first subfile modified in the library file, and it can generate the more new version of the library file according to described by the first subfile and be uploaded to third-party server, improve the update efficiency of library file.
Description
Technical field
The present invention relates to data processing field more particularly to a kind of file updating methods based on Message Digest 5, dress
It sets, computer equipment and storage medium.
Background technique
It, only can be executable in main body wherein now when being edited using code management tools to a projects
When the document of file is modified, the document being modified can be prompted, but when the document of third party library file therein is modified,
The document being modified will not be then prompted, in the subsequent third party library synchronously renewing file that will be modified to third-party server
Shi Zaocheng is difficult;And the update (current library file also has same problem in updating) of subject executable needs to lead to now
Artificial progress, the low efficiency for causing projects to update are crossed, therefore needs one kind that can quickly detect quilt in third party library file
The document modified, and the method that may be implemented to automatically update subject executable, improve the update of entire projects
Efficiency enhances user experience.
Summary of the invention
Based on this, the present invention provide a kind of file updating method based on Message Digest 5, device, computer equipment and
Storage medium, the first subfile for detecting after the completion of library file editor, to be modified in the library file automatically, and root
According to described by the first subfile, generate the more new version of the library file and be uploaded to third-party server, improve library file
Update efficiency.
A kind of file updating method based on Message Digest 5, comprising:
Projects are obtained, the projects include the library file downloaded from third-party server;
The eap-message digest of each first subfile in the library file is generated by Message Digest 5, and is disappeared described in record
Breath abstract;
According to the eap-message digest of record, whether each first subfile for detecting the library file is modified;
When first subfile is modified, according to first subfile modified, the library file is generated
More new version, and the more new version of the library file is uploaded in the third-party server.
A kind of file updating device based on Message Digest 5, comprising:
Module is obtained, for obtaining projects, the projects include the library text downloaded from third-party server
Part;
Logging modle, the message for generating each first subfile in the library file by Message Digest 5 are plucked
It wants, and records the eap-message digest;
Detection module detects each first subfile of the library file for the eap-message digest according to record
Whether modified;
Update module, for according to first subfile modified, generating when first subfile is modified
The more new version of the library file, and the more new version of the library file is uploaded in the third-party server.
A kind of computer equipment, including memory, processor and storage are in the memory and can be in the processing
The computer program run on device, the processor are realized above-mentioned based on Message Digest 5 when executing the computer program
The step of file updating method.
A kind of computer readable storage medium, the computer-readable recording medium storage have computer program, the meter
The step of calculation machine program realizes the above-mentioned file updating method based on Message Digest 5 when being executed by processor.
The above-mentioned file updating method based on Message Digest 5, device, computer equipment and storage medium, can be
After the completion of three-party library Document Editing, the document being modified in third party library file is quickly detected, so as to be promoted this
The document-synchronization being modified is updated to the efficiency of third-party server, enhances user experience.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below by institute in the description to the embodiment of the present invention
Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the invention
Example, for those of ordinary skill in the art, without any creative labor, can also be according to these attached drawings
Obtain other attached drawings.
Fig. 1 is the application environment signal of the file updating method in one embodiment of the invention based on Message Digest 5
Figure;
Fig. 2 is the flow chart of the file updating method in one embodiment of the invention based on Message Digest 5;
Fig. 3 is the flow chart of the step S20 of the file updating method in one embodiment of the invention based on Message Digest 5;
Fig. 4 is the flow chart of the step S30 of the file updating method in one embodiment of the invention based on Message Digest 5;
Fig. 5 is the flow chart of the step S40 of the file updating method in one embodiment of the invention based on Message Digest 5;
Fig. 6 is the flow chart of the file updating method in another embodiment of the present invention based on Message Digest 5;
Fig. 7 is the schematic diagram of the file updating device in one embodiment of the invention based on Message Digest 5;
Fig. 8 is a schematic diagram of computer equipment in one embodiment of the invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair
Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts
Example, shall fall within the protection scope of the present invention.
File updating method provided by the invention based on Message Digest 5, can be applicable in the application environment such as Fig. 1,
Wherein, client (computer equipment/terminal device) is communicated by network with server (server-side).Firstly, by servicing
Device obtains the projects not yet edited, records each document of third party library file therein (namely the first above-mentioned Ziwen
Part) eap-message digest that is calculated by Message Digest 5 further after the completion of projects editor, detects therein the
Whether the eap-message digest of each document of tripartite's library file changes, and then gets in the third party library file and be modified
Document, so that the document-synchronization for being rapidly modified this is updated in third-party server.Wherein, client (calculates
Machine equipment/terminal device) it can be, but not limited to various personal computers, laptop, smart phone, tablet computer and portable
Formula wearable device.Server can be realized with the server cluster of the either multiple server compositions of independent server.
In one embodiment, as shown in Fig. 2, a kind of file updating method based on Message Digest 5 is provided, with the party
Method is illustrated for applying the server in Fig. 1, is included the following steps:
S10: obtaining projects, and the projects include the library file downloaded from third-party server.
The projects refer to that user is when exploitation, modification, optimizing or improving software, for source documents such as store codes
The file of part, the source files such as described code are for supporting the software and executing logic, to realize the function of the software;
The editing process of the projects is carried out in primary server by code management tools;The third-party server is
Refer to that the other party server for being different from primary server, the third-party server store and manage the library file, the library text
Part refers to the dynamic link library in the third-party server.
Understandably, the projects are by executing a subject executable and tune when realizing its function
It is completed with one or more library files, in the present embodiment, the library file is stored in third-party server, specifically,
The primary server (is deposited when realizing the function of the projects by executing the subject executable in primary server
Contain the main execution logic and/or arithmetic logic of the projects) and call third-party server in library file (i.e.
Above-mentioned third party library file) it completes.Therefore, when being edited to the projects, except to subject executable into
Edlin also needs to edit the library file in the third-party server called, completely to realize the projects
Function.
In the present embodiment, the acquisition projects refer to that acquisition is stored in the database of the primary server
The projects, and the projects (including subject executable or third party library file) are not yet edited, that is,
If user is to be developed to the projects and (create the projects and not synchronized update for the first time), acquisition is represented
The projects subject executable also it is not stored for support the projects main execution logic and/or
The source files such as the code of arithmetic logic, the source files such as code in the library file do not carry out any modification also;If user is pair
The projects modify, optimize or perfect, then represent the projects of acquisition subject executable and
The library file was not carried out any modification in main service by user also and (namely did not pass through after upper primary synchronized update
Cross any editor).The projects not yet edited are obtained, for recording the library text not yet edited in step S20
The eap-message digest that each first subfile of part is generated by Message Digest 5, and in step s 50, what record was not yet edited
Each second subfile of the subject executable controls the eap-message digest of digest algorithm generation by message.
S20: the eap-message digest of each first subfile in the library file is generated by Message Digest 5, and records institute
State eap-message digest.
Wherein, first subfile refers to the document (document that can be directly edited in the library file
For carrying the source files such as code, when being edited to the library file in the projects, that is, refer to in the document
The source files such as code edited).It include at least one described first subfile in the library file.The eap-message digest
Algorithm refers to the algorithm that the input of random length can be handled and be generated the pseudorandom output of regular length, described to disappear
Ceasing digest algorithm can be MD5 algorithm, CRC algorithm or SHA algorithm.
After first subfile carries out operation according to the Message Digest 5, generates and correspond to first Ziwen
The eap-message digest of part.The eap-message digest generated is a string of character strings, it will be appreciated that ground, the eap-message digest are equivalent to described the
The unique identification of one subfile namely each described first subfile, are generated described by the Message Digest 5
Eap-message digest is unique, and with accordingly the first subfile unique association;Specifically, it is presented as the first different subfiles
Different by the eap-message digest generated after the Message Digest 5, further, same first subfile is being repaired
After changing (namely having modified the source files such as code therein), the eap-message digest generated by the Message Digest 5,
The eap-message digest generated with the first subfile before accordingly being modified by the Message Digest 5 is not also identical, because
Whether this, can be changed by the eap-message digest of first subfile, to judge that first subfile is
It is no to be modified.
In the present embodiment, each first subfile for obtaining the library file is plucked by the message that Message Digest 5 generates
It wants, records all eap-message digests, and be stored in the database of primary server, for each by detection in step s 30
Whether the eap-message digest of the first subfile changes, to obtain the first Ziwen in the library file being modifiable by the user
Part.
S30: according to the eap-message digest of record, whether each first subfile for detecting the library file is repaired
Change.
After the completion of the projects editor, user can be by clicking pre-set button to the projects in client
Library file that update is synchronized in third-party server is (i.e. synchronous more by the first subfile modified in the library file
The new extremely third-party server), at this point, detecting the first subfile of each library file after the completion of projects editor
The eap-message digest whether change, and then judge the first subfile modified, first Ziwen modified
Part, refers to user when editing the projects, the operation such as is increased, modified or deleted to data such as codes therein
Library file in the first subfile.Understandably, the library file has generally comprised the first subfile described in dozens of, even
Hundreds of first subfiles, but when being edited to the projects, generally only to the several of library file therein
First subfile is modified, at this point, detecting what each subfile in the library file was generated by Message Digest 5
Eap-message digest is after the completion of the projects editor, if changes, can be quickly detected the first son being modified
File, (the more new version of the library file is modified according to described to the efficiency of the more new version of the raising generation library file
The first subfile generate).
S40: when first subfile is modified, according to first subfile modified, the library file is generated
More new version, and the more new version of the library file is uploaded in the third-party server.
Understandably, user is after completing to the editor of projects, needs according to being modified in the library file
First subfile generates the more new version of the library file, and then the library file is uploaded in third-party server, so that
Accordingly software at runtime, can be deployed into library file (namely the dynamic link for meeting its functional requirement to the projects
Library), to realize the function of the software.At this point, according to first Ziwen modified detected in step s 30
Part generates the more new version of the library file, because procedure described above avoid the first subfiles that manual retrieval is modified for it, improves
The library file is after the completion of the projects editor, the efficiency of synchronized update to the third-party server.
The present embodiment, can be after the completion of the projects editor by introducing Message Digest 5, and automatic detection is simultaneously
The document (i.e. above-mentioned first subfile) modified in wherein third party library file is obtained, and then according to the text modified
Grade, the third party library file in synchronized update third-party server promotes third party library file in the projects
Update efficiency.
In one embodiment, the Message Digest 5 is MD5 Message Digest 5, as shown in figure 3, the step S20
Include:
S201 fills first subfile, the file size of first subfile is made to meet the MD5 eap-message digest
The file size requirement of algorithm.
Understandably, the MD5 Message Digest 5 is a kind of Cryptographic Hash Function, and the principle is as follows: MD5 eap-message digest
Algorithm handles the data for input the MD5 Message Digest 5 with 512 groupings, each group and is divided into the grouping
16 13 seats groupings, when a data input the MD5 Message Digest 5, by filling coding and circulation to the data
After operation, export the eap-message digest of the data, the eap-message digest be it is uniquely corresponding with the data, also even input MD5 disappears
The data for ceasing digest algorithm are identical, then the eap-message digest that the data of corresponding input are exported also can be identical.
Understandably, the MD5 Message Digest 5 is a kind of Cryptographic Hash Function, if using the Cryptographic Hash Function
Operation is carried out, the Cryptographic Hash Function must be met to the length requirement of input data, therefore in the present embodiment, first to described
First subfile is filled, and the filling process is as follows: one 1 and multiple 0 is filled behind first subfile, directly
To meet the bit length of first subfile to the result of 512 complementations is 448 when, stop 0 filling, further, carrying out
To the filling information length indicated with 64 systems is added behind first subfile after filling, at this point, first son
File meets the MD5 Message Digest 5 to the length requirement of input data, in step S202 after being filled
The middle eap-message digest for generating first subfile.
Filled first subfile and the MD5 Message Digest 5 are carried out loop computation by S202, to generate
The eap-message digest of first subfile.
The loop computation process is as follows: according to preset four constants: A=0x67452301, B=0x0EFCDAB89,
C=0x98BADCFE, D=0x10325476;Preset four functions: F (X, Y, Z)=(X&Y) | ((~X) &Z);G(X,Y,Z)
=(X&Z) | (Y& (~Z));H (X, Y, Z)=X^Y^Z;I (X, Y, Z)=Y^ (X | (~Z)), wherein X, Y, Z are variable;Institute
It states the first subfile point and is handled with 512 for a grouping, each grouping carries out 4 round transformations, with 4 constants described above
It is calculated for starting variable, exports 4 variables again, carry out the operation of next grouping again with this 4 variables, until last
A equal operation of grouping finishes, at this point, 128 hashed values generated after 4 variables obtained joint are described first
The eap-message digest of subfile.
In one embodiment, as shown in figure 4, the step S30 the following steps are included:
S301 traverses each first subfile of the library file, detects the message of each first subfile
Whether abstract changes.
As above-mentioned, the eap-message digest is equivalent to the unique identification of first subfile, in the present embodiment, if described
First subfile of library file is modified (namely having modified code therein or other data), then corresponds to described first
The eap-message digest of subfile will also change.Therefore, it detects whether the unique identification changes, namely disappears described in detection
Whether breath abstract changes, and can obtain the first subfile modified.In the present embodiment, each first Ziwen is traversed first
Part generates the current eap-message digest of first subfile by Message Digest 5, and first subfile is worked as previous existence
At the eap-message digest that is recorded in step S20 before this with it of eap-message digest compare, to detect first subfile
Eap-message digest whether change.Namely after the completion of the projects editor, detects first subfile and currently lead to
The eap-message digest of Message Digest 5 generation is crossed, whether the eap-message digest recorded in step S20 with first subfile matches,
If matching, the eap-message digest for representing first subfile do not change, confirm that first subfile is not repaired at this time
Change;If mismatching, the eap-message digest for representing first subfile changed, and enters step S302 at this time, described in label
First subfile is the file modified.
In the present embodiment, when first subfile detection is completed (process of the detection is for example above-mentioned), i.e., pair
Next first subfile is detected, until all first subfiles have been detected and have finished.
S302 marks the described of the eap-message digest change in the eap-message digest change of first subfile
First subfile is the first subfile modified.
As above-mentioned, after the completion of the projects editor, whether the eap-message digest for detecting each first subfile becomes
More, can confirm after the completion of projects editor, each first subfile whether by user carried out modification (namely modification
Code therein or other data).
Specifically, it in the eap-message digest change of first subfile, represents after the completion of projects editor, it is described
The unique identification of first subfile is changed, further, it was demonstrated that first subfile is completed in projects editor
Afterwards, modification was carried out by user, at this point, first subfile of the eap-message digest change is marked, in order to primary server
First subfile modified is obtained in step s 40;When the eap-message digest of first subfile does not change,
It represents after the completion of projects editor, the unique identification of first subfile does not change, further, it was demonstrated that described
First subfile did not carried out modification by user after the completion of projects editor, at this point, in one embodiment, can be confirmed
First subfile is not modified, and is shown on the interface of user's edit item engineering, so that user can be more intuitive
Understand its editor content.
In one embodiment, as shown in figure 5, the step S40 the following steps are included:
S401 compares code and the modification of modified first subfile when first subfile is modified
The code of preceding first subfile confirms and obtains the code changed in modified first subfile and the change
The change of location locating in the library file of code more.
Wherein, the code of the change refers to user when editing the projects, in each described of the library file
The code modified, increase or deleted in first subfile.Understandably, the code of the change is stored in the institute modified
State in the first subfile, specifically, compare first the modified code of first subfile and first subfile into
Code before row modification, detection different code between the two, the different code is that first subfile is being modified
The code changed in the process, therefore obtain first subfile in first subfile modified and changed after being modified
Code and the change code change of location locating in the library file, can obtain it is all by modification, increase or
The code of deletion generates the more new version of the library file thus according to the code of the change, and then by the library file
More new version is uploaded to the third-party server.Understandably, because the data updated are smaller, therefore according to the generation of the change
Code generates the more new version of the library file, generates the library file more compared to according to first subfile modified
For new version, formation speed is faster.
Specifically, first subfile modified and first subfile when not modified before this are compared,
Whether the code detected in first subfile modified changes, and obtains and change in first subfile modified
Code, so as to the more new version of the library file according to the code building of the change of acquisition in step S402.
S402 looks for the change of location in the library file downloaded from third-party server, by the change bit
The code set replaces with the code of the change, to generate the more new version of the library file.
Understandably, after the completion of the projects editor, the library file in the projects modified
It cannot directly be uploaded in the third-party server and be updated, but need the code according to the change, from third party
The change of location is looked for by the library file China downloaded in server, and then the code of the change of location is replaced with institute
The code of change is stated, to generate the more new version of the library file, and then the more new version of the library file is uploaded to described
Third-party server.
S403 is uploaded to the third party by the more new version of the library file of generation by preset management path
In server.
The management path is to manage the upload and modification of dynamic link library (namely library file) in third-party server
Channel (i.e. path), it will be appreciated that ground, the third-party server management simultaneously stores the library file, at this point, to that will give birth to
At the more new version of the library file be uploaded in the third-party server, the institute in the third-party server must be passed through
Stating management path can upload, and the information in the management path can be stored in advance in the database of primary server.It will generate
The more new version of the library file be uploaded in the third-party server, can be with so that the projects are at runtime
It is deployed into the library file for meeting its functional requirement, to realize the function of the projects.
In another embodiment, after the step S402, further includes:
The more new version of the library file of generation is sent to the manager of the third-party server, for the pipe
Whether the audit of reason side receives this modification.
The third-party server is the server for managing and storing the library file, and the manager is responsible for described in management
Third-party server;Understandably, it is needing the more new version of the library file of generation being uploaded to unknown above-mentioned management road
When the third-party server of diameter, the permission by manager is needed at this time, can complete to upload, therefore in unknown above-mentioned management path
When, by the more new version of the library file of the generation be sent to the manager of the third-party server for the manager into
Row audit, to obtain the permission of the manager, is uploaded to the third-party server for the more new version of the library file.
In another embodiment, the projects also include subject executable, as shown in fig. 6, the method is also
The following steps are included:
S50 generates the message of each second subfile of the subject executable of projects by Message Digest 5
Abstract, and whether modified according to each second subfile that the eap-message digest detects the subject executable.
Wherein, second subfile refers to the document that can be directly edited in the subject executable,
It include at least one described second subfile in the subject executable.
The subject executable refers to the text for generating in primary server, and store the source files such as body code
Part, the source files such as described body code are for supporting the main execution of the software and logic;The subject executable can
To be stored in advance in the database of the primary server, can also be compiled when developing software by code management tools by user
It is generated after volume.
As above-mentioned, the eap-message digest is equivalent to unique mark of second subfile of the subject executable
Know.In the present embodiment, each second subfile of the subject executable is generated by Message Digest 5 first
Eap-message digest, and record the eap-message digest, further, after the completion of the projects editor, pass through eap-message digest
Algorithm generates the current eap-message digest of each second subfile of the subject executable, and the main body can be performed
The eap-message digest that second subfile of file is currently generated disappears with what is recorded before the projects editor completes before this
Breath abstract is compared, so that second subfile for detecting the subject executable is complete in the projects editor
Whether Cheng Hou, eap-message digest change, if the eap-message digest of second subfile of the subject executable is sent out
It changes more, can mark second subfile at this time is the file modified, to obtain second Ziwen in step S60
The code changed in part;If the eap-message digest of second subfile does not change, can confirm the subfile not by
Modification, and may be displayed on the interface of the current edit item engineering of user, to prompt user.
S60 is obtained and is changed in the subject executable modified when the subject executable is modified
Code, and the subject executable according to the code update changed in the subject executable modified.
Understandably, after the completion of the projects editor namely user complete to the exploitation of the software, modification,
When optimizing or improving, need to update the subject executable in the projects, to allow primary server by holding
The updated subject executable of row realizes the function of the projects accordingly software.Specifically, process is to obtain
Take the code changed in subject executable, and the main body according to the code update changed in the subject executable
Executable file.Wherein, the code of the change refers to that user when editing the projects, can be performed in the main body
The code modified, increase or deleted in each second subfile of file.
Understandably, the primary server is the server for managing and storing the subject executable, in this implementation
In example, the code changed in second subfile for the subject executable modified, the acquisition are obtained first
Process be referred to described in step S401, details are not described herein, further, can be performed according to the main body of acquisition modified
The code changed in file updates the subject executable, so that the update of subject executable is carried out without artificial,
And can be achieved on and automatically update, the update efficiency of the entire projects is improved, user experience is enhanced.
File updating method based on Message Digest 5 of the invention, can be described by introducing Message Digest 5
After the completion of projects editor, detects automatically and obtain document (i.e. above-mentioned first son modified in wherein third party library file
File), and then according to the document of modification, the third party library file in synchronized update third-party server, and can also be in institute
After the completion of stating projects editor, the file modified in aforementioned body executable file is obtained, and in the primary server
Synchronized update is completed, the update efficiency of entire projects is improved, enhances user experience.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process
Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limit
It is fixed.
In one embodiment, a kind of file updating device based on Message Digest 5 is provided, should be calculated based on eap-message digest
The file updating method based on Message Digest 5 corresponds in the file updating device and above-described embodiment of method.Such as Fig. 7 institute
Show, should include obtaining module 11, logging modle 12, detection module 13 and updating based on the file updating device of Message Digest 5
Module 14.Detailed description are as follows for each functional module:
The acquisition module 11, for obtaining projects, the projects include to download from third-party server
Library file;
The logging modle 12, for generating disappearing for each first subfile in the library file by Message Digest 5
Breath abstract, and record the eap-message digest;
The detection module 13 detects each described the first of the library file for the eap-message digest according to record
Whether subfile is modified;
The update module 14, for when first subfile is modified, according to first Ziwen modified
Part generates the more new version of the library file, and the more new version of the library file is uploaded in the third-party server.
File updating device based on Message Digest 5 of the invention, can be described by introducing Message Digest 5
After the completion of projects editor, detects automatically and obtain document (i.e. above-mentioned first son modified in wherein third party library file
File), and then according to the document modified, the third party library file in synchronized update third-party server is promoted
The update efficiency of third party library file in the projects.
In one embodiment, as shown in fig. 7, the detection module 13 includes:
Detection unit 131 detects each first subfile for traversing each first subfile of the library file
The eap-message digest whether change;
Marking unit 132, for marking the eap-message digest in the eap-message digest change of first subfile
First subfile of change is the first subfile modified.
In one embodiment, as shown in fig. 7, the update module 14 includes:
Acquiring unit 141, for comparing modified first subfile when first subfile is modified
The code of first subfile before code and modification, confirms and obtains the generation changed in modified first subfile
Code and the code of change change of location locating in the library file;
Generation unit 142 looks for the change of location in the library file for downloading from third-party server, will
The code of the change of location replaces with the code of the change, to generate the more new version of the library file;
Uploading unit 143, the more new version of the library file for that will generate are uploaded to by preset management path
In the third-party server.
In one embodiment, the update module 14 further include:
Unit is audited, for the more new version of the library file generated to be sent to the management of the third-party server
Side, so that whether manager audit receives this modification.
In one embodiment, the Message Digest 5 is MD5 Message Digest 5, and the logging modle 12 includes:
Fills unit makes the file size of first subfile meet the MD5 for filling first subfile
The file size requirement of Message Digest 5;
Generation unit, for filled first subfile and the MD5 Message Digest 5 to be carried out circulation fortune
It calculates, to generate the eap-message digest of first subfile.In one embodiment, the file based on Message Digest 5 updates
Device further include:
Main part detection module, each second of the subject executable for generating projects by Message Digest 5
The eap-message digest of subfile, and be according to each second subfile that the eap-message digest detects the subject executable
It is no to be modified;
Main part update module, for when the subject executable is modified, obtaining the main body modified can
Execute the code changed in file, and the main body according to the code update changed in the subject executable modified
Executable file.
Specific restriction about the file updating device based on Message Digest 5 may refer to above for based on disappearing
The restriction of the file updating method of digest algorithm is ceased, details are not described herein.The above-mentioned more new clothes of the file based on Message Digest 5
Modules in setting can be realized fully or partially through software, hardware and combinations thereof.Above-mentioned each module can be in the form of hardware
It is embedded in or independently of the storage that in the processor in computer equipment, can also be stored in a software form in computer equipment
In device, the corresponding operation of the above modules is executed in order to which processor calls.
In one embodiment, a kind of computer equipment is provided, which can be server, internal junction
Composition can be as shown in Figure 8.The computer equipment include by system bus connect processor, memory, network interface and
Database.Wherein, the processor of the computer equipment is for providing calculating and control ability.The memory packet of the computer equipment
Include non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system, computer program and data
Library.The built-in storage provides environment for the operation of operating system and computer program in non-volatile memory medium.The calculating
The network interface of machine equipment is used to communicate with external terminal by network connection.When the computer program is executed by processor with
Realize a kind of file updating method based on Message Digest 5.
In one embodiment, a kind of computer equipment is provided, including memory, processor and storage are on a memory
And the computer program that can be run on a processor, processor perform the steps of when executing computer program
Projects are obtained, the projects include the library file downloaded from third-party server;
The eap-message digest of each first subfile in the library file is generated by Message Digest 5, and is disappeared described in record
Breath abstract;
According to the eap-message digest of record, whether each first subfile for detecting the library file is modified;
When first subfile is modified, according to first subfile modified, the library file is generated
More new version, and the more new version of the library file is uploaded in the third-party server.
Computer equipment of the invention by introduce Message Digest 5, can after the completion of the projects editor,
Automatically it detects and obtains the document (i.e. above-mentioned first subfile) modified in wherein third party library file, and then according to the quilt
The document of modification, the third party library file in synchronized update third-party server, promotes third party in the projects
The update efficiency of library file.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated
Machine program performs the steps of when being executed by processor
Projects are obtained, the projects include the library file downloaded from third-party server;
The eap-message digest of each first subfile in the library file is generated by Message Digest 5, and is disappeared described in record
Breath abstract;
According to the eap-message digest of record, whether each first subfile for detecting the library file is modified;
When first subfile is modified, according to first subfile modified, the library file is generated
More new version, and the more new version of the library file is uploaded in the third-party server.
Computer readable storage medium of the invention, can be in the projects editor by introducing Message Digest 5
After the completion, it detects automatically and obtains the document (i.e. above-mentioned first subfile) modified in wherein third party library file, Jin Ergen
According to the document modified, the third party library file in synchronized update third-party server promotes the projects
The update efficiency of middle third party library file.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer
In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein,
To any reference of memory, storage, database or other media used in each embodiment provided by the present invention,
Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM
(PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include
Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms,
Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing
Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM
(RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function
Can unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different
Functional unit, module are completed, i.e., the internal structure of described device is divided into different functional unit or module, more than completing
The all or part of function of description.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality
Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each
Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified
Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all
It is included within protection scope of the present invention.
Claims (10)
1. a kind of file updating method based on Message Digest 5 characterized by comprising
Projects are obtained, the projects include the library file downloaded from third-party server;
The eap-message digest of each first subfile in the library file is generated by Message Digest 5, and is recorded the message and plucked
It wants;
According to the eap-message digest of record, whether each first subfile for detecting the library file is modified;
When first subfile is modified, according to first subfile modified, the update of the library file is generated
Version, and the more new version of the library file is uploaded in the third-party server.
2. as described in claim 1 based on the file updating method of Message Digest 5, which is characterized in that described according to record
The eap-message digest, whether each first subfile for detecting the library file modified, comprising:
Each first subfile of the library file is traversed, whether the eap-message digest for detecting each first subfile becomes
More;
In the eap-message digest change of first subfile, first subfile of the eap-message digest change is marked
For the first subfile modified.
3. as described in claim 1 based on the file updating method of Message Digest 5, which is characterized in that described described
When one subfile is modified, according to first subfile modified, the more new version of the library file is generated, and will be described
The more new version of library file is uploaded in the third-party server, comprising:
When first subfile is modified, compare the code of modified first subfile and before modification described the
The code of one subfile, confirms and obtains the code changed and the code of the change in modified first subfile and exist
Locating change of location in the library file;
The change of location is looked in the library file downloaded from third-party server, the code of the change of location is replaced
It is changed to the code of the change, to generate the more new version of the library file;;
By the more new version of the library file of generation by preset management path, it is uploaded in the third-party server.
4. as described in claim 1 based on the file updating method of Message Digest 5, which is characterized in that the eap-message digest
Algorithm is MD5 Message Digest 5, and each first subfile generated in the library file by Message Digest 5 disappears
Breath abstract, comprising:
First subfile is filled, the file size of first subfile is made to meet the text of the MD5 Message Digest 5
Part length requirement;
Filled first subfile and the MD5 Message Digest 5 are subjected to loop computation, to generate described first
The eap-message digest of subfile.
5. as described in claim 1 based on the file updating method of Message Digest 5, which is characterized in that the projects
It also include subject executable;
It is described when first subfile is modified, according to first subfile modified, generate the library file
More new version, and after the more new version of the library file is uploaded in the third-party server, further includes:
The eap-message digest of each second subfile of the subject executable of projects, and root are generated by Message Digest 5
Whether modified according to each second subfile that the eap-message digest detects the subject executable;
When the subject executable is modified, the code changed in the subject executable modified is obtained,
And the subject executable according to the code update changed in the subject executable modified.
6. a kind of file updating device based on Message Digest 5 characterized by comprising
Module is obtained, for obtaining projects, the projects include the library file downloaded from third-party server;
Logging modle, for generating the eap-message digest of each first subfile in the library file by Message Digest 5, and
Record the eap-message digest;
Detection module, for the eap-message digest according to record, detect the library file each first subfile whether
It is modified;
Update module, for when first subfile is modified, according to first subfile modified, described in generation
The more new version of library file, and the more new version of the library file is uploaded in the third-party server.
7. the file updating device based on Message Digest 5 as claimed in claim 6, which is characterized in that the detection module
Include:
Detection unit detects the described of each first subfile for traversing each first subfile of the library file
Whether eap-message digest changes;
Marking unit, for marking the eap-message digest change in the eap-message digest change of first subfile
First subfile is the first subfile modified.
8. the file updating device based on Message Digest 5 as claimed in claim 6, which is characterized in that the update module
Include:
Acquiring unit, for when first subfile is modified, comparing after modifying when first subfile is modified
First subfile code and first subfile before modification code, confirm and obtain modified described
The code of the code and the change that are changed in one subfile change of location locating in the library file;
Generation unit looks for the change of location in the library file for downloading from third-party server, by the change
The code of more position replaces with the code of the change, to generate the more new version of the library file;
Uploading unit, the more new version of the library file for that will generate are uploaded to described by preset management path
In tripartite's server.
9. a kind of computer equipment, including memory, processor and storage are in the memory and can be in the processor
The computer program of upper operation, which is characterized in that the processor realized when executing the computer program as claim 1 to
The step of file updating method described in 5 any one based on Message Digest 5.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists
In realization is as described in any one of claim 1 to 5 when the computer program is executed by processor based on Message Digest 5
The step of file updating method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811528174.XA CN109783451A (en) | 2018-12-13 | 2018-12-13 | File updating method, device, equipment and medium based on Message Digest 5 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811528174.XA CN109783451A (en) | 2018-12-13 | 2018-12-13 | File updating method, device, equipment and medium based on Message Digest 5 |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109783451A true CN109783451A (en) | 2019-05-21 |
Family
ID=66496186
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811528174.XA Pending CN109783451A (en) | 2018-12-13 | 2018-12-13 | File updating method, device, equipment and medium based on Message Digest 5 |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109783451A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110347423A (en) * | 2019-06-28 | 2019-10-18 | 北京你财富计算机科技有限公司 | The online management method of file modification and device |
CN110960855A (en) * | 2019-12-19 | 2020-04-07 | 米哈游科技(上海)有限公司 | Communication protocol code updating method and device, electronic equipment and storage medium |
CN111831323A (en) * | 2020-05-29 | 2020-10-27 | 大数金科网络技术有限公司 | Containerized incremental continuous delivery method |
CN112398655A (en) * | 2019-08-19 | 2021-02-23 | 中移(苏州)软件技术有限公司 | File transmission method, server and computer storage medium |
CN113034308A (en) * | 2021-03-10 | 2021-06-25 | 西安热工研究院有限公司 | Method and system for acquiring instant power document data based on change characteristic detection |
CN117407003A (en) * | 2023-12-05 | 2024-01-16 | 飞腾信息技术有限公司 | Code translation processing method, device, processor and computer equipment |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2015074467A1 (en) * | 2013-11-25 | 2015-05-28 | 腾讯科技(深圳)有限公司 | Data update method, apparatus, and system and storage medium |
CN107391478A (en) * | 2017-08-15 | 2017-11-24 | 北京北信源软件股份有限公司 | A kind of online document edit methods and device |
CN107894895A (en) * | 2017-11-06 | 2018-04-10 | 网易(杭州)网络有限公司 | Processing method, device, storage medium, processor and the server of code update |
WO2018148120A1 (en) * | 2017-02-10 | 2018-08-16 | Smugmug, Inc. | Efficient similarity detection |
-
2018
- 2018-12-13 CN CN201811528174.XA patent/CN109783451A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2015074467A1 (en) * | 2013-11-25 | 2015-05-28 | 腾讯科技(深圳)有限公司 | Data update method, apparatus, and system and storage medium |
WO2018148120A1 (en) * | 2017-02-10 | 2018-08-16 | Smugmug, Inc. | Efficient similarity detection |
CN107391478A (en) * | 2017-08-15 | 2017-11-24 | 北京北信源软件股份有限公司 | A kind of online document edit methods and device |
CN107894895A (en) * | 2017-11-06 | 2018-04-10 | 网易(杭州)网络有限公司 | Processing method, device, storage medium, processor and the server of code update |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110347423A (en) * | 2019-06-28 | 2019-10-18 | 北京你财富计算机科技有限公司 | The online management method of file modification and device |
CN112398655A (en) * | 2019-08-19 | 2021-02-23 | 中移(苏州)软件技术有限公司 | File transmission method, server and computer storage medium |
CN112398655B (en) * | 2019-08-19 | 2022-06-03 | 中移(苏州)软件技术有限公司 | File transmission method, server and computer storage medium |
CN110960855A (en) * | 2019-12-19 | 2020-04-07 | 米哈游科技(上海)有限公司 | Communication protocol code updating method and device, electronic equipment and storage medium |
CN110960855B (en) * | 2019-12-19 | 2023-07-11 | 米哈游科技(上海)有限公司 | Communication protocol code updating method and device, electronic equipment and storage medium |
CN111831323A (en) * | 2020-05-29 | 2020-10-27 | 大数金科网络技术有限公司 | Containerized incremental continuous delivery method |
CN113034308A (en) * | 2021-03-10 | 2021-06-25 | 西安热工研究院有限公司 | Method and system for acquiring instant power document data based on change characteristic detection |
CN113034308B (en) * | 2021-03-10 | 2023-04-25 | 西安热工研究院有限公司 | Instant power document data acquisition method and system based on change feature detection |
CN117407003A (en) * | 2023-12-05 | 2024-01-16 | 飞腾信息技术有限公司 | Code translation processing method, device, processor and computer equipment |
CN117407003B (en) * | 2023-12-05 | 2024-03-19 | 飞腾信息技术有限公司 | Code translation processing method, device, processor and computer equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109783451A (en) | File updating method, device, equipment and medium based on Message Digest 5 | |
CN110162509A (en) | File comparison method, device, computer equipment and storage medium | |
CN104426955B (en) | The processing method and cloud storage service device of shared file | |
CN105045663B (en) | The method and system of rapid deployment virtual machine | |
CN106033388B (en) | Test case library management method and system | |
CN110780897B (en) | Code changing method and device | |
CN110362633B (en) | Block data storage method, device, computer equipment and storage medium | |
CN105224361B (en) | A kind of method and system upgraded to sqlite3 type embedded databases | |
CN105302533A (en) | Code synchronizing method and apparatus | |
CN112862490B (en) | Output consensus method under asynchronous network | |
CN111324577B (en) | Yml file reading and writing method and device | |
WO2019047480A1 (en) | Program update method, computer-readable storage medium, terminal device and apparatus | |
CN109949054B (en) | Key code determination method, device, equipment and storage medium | |
CN112650766A (en) | Database data operation method, system and server | |
WO2017201479A1 (en) | On-demand execution of continuous delivery pipeline segment models | |
CN110442371A (en) | A kind of method, apparatus of release code, medium and computer equipment | |
CN111273942A (en) | Code generation method, storage medium, electronic device and system | |
CN112685091A (en) | Service request processing method, device, equipment and medium based on big data | |
CN109101232A (en) | A kind of method, apparatus of product development, computer equipment and storage medium | |
CN107786520B (en) | Method and system for controlling resource access | |
CA3138761A1 (en) | Method, device, computer equipment and storage medium for verifying inter-system data admission | |
CN112597023A (en) | Case management method and device based on guide picture, computer equipment and storage medium | |
CN111857745A (en) | Multi-disk burning method, system, equipment and medium | |
CN116452123A (en) | Method and device for generating characteristic value of inventory item and computer equipment | |
CN110059485A (en) | Privately owned API detection method, terminal and the storage medium of IOS application |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |