CN110390064A - File updating method, device and system, storage medium and electronic device - Google Patents
File updating method, device and system, storage medium and electronic device Download PDFInfo
- Publication number
- CN110390064A CN110390064A CN201910678354.4A CN201910678354A CN110390064A CN 110390064 A CN110390064 A CN 110390064A CN 201910678354 A CN201910678354 A CN 201910678354A CN 110390064 A CN110390064 A CN 110390064A
- Authority
- CN
- China
- Prior art keywords
- file
- client
- identifier
- delta
- server
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 100
- 238000011161 development Methods 0.000 claims description 59
- 230000008569 process Effects 0.000 claims description 22
- 230000015654 memory Effects 0.000 claims description 19
- 230000006870 function Effects 0.000 claims description 18
- 238000004590 computer program Methods 0.000 claims description 11
- 230000005540 biological transmission Effects 0.000 claims description 2
- 239000000126 substance Substances 0.000 claims description 2
- 238000003780 insertion Methods 0.000 claims 1
- 230000037431 insertion Effects 0.000 claims 1
- 230000004044 response Effects 0.000 claims 1
- 238000005516 engineering process Methods 0.000 abstract description 6
- 238000010586 diagram Methods 0.000 description 9
- 230000003993 interaction Effects 0.000 description 6
- 238000004364 calculation method Methods 0.000 description 4
- 238000004891 communication Methods 0.000 description 4
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000004321 preservation Methods 0.000 description 2
- 230000005611 electricity Effects 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/16—File or folder operations, e.g. details of user interfaces specifically adapted to file systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/957—Browsing optimisation, e.g. caching or content distillation
- G06F16/9574—Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
Abstract
The invention discloses a kind of file updating method, device and system, storage medium and electronic device.Wherein, this method comprises: obtaining more new command on the client, wherein more new command updates the first file for requesting, and the first file is the file destination of the first version saved in client;The second file is obtained on the client relative to the delta file of the first file and the second identifier symbol of the second file, wherein the second file is the file destination of the second edition;Delta file is added in the first file, third file is obtained;In the case where the second identifier of the second file accords with situation identical with the third identifier of third file, the first file is updated to third file on the client.The present invention solves the technical problem for updating file inaccuracy in the related technology.
Description
Technical field
The present invention relates to computer fields, and in particular to a kind of file updating method, device and system, storage is situated between
Matter and electronic device.
Background technique
In the related technology, during accessing webpage, file required for access webpage can be saved in by client
It is local, to call directly the file locally saved when accessing webpage.If web page contents produce update, then related skill
It is directly to replace the file locally saved using updated file, and refresh webpage again and access in art.
If however, due to being that updated file is directly replaced the file locally saved, being made using the above method
At file update, there may be errors, cause the problem of updated web page contents inaccuracy.
For above-mentioned problem, currently no effective solution has been proposed.
Summary of the invention
The embodiment of the invention provides a kind of file updating method, device and system, storage medium and electronic device, so that
Few technical problem for solving to update file inaccuracy in the related technology.
According to an aspect of an embodiment of the present invention, a kind of file updating method is provided, comprising: obtain on the client
More new command, wherein above-mentioned more new command updates the first file for requesting, and above-mentioned first file is to save in above-mentioned client
First version file destination;Obtained in above-mentioned client the second file relative to the delta file of the first file and
The second identifier of above-mentioned second file accords with, wherein above-mentioned second file is the above-mentioned file destination of the second edition;By above-mentioned increment
File is added in above-mentioned first file, obtains third file;In the second identifier symbol and above-mentioned third text of above-mentioned second file
In the identical situation of third identifier of part, above-mentioned first file is updated to above-mentioned third file in above-mentioned client.
Other side according to an embodiment of the present invention additionally provides a kind of file updating method, comprising: client is connecing
In the case where receiving the more new command for requesting to update file destination, acquisition instruction is sent to server;Above-mentioned server is rung
Above-mentioned acquisition instruction is answered, by the second file relative to the delta file of the first file and the second identifier of above-mentioned second file
Symbol returns to above-mentioned client, wherein above-mentioned first file is the above-mentioned target text of the first version saved in above-mentioned client
Part, above-mentioned second file are the above-mentioned file destination of the second edition;Above-mentioned client receive above-mentioned delta file with it is above-mentioned
After second identifier symbol, above-mentioned delta file is added in above-mentioned first file, third file is obtained, in above-mentioned second file
Second identifier accords in situation identical with the third identifier of above-mentioned third file, and above-mentioned client updates above-mentioned first file
For above-mentioned third file.
Another aspect according to an embodiment of the present invention additionally provides a kind of file updating device, comprising: first obtains list
Member, for obtaining more new command on the client, wherein above-mentioned more new command for request update the first file, above-mentioned first
File is the file destination of the first version saved in above-mentioned client;Second acquisition unit, for being obtained in above-mentioned client
Take the second file relative to the delta file of the first file and the second identifier symbol of above-mentioned second file, wherein above-mentioned second
File is the above-mentioned file destination of the second edition;Adding unit, for above-mentioned delta file to be added in above-mentioned first file,
Obtain third file;First updating unit, the third for second identifier symbol and above-mentioned third file in above-mentioned second file
In the identical situation of identifier, above-mentioned first file is updated to above-mentioned third file in above-mentioned client.
Another aspect according to an embodiment of the present invention additionally provides a kind of file more new system, comprising: client is used for
In the case where receiving for requesting to update the more new command of file destination, acquisition instruction is sent to server;Above-mentioned service
Delta file and above-mentioned second file of the device for responding above-mentioned acquisition instruction, by the second file relative to the first file
Second identifier symbol returns to above-mentioned client, wherein above-mentioned first file is the upper of the first version saved in above-mentioned client
File destination is stated, above-mentioned second file is the above-mentioned file destination of the second edition;Above-mentioned client be also used to receive it is above-mentioned
After delta file and above-mentioned second identifier symbol, above-mentioned delta file is added in above-mentioned first file, third file, In are obtained
The second identifier of above-mentioned second file accords in situation identical with the third identifier of above-mentioned third file, and above-mentioned client will be upper
It states the first file and is updated to above-mentioned third file.
Another aspect according to an embodiment of the present invention, additionally provides a kind of storage medium, and meter is stored in the storage medium
Calculation machine program, wherein the computer program is arranged to execute above-mentioned file updating method when operation.
Another aspect according to an embodiment of the present invention, additionally provides a kind of electronic device, including memory, processor and deposits
Store up the computer program that can be run on a memory and on a processor, wherein above-mentioned processor passes through computer program and executes
Above-mentioned file updating method.
In embodiments of the present invention, using more new command is obtained on the client, the second text is obtained in above-mentioned client
Above-mentioned delta file is added to by part relative to the delta file of the first file and the second identifier symbol of above-mentioned second file
In above-mentioned first file, third file is obtained, in the third mark of the second identifier symbol and above-mentioned third file of above-mentioned second file
Know and accords in identical situation, the method that above-mentioned first file is updated to above-mentioned third file in above-mentioned client.Due to
In the above method, after getting delta file, delta file first can be added to acquisition third file in the first file, and
Compare the third identifier of the second identifier symbol and third file of the second file.It, just can be by first in the identical situation of the two
File is updated to third file.The delta file got is verified using the above method, ensure that the third text of generation
The accuracy of part improves the accuracy being updated to file, and then solves and update file inaccuracy in the related technology
Technical problem.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present invention, constitutes part of this application, this hair
Bright illustrative embodiments and their description are used to explain the present invention, and are not constituted improper limitations of the present invention.In the accompanying drawings:
Fig. 1 is a kind of schematic diagram of the application environment of optional file updating method according to an embodiment of the present invention;
Fig. 2 is a kind of flow diagram of optional file updating method according to an embodiment of the present invention;
Fig. 3 is a kind of schematic diagram of optional file updating method according to an embodiment of the present invention;
Fig. 4 is the schematic diagram of another optional file updating method according to an embodiment of the present invention;
Fig. 5 is the schematic diagram of another optional file updating method according to an embodiment of the present invention;
Fig. 6 is the flow diagram of another optional file updating method according to an embodiment of the present invention;
Fig. 7 is a kind of structural schematic diagram of optional file updating device according to an embodiment of the present invention;
Fig. 8 is a kind of structural schematic diagram of optional file more new system according to an embodiment of the present invention;
Fig. 9 is a kind of structural schematic diagram of optional electronic device according to an embodiment of the present invention.
Specific embodiment
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention
Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only
The embodiment of a part of the invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill people
The model that the present invention protects all should belong in member's every other embodiment obtained without making creative work
It encloses.
It should be noted that description and claims of this specification and term " first " in above-mentioned attached drawing, "
Two " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that using in this way
Data be interchangeable under appropriate circumstances, so as to the embodiment of the present invention described herein can in addition to illustrating herein or
Sequence other than those of description is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that cover
Cover it is non-exclusive include, for example, the process, method, system, product or equipment for containing a series of steps or units are not necessarily limited to
Step or unit those of is clearly listed, but may include be not clearly listed or for these process, methods, product
Or other step or units that equipment is intrinsic.
According to an aspect of an embodiment of the present invention, a kind of file updating method is provided, optionally, as a kind of optional
Embodiment, above-mentioned file updating method can be, but not limited to be applied to environment as shown in Figure 1 in.
Human-computer interaction can be carried out in Fig. 1 between user 102 and user equipment 104.It include storage in user equipment 104
Device 106, for storing interaction data, processor 108, for handling interaction data.User equipment 104 can pass through network 110
Data interaction is carried out between server 112.It include database 114 in server 112, for storing interaction data, processing
Engine 116, for handling interaction data.Server can be interacted with development equipment 118.User 102 when accessing webpage,
It is local file needed for access webpage can be stored in user equipment 104.However, after web page contents update, user
Equipment 104 can obtain the delta file of the transmission of server 112, and delta file is added in the first local file, obtain
Third file, in the case where the third identifier of third file and the second identifier of the second file accord with identical situation, in user equipment
First file is updated to third file on 104.
It should be noted that being that updated file is directly replaced the file locally saved in the related technology, cause
File is updated there may be error, causes updated web page contents inaccuracy.
And used in this programme and obtain more new command on the client, it is opposite that the second file is obtained in above-mentioned client
In the delta file of the first file and the second identifier symbol of above-mentioned second file, above-mentioned delta file is added to above-mentioned the
In one file, third file is obtained, in the third identifier phase of the second identifier symbol and above-mentioned third file of above-mentioned second file
With in the case where, above-mentioned first file is updated to above-mentioned third file in above-mentioned client method.Due in above-mentioned side
In method, after getting delta file, delta file first can be added in the first file acquisition third file, and compare the
The third identifier of the second identifier symbol and third file of two files.It, just can be by the first file more in the identical situation of the two
It is newly third file.The delta file got is verified using the above method, ensure that the standard of the third file of generation
True property, improves the accuracy being updated to file.
Optionally, above-mentioned user equipment 104 can be, but not limited to as such as mobile phone, tablet computer, laptop, PC machine
Etc. in terminals, above-mentioned network can include but is not limited to wireless network or cable network.Wherein, which includes: WIFI
And other realize the network of wireless communication.Above-mentioned cable network can include but is not limited to: wide area network, Metropolitan Area Network (MAN), local area network.On
Stating server 112 can include but is not limited to any hardware device that can be calculated, above-mentioned development equipment can with but it is unlimited
The client run on the hardware device or hardware device that Yu Weike develops file destination.
Optionally, as an alternative embodiment, as shown in Fig. 2, above-mentioned file updating method includes:
S202 obtains more new command on the client, wherein the more new command updates the first file, institute for requesting
State the file destination that the first file is the first version saved in the client;
S204 obtains the second file relative to the delta file of the first file and described second in the client
The second identifier of file accords with, wherein second file is the file destination of the second edition;
The delta file is added in first file, obtains third file by S206;
S208 accords with the situation identical as the third identifier of the third file in the second identifier of second file
Under, first file is updated to the third file in the client.
Optionally, above-mentioned file updating method can be, but not limited to be applied to client access webpage or start client
In the process.For example, when client accesses webpage, accessing the first file being locally stored, and visit so that client accesses webpage as an example
Ask webpage.And if the first file of server end is updated, then client is needed using updated first file access
Webpage.At this point, user end to server obtains delta file, under server accords with the second identifier of delta file and the second file
Issue client.Delta file is added in the first file by client, obtains third file, and calculates the third of third file
Identifier.Second identifier is accorded with and being compared with third identifier by client, if the two is identical, then illustrates updated third
File is identical as the second file of server side.At this point, the first file is updated to third file, when next time accesses webpage, directly
Connect starting third file.First file can be deleted, or continue to be stored in client.
By the above method, after getting delta file, first delta file can be added in the first file and obtained
Third file, and compare the third identifier of the second identifier symbol and third file of the second file.In the identical situation of the two,
Just the first file can be updated to third file.The delta file got is verified using the above method, ensure that life
At third file accuracy, improve the accuracy being updated to file.
Optionally, second identifier symbol may include second cryptographic Hash in this programme, second cryptographic Hash be using
Hash function carries out the obtained cryptographic Hash of Hash operation to second file, and third identifier third identifier includes described the
Three cryptographic Hash, the third cryptographic Hash are to carry out the Hash that Hash operation obtains to the third file using the hash function
Value.When comparing second identifier symbol with third identifier, can compare the second file the second cryptographic Hash and third file the
Three cryptographic Hash then illustrate that the second file is identical as third file if two cryptographic Hash are identical, if two cryptographic Hash differences,
Then illustrate that the second file is had any different with third file.
Optionally, the formula that cryptographic Hash is calculated in this programme can use existing formula, still, calculate the second file
The known of third cryptographic Hash of second cryptographic Hash and third file should be identical formula.
Optionally, the delta file in this programme is generated using development equipment.Operation has automation to generate on development equipment
Tool.Development equipment is development equipment under line, that is, during development equipment generates the second file, the second file is not sent
To server, it is sent to server after the completion of development equipment exploitation, then by the second file and delta file, server is got
Development equipment exploitation the second file and delta file after, delta file is sent to client, by client carry out save or
Existing file is updated.
For example, step S302 to the S312 in conjunction with Fig. 3 is illustrated.Client 302 preserves the first file, the first file
For the first version of file destination, the first file is also preserved in server 304 and development equipment 306.As shown in figure 3, exploitation
Equipment 306 is updated the first file, and the first file is updated to the second file.It is lower online in renewal process to carry out, service
The asynchronous update of the first file in device 306.After the first file is successfully updated to the second file by development equipment 306, then
Second file is sent to server 304, first file is updated by server 304, by the first file of server 304
It is updated to the second file.Meanwhile the delta file generated in development process is also sent to server 304 by development equipment 306.This
When, the second file and delta file are preserved in server 304.Client 302 can call local first when accessing webpage
File.Client 302 sends to server 304 and requests, and requests delta file.At this point, server is literary by delta file and second
The second identifier symbol of part is handed down to client 302, and delta file is added in the first file by client 302, obtains third text
Part, and whether the third identifier for comparing third file is identical as the second identifier symbol of the second file.If the two is identical, if
The two is identical, then illustrates that third file is identical as the second file, at this point it is possible to third file is saved in client 302, together
When can delete the first file.At this point, third file can be used in access webpage.
It should be noted that for client 302 when accessing webpage, it includes the second text that server 304, which issues, in this programme
To client 302, client 302 is completed when access starts webpage for the second identifier symbol of part and the starting webpage of delta file
The update of third file, and start third file access webpage.So as to avoid the refreshing of webpage.And above-mentioned server 304 will
Second identifier symbol and the delta file of second file, which are added in the starting page, to be handed down to client 302 and saves client 302
Access the number of server 304.
Optionally, if the second identifier symbol of the second file is different from the third identifier of third file in this programme, then
Client needs to request the second file to server, and updates the first local text of client using the second file got
Part.
Optionally, in this programme client get the second file second identifier symbol after, generate third file it
Before, second identifier symbol can also be compared and the first identifier of the first file accords with.If the two is identical, then be used directly the first file
Webpage is accessed, if the two is different, generates third file being added to delta file in the first file.
It is illustrated below in conjunction with a specific example.For example, by taking client accesses webpage as an example.Client accesses webpage
When, for new user, this programme stores static resource using localstorage, user access next time will directly from
Code is obtained in localStorage to execute.Code in localStorage is the first file.For stored resource but
It is the user for needing more new version, is updated using incremental update scheme.That is, the first file is updated to the second file.Such as
Shown in Fig. 4 step S402-S434, in this programme after getting delta file loadChunk, first determine whether client props up
Localstorage is held, if supporting localstorage, is then read according to the filename chunkName of delta file
The first file stored in localstorage.If there is return value, then illustrate that the first file has been locally stored in client.This
When, the first identifier for obtaining the first file accords with maniffest, and maniffest can be the cryptographic Hash hash of the first file.And it obtains
The cryptographic Hash hash for the second file for taking server to issue compares the cryptographic Hash of the first file and the cryptographic Hash of the second file, if
Be the first file cryptographic Hash it is identical as the cryptographic Hash of the second file, then illustrate the second file and client locally save first
File content is identical, directly the first file of execution.If the cryptographic Hash of the first file is different from the cryptographic Hash of the second file,
Then illustrate that update has been carried out in the second file.It is whether to have got delta file at this point, checking, has got increasing in determination
In the case where measuring file, delta file is added on the first file, third file is obtained, and calculates the Hash of third file
Value.The cryptographic Hash of third file is compared with the second cryptographic Hash of the second file, if verifying cryptographic Hash passes through, is then executed
Third file.Third file is the file after merging the first file with delta file.Delete the first file, and by third file
It is stored in localstorage.And in the process, if client does not support localstorage, or increase receiving
After measuring file, client locally without saving the first file, is perhaps not received by delta file or third is being calculated
After the cryptographic Hash of file, the third cryptographic Hash of third file and the second cryptographic Hash of the second file it is different in the case where, client
It is required to request Internet resources to server, Internet resources are the second file.And load the second file.If successfully loading, then
The second file is executed, if not loading successfully, is then retried, Internet resources are re-requested.If having retried request net
Network resource, then prompt refresh page.
Through this embodiment, by that first delta file can be added in the first file after getting delta file
Third file is obtained, and compares the third identifier of the second identifier symbol and third file of the second file.In the identical feelings of the two
Under condition, just the first file can be updated to third file.The delta file got is verified using the above method, is guaranteed
The accuracy of the third file generated, improves the accuracy being updated to file.
As a kind of optional embodiment, in the third of the second identifier symbol and the third file of second file
In the identical situation of identifier, first file, which is updated to the third file, in the client includes:
S1, in the second cryptographic Hash situation identical with the third cryptographic Hash of the third file of second file,
First file is updated to the third file in the client, wherein second identifier symbol includes described the
Two cryptographic Hash, second cryptographic Hash are to carry out the cryptographic Hash that Hash operation obtains to second file using hash function,
The third identifier includes the third cryptographic Hash, and the third cryptographic Hash is using the hash function to the third text
Part carries out the cryptographic Hash that Hash operation obtains.
Optionally, the method that cryptographic Hash is calculated in this programme can be used using existing any formula or method
The cryptographic Hash for the same file that same formula or method calculate is identical, the different files calculated using same formula or method
Cryptographic Hash it is different.
Through this embodiment, determine whether file is identical by the cryptographic Hash of calculation document, realize and improve file
The effect of comparison efficiency and accuracy.
As a kind of optional embodiment,
More new command is obtained in the client, comprising: S1 is received in the client for requesting access to mesh
Mark the access instruction of the page, wherein the more new command includes the access instruction;
Delta file and second file of second file relative to the first file are obtained in the client
Second identifier symbol, comprising: S1 is embedded with the delta file and the second identifier from server acquisition in the client
The target pages of symbol;
In the case where the second identifier of second file accords with situation identical with the third identifier of the third file, in institute
It states after first file is updated to the third file in client, the method also includes: S1 responds the access
Instruction, loads the target pages, and enable the third file in the client.
Optionally, in this programme server acquire development equipment upload delta file and the second file after,
The second identifier of second file can be accorded with and be embedded into the requested target pages of client with delta file.Then by target
Page downloading is to client.Client needs first to start the first file when starting target pages, and due to being wrapped in target pages
Delta file is included, therefore, the first file is first updated to third file by client needs, and in the third for judging third file
The second identifier of identifier and the second file accords in identical situation, starts third file, to start target pages.Pass through this
Method, target pages on startup, do not need to be refreshed as newest target pages.
Through this embodiment, target pages are started by the above method, thus when ensure that starting target pages, Bu Huijin
Row automatically refreshes, and improves the efficiency of starting target pages.
As a kind of optional embodiment, increment of second file relative to the first file is obtained in the client
File, comprising:
S1, the client obtain the delta file from server, wherein the delta file is under line using automatic
The differential file that chemical industry tool generates, the differential file are currently used on the file destination and line of the second edition
The poor code of the file destination of the first version, wherein be in development process, currently to make on the line under the line
The file destination of the first version used file before being exploitation.
Optionally, development equipment carries out exploitation update to the first file and obtains the process lower progress online of the second file, line
The file of lower exploitation will not be uploaded to server, and after the completion of exploitation, the second file is uploaded onto the server.It is uploaded to clothes
The file of business device is file on line, can be by client request.
Through this embodiment, delta file is generated by the above method, generates delta file without server, subtracts
The light burden of server, improves the efficiency for generating delta file.
As a kind of optional embodiment, before the client obtains the delta file from the server, institute
The method of stating includes:
S1 runs automation tools on development equipment and generates the file destination of the second edition, and obtains line
The file destination of the upper currently used first version;
S2, on the development equipment by the automation tools generate the file destination of the second edition with
The differential file between the file destination of the first version;
S3 is sent to the server for the differential file as the delta file on the development equipment.
Optionally, automation tools can be as shown in figure 5, chunkName passes through filename as the filename of delta file
The first file of client preservation can be found.And delta file is added in the first file.It is poor to generate in development equipment
After single cent part, need to generate differential version number for differential file.First file is such as updated to the differential file of the second file
Version number be 1, by the second file be updated to the differential file of the 4th file version number be 2.
Through this embodiment, delta file is generated by the above method, generates delta file without server, subtracts
The light burden of server, improves the efficiency for generating delta file.
As a kind of optional embodiment, the delta file is being added in first file, third is obtained
After file, further includes:
S1, in the case where the second identifier of second file symbol is different from the third identifier of the third file,
Obtain second file;
First file is updated to second file in the client by S2.
Optionally, if the second identifier symbol of the second file is different from the third identifier of the third file, then illustrate
Updated third file is different from the second file, at this time, it may be necessary to from server obtain the second file and by client it is local
First file is updated to the second file, and the third file of generation needs to delete.
Through this embodiment, third file, and the feelings different from the second file in third file are verified by the above method
Under condition, the second file is requested to server, to ensure that the accuracy of file renewal process.
It should be noted that for the various method embodiments described above, for simple description, therefore, it is stated as a series of
Combination of actions, but those skilled in the art should understand that, the present invention is not limited by the sequence of acts described because
According to the present invention, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art should also know
It knows, the embodiments described in the specification are all preferred embodiments, and related actions and modules is not necessarily of the invention
It is necessary.
Other side according to an embodiment of the present invention additionally provides a kind of file updating method.Optionally, such as Fig. 6 institute
Show, above-mentioned file updating method includes:
S602, client are sent out in the case where receiving for requesting to update the more new command of file destination to server
Send acquisition instruction;
S604, the server respond the acquisition instruction, by the second file relative to the first file delta file, with
And the second identifier symbol of second file returns to the client, wherein first file is to protect in the client
The file destination for the first version deposited, second file are the file destination of the second edition;
S606, the client is after receiving the delta file and second identifier symbol, by the delta file
It is added in first file, obtains third file, in second identifier symbol and the third file of second file
In the identical situation of third identifier, first file is updated to the third file by the client.
Optionally, above-mentioned file updating method can be, but not limited to be applied to client access webpage or start client
In the process.For example, when client accesses webpage, accessing the first file being locally stored, and visit so that client accesses webpage as an example
Ask webpage.And if the first file of server end is updated, then client is needed using updated first file access
Webpage.At this point, user end to server obtains delta file, under server accords with the second identifier of delta file and the second file
Issue client.Delta file is added in the first file by client, obtains third file, and calculates the third of third file
Identifier.Second identifier is accorded with and being compared with third identifier by client, if the two is identical, then illustrates updated third
File is identical as the second file of server side.At this point, the first file is updated to third file, when next time accesses webpage, directly
Connect starting third file.First file can be deleted, or continue to be stored in client.
By the above method, after getting delta file, first delta file can be added in the first file and obtained
Third file, and compare the third identifier of the second identifier symbol and third file of the second file.In the identical situation of the two,
Just the first file can be updated to third file.The delta file got is verified using the above method, ensure that life
At third file accuracy, improve the accuracy being updated to file.
Optionally, second identifier symbol may include second cryptographic Hash in this programme, second cryptographic Hash be using
Hash function carries out the obtained cryptographic Hash of Hash operation to second file, and third identifier third identifier includes described the
Three cryptographic Hash, the third cryptographic Hash are to carry out the Hash that Hash operation obtains to the third file using the hash function
Value.When comparing second identifier symbol with third identifier, can compare the second file the second cryptographic Hash and third file the
Three cryptographic Hash then illustrate that the second file is identical as third file if two cryptographic Hash are identical, if two cryptographic Hash differences,
Then illustrate that the second file is had any different with third file.
Optionally, the formula that cryptographic Hash is calculated in this programme can use existing formula, still, calculate the second file
The known of third cryptographic Hash of second cryptographic Hash and third file should be identical formula.
Optionally, the delta file in this programme is generated using development equipment.Operation has automation to generate on development equipment
Tool.Development equipment is development equipment under line, that is, during development equipment generates the second file, the second file is not sent
To server, it is sent to server after the completion of development equipment exploitation, then by the second file and delta file, server is got
Development equipment exploitation the second file and delta file after, delta file is sent to client, by client carry out save or
Existing file is updated.
For example, step S302 to the S312 in conjunction with Fig. 3 is illustrated.Client 302 preserves the first file, the first file
For the first version of file destination, the first file is also preserved in server 304 and development equipment 306.As shown in figure 3, exploitation
Equipment 306 is updated the first file, and the first file is updated to the second file.It is lower online in renewal process to carry out, service
The asynchronous update of the first file in device 306.After the first file is successfully updated to the second file by development equipment 306, then
Second file is sent to server 304, first file is updated by server 304, by the first file of server 304
It is updated to the second file.Meanwhile the delta file generated in development process is also sent to server 304 by development equipment 306.This
When, the second file and delta file are preserved in server 304.Client 302 can call local first when accessing webpage
File.Client 302 sends to server 304 and requests, and requests delta file.At this point, server is literary by delta file and second
The second identifier symbol of part is handed down to client 302, and delta file is added in the first file by client 302, obtains third text
Part, and whether the third identifier for comparing third file is identical as the second identifier symbol of the second file.If the two is identical, if
The two is identical, then illustrates that third file is identical as the second file, at this point it is possible to third file is saved in client 302, together
When can delete the first file.At this point, third file can be used in access webpage.
It should be noted that for client 302 when accessing webpage, it includes the second text that server 304, which issues, in this programme
To client 302, client 302 is completed when access starts webpage for the second identifier symbol of part and the starting webpage of delta file
The update of third file, and start third file access webpage.So as to avoid the refreshing of webpage.And above-mentioned server 304 will
Second identifier symbol and the delta file of second file, which are added in the starting page, to be handed down to client 302 and saves client 302
Access the number of server 304.
Optionally, if the second identifier symbol of the second file is different from the third identifier of third file in this programme, then
Client needs to request the second file to server, and updates the first local text of client using the second file got
Part.
Optionally, in this programme client get the second file second identifier symbol after, generate third file it
Before, second identifier symbol can also be compared and the first identifier of the first file accords with.If the two is identical, then be used directly the first file
Webpage is accessed, if the two is different, generates third file being added to delta file in the first file.
Through this embodiment, file is updated by the above method, so that client, after getting delta file, meeting is first
Delta file is added to acquisition third file in the first file, and compares the second identifier symbol and third file of the second file
Third identifier.In the identical situation of the two, the first file can be just updated to third file ensure that the third text of generation
The accuracy of part improves the accuracy being updated to file.
Another aspect according to an embodiment of the present invention additionally provides a kind of for implementing the text of above-mentioned file updating method
Part updating device.If Fig. 7 shows, which includes:
(1) first acquisition unit 702, for obtaining more new command on the client, wherein the more new command is for asking
It asks and updates the first file, first file is the file destination of the first version saved in the client;
(2) second acquisition unit 704, for obtaining increment of second file relative to the first file in the client
The second identifier of file and second file symbol, wherein second file is the file destination of the second edition;
(3) adding unit 706 obtain third file for the delta file to be added in first file;
(4) first updating units 708, the third for second identifier symbol and the third file in second file
In the identical situation of identifier, first file is updated to the third file in the client.
Optionally, above-mentioned file updating device can be, but not limited to be applied to client access webpage or start client
In the process.For example, when client accesses webpage, accessing the first file being locally stored, and visit so that client accesses webpage as an example
Ask webpage.And if the first file of server end is updated, then client is needed using updated first file access
Webpage.At this point, user end to server obtains delta file, under server accords with the second identifier of delta file and the second file
Issue client.Delta file is added in the first file by client, obtains third file, and calculates the third of third file
Identifier.Second identifier is accorded with and being compared with third identifier by client, if the two is identical, then illustrates updated third
File is identical as the second file of server side.At this point, the first file is updated to third file, when next time accesses webpage, directly
Connect starting third file.First file can be deleted, or continue to be stored in client.
By the above method, after getting delta file, first delta file can be added in the first file and obtained
Third file, and compare the third identifier of the second identifier symbol and third file of the second file.In the identical situation of the two,
Just the first file can be updated to third file.The delta file got is verified using the above method, ensure that life
At third file accuracy, improve the accuracy being updated to file.
Optionally, second identifier symbol may include second cryptographic Hash in this programme, second cryptographic Hash be using
Hash function carries out the obtained cryptographic Hash of Hash operation to second file, and third identifier third identifier includes described the
Three cryptographic Hash, the third cryptographic Hash are to carry out the Hash that Hash operation obtains to the third file using the hash function
Value.When comparing second identifier symbol with third identifier, can compare the second file the second cryptographic Hash and third file the
Three cryptographic Hash then illustrate that the second file is identical as third file if two cryptographic Hash are identical, if two cryptographic Hash differences,
Then illustrate that the second file is had any different with third file.
Optionally, the formula that cryptographic Hash is calculated in this programme can use existing formula, still, calculate the second file
The known of third cryptographic Hash of second cryptographic Hash and third file should be identical formula.
Optionally, the delta file in this programme is generated using development equipment.Operation has automation to generate on development equipment
Tool.Development equipment is development equipment under line, that is, during development equipment generates the second file, the second file is not sent
To server, it is sent to server after the completion of development equipment exploitation, then by the second file and delta file, server is got
Development equipment exploitation the second file and delta file after, delta file is sent to client, by client carry out save or
Existing file is updated.
For example, step S302 to the S312 in conjunction with Fig. 3 is illustrated.Client 302 preserves the first file, the first file
For the first version of file destination, the first file is also preserved in server 304 and development equipment 306.As shown in figure 3, exploitation
Equipment 306 is updated the first file, and the first file is updated to the second file.It is lower online in renewal process to carry out, service
The asynchronous update of the first file in device 306.After the first file is successfully updated to the second file by development equipment 306, then
Second file is sent to server 304, first file is updated by server 304, by the first file of server 304
It is updated to the second file.Meanwhile the delta file generated in development process is also sent to server 304 by development equipment 306.This
When, the second file and delta file are preserved in server 304.Client 302 can call local first when accessing webpage
File.Client 302 sends to server 304 and requests, and requests delta file.At this point, server is literary by delta file and second
The second identifier symbol of part is handed down to client 302, and delta file is added in the first file by client 302, obtains third text
Part, and whether the third identifier for comparing third file is identical as the second identifier symbol of the second file.If the two is identical, if
The two is identical, then illustrates that third file is identical as the second file, at this point it is possible to third file is saved in client 302, together
When can delete the first file.At this point, third file can be used in access webpage.
It should be noted that for client 302 when accessing webpage, it includes the second text that server 304, which issues, in this programme
To client 302, client 302 is completed when access starts webpage for the second identifier symbol of part and the starting webpage of delta file
The update of third file, and start third file access webpage.So as to avoid the refreshing of webpage.And above-mentioned server 304 will
Second identifier symbol and the delta file of second file, which are added in the starting page, to be handed down to client 302 and saves client 302
Access the number of server 304.
Optionally, if the second identifier symbol of the second file is different from the third identifier of third file in this programme, then
Client needs to request the second file to server, and updates the first local text of client using the second file got
Part.
Optionally, in this programme client get the second file second identifier symbol after, generate third file it
Before, second identifier symbol can also be compared and the first identifier of the first file accords with.If the two is identical, then be used directly the first file
Webpage is accessed, if the two is different, generates third file being added to delta file in the first file.
Through this embodiment, by that first delta file can be added in the first file after getting delta file
Third file is obtained, and compares the third identifier of the second identifier symbol and third file of the second file.In the identical feelings of the two
Under condition, just the first file can be updated to third file.The delta file got is verified using the above method, is guaranteed
The accuracy of the third file generated, improves the accuracy being updated to file.
As a kind of optional embodiment, above-mentioned first updating unit includes:
(1) update module, the third cryptographic Hash for the second cryptographic Hash and the third file in second file
In identical situation, first file is updated to the third file in the client, wherein the second identifier
Symbol includes second cryptographic Hash, and second cryptographic Hash is to carry out Hash operation to second file using hash function to obtain
The cryptographic Hash arrived, the third identifier include the third cryptographic Hash, and the third cryptographic Hash is using the hash function
The cryptographic Hash that Hash operation obtains is carried out to the third file.
Through this embodiment, determine whether file is identical by the cryptographic Hash of calculation document, realize and improve file
The effect of comparison efficiency and accuracy.
As a kind of optional embodiment,
Above-mentioned first acquisition unit includes: (1) receiving module, for receiving in the client for requesting access to
The access instruction of target pages, wherein the more new command includes the access instruction;
Above-mentioned second acquisition unit includes: (1) first acquisition module, embedding for obtaining in the client from server
Enter to have the target pages of the delta file and second identifier symbol;
Above-mentioned apparatus further include: (1) loading unit, for the second identifier symbol and the third text in second file
In the identical situation of third identifier of part, in the client by first file be updated to the third file it
Afterwards, the access instruction is responded, the target pages are loaded in the client, and enables the third file.
Through this embodiment, target pages are started by the above method, thus when ensure that starting target pages, Bu Huijin
Row automatically refreshes, and improves the efficiency of starting target pages.
As a kind of optional embodiment, above-mentioned second acquisition unit includes:
(1) second obtains module, for obtaining the delta file from server, wherein the delta file is under line
The differential file generated using automation tools, the differential file are that the file destination of the second edition and line are taken in
The poor code of the file destination of the preceding first version used, wherein be the line in development process under the line
File used in client before the file destination of the upper currently used first version is exploitation.
Through this embodiment, delta file is generated by the above method, generates delta file without server, subtracts
The light burden of server, improves the efficiency for generating delta file.
As a kind of optional embodiment, above-mentioned apparatus further include:
(1) third acquiring unit obtains third file for the delta file to be added in first file
Later, in the case where the second identifier of second file symbol is different from the third identifier of the third file, institute is obtained
State the second file;
(2) second updating units, for first file to be updated to second file in the client.
Through this embodiment, third file, and the feelings different from the second file in third file are verified by the above method
Under condition, the second file is requested to server, to ensure that the accuracy of file renewal process.
Another aspect according to an embodiment of the present invention additionally provides a kind of for implementing the text of above-mentioned file updating method
Part more new system.If Fig. 8 shows, which includes:
Client 802, for receive for request update file destination more new command in the case where, to server
Send acquisition instruction;
The server 804, the increment text for responding the acquisition instruction, by the second file relative to the first file
The second identifier of part and second file symbol returns to the client, wherein first file is the client
The file destination of the first version of upper preservation, second file are the file destination of the second edition;
The client 802 is also used to after receiving the delta file and second identifier symbol, by the increment
File is added in first file, obtains third file, in second identifier symbol and the third text of second file
In the identical situation of third identifier of part, first file is updated to the third file by the client.
Optionally, above-mentioned file more new system can be, but not limited to be applied to client access webpage or start client
In the process.For example, when client accesses webpage, accessing the first file being locally stored, and visit so that client accesses webpage as an example
Ask webpage.And if the first file of server end is updated, then client is needed using updated first file access
Webpage.At this point, user end to server obtains delta file, under server accords with the second identifier of delta file and the second file
Issue client.Delta file is added in the first file by client, obtains third file, and calculates the third of third file
Identifier.Second identifier is accorded with and being compared with third identifier by client, if the two is identical, then illustrates updated third
File is identical as the second file of server side.At this point, the first file is updated to third file, when next time accesses webpage, directly
Connect starting third file.First file can be deleted, or continue to be stored in client.
By the above method, after getting delta file, first delta file can be added in the first file and obtained
Third file, and compare the third identifier of the second identifier symbol and third file of the second file.In the identical situation of the two,
Just the first file can be updated to third file.The delta file got is verified using the above method, ensure that life
At third file accuracy, improve the accuracy being updated to file.
Optionally, second identifier symbol may include second cryptographic Hash in this programme, second cryptographic Hash be using
Hash function carries out the obtained cryptographic Hash of Hash operation to second file, and third identifier third identifier includes described the
Three cryptographic Hash, the third cryptographic Hash are to carry out the Hash that Hash operation obtains to the third file using the hash function
Value.When comparing second identifier symbol with third identifier, can compare the second file the second cryptographic Hash and third file the
Three cryptographic Hash then illustrate that the second file is identical as third file if two cryptographic Hash are identical, if two cryptographic Hash differences,
Then illustrate that the second file is had any different with third file.
Optionally, the formula that cryptographic Hash is calculated in this programme can use existing formula, still, calculate the second file
The known of third cryptographic Hash of second cryptographic Hash and third file should be identical formula.
Optionally, the delta file in this programme is generated using development equipment.Operation has automation to generate on development equipment
Tool.Development equipment is development equipment under line, that is, during development equipment generates the second file, the second file is not sent
To server, it is sent to server after the completion of development equipment exploitation, then by the second file and delta file, server is got
Development equipment exploitation the second file and delta file after, delta file is sent to client, by client carry out save or
Existing file is updated.
For example, step S302 to the S312 in conjunction with Fig. 3 is illustrated.Client 302 preserves the first file, the first file
For the first version of file destination, the first file is also preserved in server 304 and development equipment 306.As shown in figure 3, exploitation
Equipment 306 is updated the first file, and the first file is updated to the second file.It is lower online in renewal process to carry out, service
The asynchronous update of the first file in device 306.After the first file is successfully updated to the second file by development equipment 306, then
Second file is sent to server 304, first file is updated by server 304, by the first file of server 304
It is updated to the second file.Meanwhile the delta file generated in development process is also sent to server 304 by development equipment 306.This
When, the second file and delta file are preserved in server 304.Client 302 can call local first when accessing webpage
File.Client 302 sends to server 304 and requests, and requests delta file.At this point, server is literary by delta file and second
The second identifier symbol of part is handed down to client 302, and delta file is added in the first file by client 302, obtains third text
Part, and whether the third identifier for comparing third file is identical as the second identifier symbol of the second file.If the two is identical, if
The two is identical, then illustrates that third file is identical as the second file, at this point it is possible to third file is saved in client 302, together
When can delete the first file.At this point, third file can be used in access webpage.
It should be noted that for client 302 when accessing webpage, it includes the second text that server 304, which issues, in this programme
To client 302, client 302 is completed when access starts webpage for the second identifier symbol of part and the starting webpage of delta file
The update of third file, and start third file access webpage.So as to avoid the refreshing of webpage.And above-mentioned server 304 will
Second identifier symbol and the delta file of second file, which are added in the starting page, to be handed down to client 302 and saves client 302
Access the number of server 304.
Optionally, if the second identifier symbol of the second file is different from the third identifier of third file in this programme, then
Client needs to request the second file to server, and updates the first local text of client using the second file got
Part.
Optionally, in this programme client get the second file second identifier symbol after, generate third file it
Before, second identifier symbol can also be compared and the first identifier of the first file accords with.If the two is identical, then be used directly the first file
Webpage is accessed, if the two is different, generates third file being added to delta file in the first file.
Through this embodiment, file is updated by the above method, so that client, after getting delta file, meeting is first
Delta file is added to acquisition third file in the first file, and compares the second identifier symbol and third file of the second file
Third identifier.In the identical situation of the two, the first file can be just updated to third file ensure that the third text of generation
The accuracy of part improves the accuracy being updated to file.
Another aspect according to an embodiment of the present invention additionally provides a kind of for implementing the electricity of above-mentioned file updating method
Sub-device is stored with computer in the memory 902 as shown in figure 9, the electronic device includes memory 902 and processor 904
Program, the processor 904 are arranged to execute the step in any of the above-described embodiment of the method by computer program.
Optionally, in the present embodiment, above-mentioned electronic device can be located in multiple network equipments of computer network
At least one network equipment.
Optionally, in the present embodiment, above-mentioned processor can be set to execute following steps by computer program:
S1 obtains more new command on the client, wherein the more new command updates the first file for requesting, described
First file is the file destination of the first version saved in the client;
S2 obtains delta file and second text of second file relative to the first file in the client
The second identifier of part accords with, wherein second file is the file destination of the second edition;
The delta file is added in first file, obtains third file by S3;
S4, in the case where the second identifier of second file accords with situation identical with the third identifier of the third file,
First file is updated to the third file in the client.
Optionally, it will appreciated by the skilled person that structure shown in Fig. 9 is only to illustrate, electronic device can also
To be smart phone (such as Android phone, iOS mobile phone), tablet computer, palm PC and mobile internet device
The terminal devices such as (Mobile Internet Devices, MID), PAD.Fig. 9 it does not cause to the structure of above-mentioned electronic device
It limits.For example, electronic device may also include more perhaps less component (such as network interface) or tool than shown in Fig. 9
There is the configuration different from shown in Fig. 9.
Wherein, memory 902 can be used for storing software program and module, such as the file update side in the embodiment of the present invention
Method and the corresponding program instruction/module of device, processor 904 by the software program that is stored in memory 902 of operation and
Module realizes above-mentioned file updating method thereby executing various function application and data processing.Memory 902 can wrap
Include high speed random access memory, can also include nonvolatile memory, as one or more magnetic storage device, flash memory or
Other non-volatile solid state memories of person.In some instances, memory 902 can further comprise remote relative to processor 904
The memory of journey setting, these remote memories can pass through network connection to terminal.The example of above-mentioned network includes but unlimited
In internet, intranet, local area network, mobile radio communication and combinations thereof.Wherein, memory 902 specifically can be, but not limited to
For information such as the first file, delta files.As an example, as shown in figure 9, in above-mentioned memory 902 can with but it is unlimited
In include above-mentioned file updating device in first acquisition unit 702, second acquisition unit 704, adding unit 706 and first more
New unit 708.In addition, it can include but other modular units for being not limited in above-mentioned file updating device, in this example not
It repeats again.
Optionally, above-mentioned transmitting device 906 is used to that data to be received or sent via a network.Above-mentioned network tool
Body example may include cable network and wireless network.In an example, transmitting device 906 includes a network adapter
(Network Interface Controller, NIC), can be connected by cable with other network equipments with router to
It can be communicated with internet or local area network.In an example, transmitting device 906 is radio frequency (Radio Frequency, RF)
Module is used to wirelessly be communicated with internet.
In addition, above-mentioned electronic device further include: display 908, for showing third file;With connection bus 910, it is used for
Connect the modules component in above-mentioned electronic device.
The another aspect of embodiment according to the present invention, additionally provides a kind of storage medium, is stored in the storage medium
Computer program, wherein the computer program is arranged to execute the step in any of the above-described embodiment of the method when operation.
Optionally, in the present embodiment, above-mentioned storage medium can be set to store by executing based on following steps
Calculation machine program:
S1 obtains more new command on the client, wherein the more new command updates the first file for requesting, described
First file is the file destination of the first version saved in the client;
S2 obtains delta file and second text of second file relative to the first file in the client
The second identifier of part accords with, wherein second file is the file destination of the second edition;
The delta file is added in first file, obtains third file by S3;
S4, in the case where the second identifier of second file accords with situation identical with the third identifier of the third file,
First file is updated to the third file in the client.
Alternatively, optionally, in the present embodiment, above-mentioned storage medium can be set to storage for executing following steps
Computer program:
S1, client are sent in the case where receiving for requesting to update the more new command of file destination to server
Acquisition instruction;
S2, the server respond the acquisition instruction, by the second file relative to the delta file of the first file and
The second identifier symbol of second file returns to the client, wherein first file is to save in the client
First version the file destination, second file be the second edition the file destination;
S3, the client add the delta file after receiving the delta file and second identifier symbol
It is added in first file, obtains third file, in the second identifier symbol and the of the third file of second file
In the identical situation of three identifiers, first file is updated to the third file by the client.
Optionally, in the present embodiment, those of ordinary skill in the art will appreciate that in the various methods of above-described embodiment
All or part of the steps be that the relevant hardware of terminal device can be instructed to complete by program, the program can store in
In one computer readable storage medium, storage medium may include: flash disk, read-only memory (Read-Only Memory,
ROM), random access device (Random Access Memory, RAM), disk or CD etc..
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
If the integrated unit in above-described embodiment is realized in the form of SFU software functional unit and as independent product
When selling or using, it can store in above-mentioned computer-readable storage medium.Based on this understanding, skill of the invention
Substantially all or part of the part that contributes to existing technology or the technical solution can be with soft in other words for art scheme
The form of part product embodies, which is stored in a storage medium, including some instructions are used so that one
Platform or multiple stage computers equipment (can be personal computer, server or network equipment etc.) execute each embodiment institute of the present invention
State all or part of the steps of method.
In the above embodiment of the invention, it all emphasizes particularly on different fields to the description of each embodiment, does not have in some embodiment
The part of detailed description, reference can be made to the related descriptions of other embodiments.
In several embodiments provided herein, it should be understood that disclosed client, it can be by others side
Formula is realized.Wherein, the apparatus embodiments described above are merely exemplary, such as the division of the unit, and only one
Kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units or components can combine or
It is desirably integrated into another system, or some features can be ignored or not executed.Another point, it is shown or discussed it is mutual it
Between coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or communication link of unit or module
It connects, can be electrical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art
For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered
It is considered as protection scope of the present invention.
Claims (15)
1. a kind of file updating method characterized by comprising
More new command is obtained on the client, wherein the more new command updates the first file, first file for requesting
File destination for the first version saved in the client;
Obtained in the client the second file relative to the first file delta file and second file second
Identifier, wherein second file is the file destination of the second edition;
The delta file is added in first file, third file is obtained;
In the case where the second identifier of second file accords with situation identical with the third identifier of the third file, in the visitor
First file is updated to the third file on the end of family.
2. the method according to claim 1, wherein second identifier symbol and the third in second file
In the identical situation of third identifier of file, first file is updated to the third file packet in the client
It includes:
In the second cryptographic Hash situation identical with the third cryptographic Hash of the third file of second file, in the visitor
First file is updated to the third file on the end of family, wherein the second identifier symbol includes second cryptographic Hash,
Second cryptographic Hash is to carry out the cryptographic Hash that Hash operation obtains, the third mark to second file using hash function
Knowing symbol includes the third cryptographic Hash, and the third cryptographic Hash is to carry out Hash to the third file using the hash function
The cryptographic Hash that operation obtains.
3. the method according to claim 1, wherein
More new command is obtained in the client, comprising: receive in the client for requesting access to target pages
Access instruction, wherein the more new command includes the access instruction;
Obtained in the client the second file relative to the first file delta file and second file second
Identifier, comprising: obtain the institute for being embedded with the delta file and second identifier symbol from server in the client
State target pages;
In the case where the second identifier of second file accords with situation identical with the third identifier of the third file, in the visitor
After first file is updated to the third file on the end of family, the method also includes: respond the access instruction, In
The target pages are loaded in the client, and enable the third file.
4. the method according to claim 1, wherein obtaining the second file in the client relative to first
The delta file of file, comprising:
The client obtains the delta file from server, wherein the delta file is that automation tools are used under line
The differential file of generation, the differential file are currently used described the on the file destination and line of the second edition
The poor code of the file destination of one version, wherein be in development process, before being exploitation on the line under the line.
5. according to the method described in claim 4, it is characterized in that, the client obtains the increment text from the server
Before part, which comprises
Automation tools are run on development equipment and generate the file destination of the second edition, and are obtained and currently made on line
The file destination of the first version;
The file destination and described the of the second edition is generated by the automation tools on the development equipment
The differential file between the file destination of one version;
The server is sent to using the differential file as the delta file on the development equipment.
6. the method according to any one of claims 1 to 5, which is characterized in that the delta file is being added to institute
It states in the first file, after obtaining third file, further includes:
In the case where the second identifier of second file symbol is different from the third identifier of the third file, described in acquisition
Second file;
First file is updated to second file in the client.
7. a kind of file updating method characterized by comprising
Client sends acquisition to server and refers in the case where receiving for requesting to update the more new command of file destination
It enables;
The server responds the acquisition instruction, by the second file relative to the delta file of the first file and described the
The second identifier symbol of two files returns to the client, wherein first file is first saved in the client
The file destination of version, second file are the file destination of the second edition;
The delta file is added to described by the client after receiving the delta file and second identifier symbol
In first file, third file is obtained, in the third identifier of the second identifier symbol and the third file of second file
In identical situation, first file is updated to the third file by the client.
8. a kind of file updating device characterized by comprising
First acquisition unit, for obtaining more new command on the client, wherein the more new command updates first for requesting
File, first file are the file destination of the first version saved in the client;
Second acquisition unit, for obtained in the client the second file relative to the delta file of the first file and
The second identifier of second file accords with, wherein second file is the file destination of the second edition;
Adding unit obtains third file for the delta file to be added in first file;
First updating unit is identical as the third identifier of the third file for the second identifier symbol in second file
In the case where, first file is updated to the third file in the client.
9. device according to claim 8, which is characterized in that first updating unit includes:
Update module, for the second cryptographic Hash feelings identical with the third cryptographic Hash of the third file in second file
Under condition, first file is updated to the third file in the client, wherein the second identifier symbol includes institute
The second cryptographic Hash is stated, second cryptographic Hash is to carry out the Hash that Hash operation obtains to second file using hash function
Value, the third identifier include the third cryptographic Hash, and the third cryptographic Hash is using the hash function to described the
Three files carry out the cryptographic Hash that Hash operation obtains.
10. device according to claim 8, which is characterized in that
The first acquisition unit includes: receiving module, for receiving in the client for requesting access to page object
The access instruction in face, wherein the more new command includes the access instruction;
The second acquisition unit includes: the first acquisition module, for having obtained insertion from server in the client
State the target pages of delta file and second identifier symbol;
Described device further include: loading unit, for the second identifier symbol and the of the third file in second file
In the identical situation of three identifiers, after first file is updated to the third file in the client, response
The access instruction loads the target pages in the client, and enables the third file.
11. device according to claim 8, which is characterized in that the second acquisition unit includes:
Second obtains module, for obtaining the delta file from server, wherein the delta file is under line using automatic
The differential file that chemical industry tool generates, the differential file are currently used on the file destination and line of the second edition
The poor code of the file destination of the first version, wherein be in development process, currently to make on the line under the line
File used in client before the file destination of the first version is exploitation.
12. the device according to any one of claim 8 to 11, which is characterized in that described device further include:
Third acquiring unit, for the delta file to be added in first file, after obtaining third file, In
In the case that the second identifier symbol of second file is different from the third identifier of the third file, second text is obtained
Part;
Second updating unit, for first file to be updated to second file in the client.
13. a kind of file more new system characterized by comprising
Client, for being obtained to server transmission in the case where receiving for requesting to update the more new command of file destination
Instruction fetch;
The server, delta file, Yi Jisuo for responding the acquisition instruction, by the second file relative to the first file
The second identifier symbol for stating the second file returns to the client, wherein saves in the first file client
The file destination of first version, second file are the file destination of the second edition;
The client is also used to after receiving the delta file and second identifier symbol, and the delta file is added
Into first file, third file is obtained, in the third of the second identifier symbol and the third file of second file
In the identical situation of identifier, first file is updated to the third file by the client.
14. a kind of storage medium, the storage medium is stored with computer program, which is characterized in that the computer program fortune
Method described in the claim 1 to 6 or 7 any one is executed when row.
15. a kind of electronic device, including memory and processor, which is characterized in that be stored with computer journey in the memory
Sequence, the processor are arranged to execute described in the claim 1 to 6 or 7 any one by the computer program
Method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910678354.4A CN110390064A (en) | 2019-07-25 | 2019-07-25 | File updating method, device and system, storage medium and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910678354.4A CN110390064A (en) | 2019-07-25 | 2019-07-25 | File updating method, device and system, storage medium and electronic device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110390064A true CN110390064A (en) | 2019-10-29 |
Family
ID=68287560
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910678354.4A Pending CN110390064A (en) | 2019-07-25 | 2019-07-25 | File updating method, device and system, storage medium and electronic device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110390064A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112750181A (en) * | 2021-01-22 | 2021-05-04 | 珠海优特电力科技股份有限公司 | Graphic processing method and device, storage medium and electronic equipment |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104978215A (en) * | 2014-10-08 | 2015-10-14 | 腾讯科技(深圳)有限公司 | File updating method, relevant equipment and system |
CN109542851A (en) * | 2018-11-30 | 2019-03-29 | 北京金山云网络技术有限公司 | File updating method, apparatus and system |
-
2019
- 2019-07-25 CN CN201910678354.4A patent/CN110390064A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104978215A (en) * | 2014-10-08 | 2015-10-14 | 腾讯科技(深圳)有限公司 | File updating method, relevant equipment and system |
CN109542851A (en) * | 2018-11-30 | 2019-03-29 | 北京金山云网络技术有限公司 | File updating method, apparatus and system |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112750181A (en) * | 2021-01-22 | 2021-05-04 | 珠海优特电力科技股份有限公司 | Graphic processing method and device, storage medium and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108845816A (en) | Application program update method, system, computer equipment and storage medium | |
CN103902696A (en) | Method and device for loading resource files | |
CN107832100A (en) | A kind of loading method and its terminal of APK plug-in units | |
CN110968331B (en) | Method and device for running application program | |
CN110673923A (en) | XWIKI system configuration method, system and computer equipment | |
CN107193607A (en) | Method and apparatus, storage medium, processor and terminal for updating code file | |
CN107291759A (en) | The treating method and apparatus of browser page resource | |
CN113094076A (en) | Version iteration method, device, equipment and medium based on version control | |
CN113504918A (en) | Equipment tree configuration optimization method and device, computer equipment and storage medium | |
CN107798064A (en) | Page processing method, electronic equipment and computer-readable recording medium | |
CN111258680A (en) | Resource loading method and device, storage medium and electronic device | |
CN103716400A (en) | Method and system for achieving mobile working based on virtual machine | |
CN111224829B (en) | Method and device for accessing external node to block chain network, and block chain network | |
CN112035114A (en) | Page rollback method, device, equipment and medium | |
CN110113391B (en) | Client online method and device and client operation method and device | |
CN113918437A (en) | User behavior data analysis method and device, computer equipment and storage medium | |
CN110390064A (en) | File updating method, device and system, storage medium and electronic device | |
US20170359213A1 (en) | Method for performing communication between browser and mobile terminal, and browser apparatus | |
CN106027602A (en) | Cloud backup and restoration methods and terminal backup and restoration devices for applications | |
CN113114515A (en) | Resource file configuration method and device | |
CN108647139B (en) | System test method, device, storage medium and electronic device | |
CN114756261B (en) | Container cluster upgrading method and system, electronic equipment and medium | |
CN106951288B (en) | Development and application method and device of hot upgrade resource | |
CN114546842A (en) | Interface test method and device, storage medium and electronic equipment | |
CN113704120A (en) | Data transmission method, device, equipment and storage medium |
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 |