CN102945170A - Patch method using RAM(random-access memory)and temporary memory, patch server, and client - Google Patents

Patch method using RAM(random-access memory)and temporary memory, patch server, and client Download PDF

Info

Publication number
CN102945170A
CN102945170A CN2012103330377A CN201210333037A CN102945170A CN 102945170 A CN102945170 A CN 102945170A CN 2012103330377 A CN2012103330377 A CN 2012103330377A CN 201210333037 A CN201210333037 A CN 201210333037A CN 102945170 A CN102945170 A CN 102945170A
Authority
CN
China
Prior art keywords
patch
data
internal memory
size
control module
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
Application number
CN2012103330377A
Other languages
Chinese (zh)
Inventor
张星国
刘光喜
成周弦
陈譓瑱
李允珩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEOWIZ CORP
Original Assignee
NEOWIZ CORP
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by NEOWIZ CORP filed Critical NEOWIZ CORP
Publication of CN102945170A publication Critical patent/CN102945170A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/16Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/658Incremental updates; Differential updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a patch method using RAM and temporary memory, a patch server, and a client. A patch method is disclosed. The patch method can be executed in the patch client. The patch client can be connected to the patch serve, and comprises a memory device and the RAM. The patch method comprises the following steps: a) accessing the patch server and receiving the patch data from the patch server; b) calculating the available space of the RAM; c) when the patch data is smaller than or equal to the available space of the RAM, the available space of the RAM executes the patching operation; d) when the patch data is larger than or equal to the available space of the RAM, the temporary memory having the capacity corresponding to the capacity of the patch data can be distributed to the memory device, and the patching operation can be executed by using the distributed temporary memory.

Description

Use patch method and patch server and the client of internal memory and temporary storage
Technical field
Relate generally to patching technology of the present invention, and more specifically, relate to a kind of can quicker and the patch method of use internal memory more reliably patch mass data and temporary storage and patch server and the client of using this patch method.
Background technology
Along with the development of computing environment, the performance of hardware has become very high and has become at the software that hardware moves and can use a lot of resources.Therefore, the trend of existence is that the capacity of software increases gradually.In addition, along with the development of network environment, become very popular by Internet Transmission and distributing software.Especially, the content of software changes or expansion continually owing to a variety of causes (for example, the issue of the redaction of software).Thereby the content that changes or expand is provided for the user software is upgraded, and this is called as patch installing or renewal.
Traditional patching technology comprises that use is about the patch method of the information of the version of patch.For example, have a kind of method, i.e. patch client-access patch server compares the patch release of current patch release and patch server, and if need patch installing, then download and content that storage is corresponding.The problem of traditional patch method is: if the service efficiency of the resource of patch server and patch client is low and owing to exist wrong in about the information of the version of patch or partly carried out patch installing then the patch redundancy can occur, therefore at server bottleneck occurs.
In order to address this problem, developed following technology: provide about the information of the reformed content of file that will patch installing and based on this information and executing patch installing.Yet in this technology, algorithm itself once or continuously is stored in the patch data in the single internal memory and then carries out patch installing.Therefore, although compare with traditional patching technology, this technology has slightly reduced the patch data, and the algorithm that is used for storage allocation and execution patch installing is not improved.Owing to this reason, there is following problems: if when download being used for the file of patch installing, occured wrong then need again to download all data for patch installing; Patch is processed slower when larger file being carried out patch installing; And the service efficiency of hardware resource is low.In addition, the problem that also exists is: because the operation of the poor efficiency of patch client causes patch server has been applied heavier burden.
Summary of the invention
Therefore, in view of the problems referred to above that occur in the prior art have been made the present invention, and the object of the invention is to by using improved patch algorithms maximization patch client resource be used to apply more fast and efficiently patch.
Another object of the present invention is to fast and carry out reliably the patch installing of the patch file with high power capacity.
Another purpose of the present invention is to use the patch algorithms of optimizing to apply more quickly patch according to the size of the data that are used for patch installing.
Another purpose of the present invention be if in the patch processing procedure, made a mistake by the whole file of only revising error section rather than being used for patch installing come with resource effectively and the mode of tolerable mistake apply patch.
To achieve these goals, the invention provides a kind of patch method, this patch method is carried out in the patch client, this patch client can be connected to patch server and comprise memory storage and internal memory, and patch method comprises the steps: (a) access patch server and receives the patch data from patch server; (b) free space of calculating internal memory; (c) if the size of patch data is less than or equal to the free space of internal memory, then use the free space of internal memory to carry out patch installing; And if (d) size of patch data is then distributed temporary storage corresponding to the capacity of the size of patch data for memory storage, and is used the temporary storage that distributes to carry out patch installing greater than the free space of internal memory.
To achieve these goals, the invention provides a kind of patch method, this patch method is carried out in the patch client, this patch client can be connected to patch server and comprise memory storage and internal memory, and this patch method comprises the steps: (a) access patch server and receives the patch data comprise for a plurality of files of patch installing from patch server; (b) free space of calculating internal memory; (c) if at least one file of a plurality of files that is used for patch installing less than the free space of internal memory, then uses the free space of internal memory to carry out the patch installing of this at least one file; And if at least one file of a plurality of files that (d) is used for patch installing then uses the temporary storage that distributes for memory storage to carry out the patch installing of this at least one file greater than the free space of internal memory.
To achieve these goals, the invention provides a kind of patch server, this patch server is connected to the patch client and the patch data is provided, and patch server comprises internal memory; Hash generation unit, this Hash generation unit are constructed to generate at least one cryptographic hash be used to the data that receive; And control module, this control module is constructed to source document and patch file are loaded in the internal memory, control Hash generation unit, thereby the Hash generation unit compares and generates at least one cryptographic hash for difference with the patch file of the source document that loads and loading, generation comprises the patch table of the cryptographic hash of generation, and generates the patch data of the patch table that comprises generation.
To achieve these goals, the invention provides a kind of patch client, this patch client can be used internal memory and memory storage, and access patch server, receive the patch data and carry out patch installing, the patch client comprises control module, this control module is for the size of the patch data that relatively receive and the free space of internal memory, if being equal to or greater than the size of the patch data that receive, use the free space of storer internal memory to carry out patch installing, if and the free space of internal memory is then carried out patch installing for the memory storage distribution corresponding to the temporary storage of the temporary storage of the capacity of the size of patch data and then use distribution less than the size of the patch data that receive.
Description of drawings
By reference to the accompanying drawings, according to following detailed description, will more clearly understand above and other purpose of the present invention, feature and advantage, in the accompanying drawings:
Fig. 1 is the figure of structure that the embodiment of the patch system that can use disclosed technology is shown;
Fig. 2 is the figure of structure of embodiment that the patch server of Fig. 1 is shown;
Fig. 3 is the reference diagram that is illustrated in the processing of the generation patch data of carrying out in the control module of Fig. 2;
Fig. 4 illustrates the figure according to the structure of the embodiment of the patch client of disclosed technology;
Fig. 5 is the reference diagram that the embodiment of the patch that uses the internal memory execution is shown;
Fig. 6 is the reference diagram that the embodiment of the patch installing of using the temporary storage execution is shown;
Fig. 7 is the process flow diagram that illustrates by the embodiment of the patch method of the patch client executing of Fig. 4;
Fig. 8 is the process flow diagram that illustrates by another embodiment of the patch method of the patch client executing of Fig. 4;
Fig. 9 is the process flow diagram that illustrates by the another embodiment of the patch method of the patch client executing of Fig. 4; And
Figure 10 is the process flow diagram that illustrates by the another embodiment of the patch method of the patch client executing of Fig. 4.
Embodiment
Only show the description of disclosed technology for the purpose of structure or functional descriptions.The scope of disclosed technology should not be construed as and is limited to following embodiment.That is, the scope of revision for execution mode and disclosed technology is construed as the equivalent that covering can also realize the technical spirit of embodiment in every way.
Simultaneously, should understand as follows the implication of the term of describing in this application.
Word " first ", " second " etc. are all for the differentiation element, and these elements should not be subject to the restriction of these words.For example, in the situation that does not depart from scope of the present invention and technical spirit, the first element can be called as the second element, and perhaps similarly, the second element can be called as the first element.
When element is described to " being coupled to " or " being connected to " another element, will be appreciated that, the element of front can direct-coupling or be connected to after an element, but they can or link together via one or more intermediary element couplings.On the contrary, when element is described to " being directly coupled to " or " being directly connected to " another element, will be appreciated that they are coupled or link together in the situation of not inserting other element.Simultaneously, should understand in an identical manner other statement of describing the relation between the element (for example, exists ... between and " be located immediately at ... between " or " with ... adjacent " and " with ... direct neighbor ").
Unless have in addition describedly, singular references can comprise plural number statement.Be understood that, in this application, term " comprises " or " having " expression comprises the feature mentioned among the application, numeral, step, operation, assembly, parts or its combination, but does not represent to get rid of one or more in any further feature, numeral, step, operation, assembly, parts or its combination.
In step, symbol (for example, " a ", " b " and " c ") is used for convenient the description, and these symbols are not described the order of step.Can carry out these steps with the order that is different from described order, unless in context, clearly described particular order.That is, these steps can be carried out with described order, can basically side by side carry out, and can carry out in reverse order.
Unless have in addition describedly, all terms used herein have implication known in those skilled in the art in the technical field that belongs to the present invention.The term that defines in the normally used dictionary should be understood to have the consistent implication of implication of understanding in the background with prior art, and should not be understood to have ideal or excessive literal implication, unless clear and definite definition is arranged in this application.
In the following description, source document refers to the file before applying patch, and patch file is the file of it having been carried out patch installing.The patch data are to carry out the required data of patch installing, and can comprise patch file or about the information of the difference between patch file and the source document according to embodiment.
Fig. 1 is the figure of structure that the embodiment of the patch system that can use disclosed technology is shown.
With reference to figure 1, the patch system can comprise patch server 100 and patch client 200.
Patch server 100 can generate the patch data, and when patch client 200 access patch server 100, this patch server 100 can offer the patch data patch client 200.Here, patch server 100 refers to carry out the server capability of patch installing with patch client 200 joint operation the time, and is not limited to specific enforcement.For example, patch server 100 may be embodied as individual server or server zone, perhaps may be embodied as a function of generic server.To detailed structure or the function of patch server 100 be described with reference to figure 2 below.
Patch client 200 can be by access to netwoks patch server 100, and processes on the terminal of moving patch client 200 thereon and carry out patch installing by carrying out the given patch that will be described below.Here, patch client 200 refers to carry out the termination function of patch installing with patch server 100 joint operation the time, and is not limited to particular implementation.For example, patch client 200 may be embodied as the software of carrying out in terminal, perhaps is embodied as the hardware of logical design.To detailed structure or the function of patch client be described with reference to figure 4 to 6 below.
Patch server 100 and patch client 200 can be passed through network connection.Here, network is not limited to the network based on specific criteria.Patch client 200 can be by wired or wireless network or the wired and patch server 100 that is connected wireless network.For example, if patch client 200 operates on the personal computer (PC), then can use wired or the Wi-Fi communication network as network.Perhaps, if patch client 200 is smart mobile phone or dull and stereotyped PC, then can come tectonic network via mobile communications network 3G or 4G.
Fig. 2 is the figure of structure of embodiment that the patch server 100 of Fig. 1 is shown.
With reference to figure 2, patch server 100 can comprise communication unit 110, internal memory 120, Hash generation unit 130, patch data storage cell 140 and control module 150.In embodiment, patch server 100 may further include client-side management unit 160.
Communication unit 110 can be in response to from the request foundation of control module 150 or the communication line of maintenance and patch client 200.
Internal memory 120 can comprise the required storage space of generation patch data.Internal memory 120 can be partitioned particular space with the different data of storage under the control of control module 150.
Hash generation unit 130 can generate the cryptographic hash be used to the data that receive.Hash generation unit 130 can generate the cryptographic hash that is used for raw data or patch data under the control of control module 150, and the cryptographic hash that generates can be provided to control module 150.
Patch data storage cell 140 can be stored the patch data.As mentioned above, the patch data are to carry out the required data of patch installing, and can comprise information about the difference between patch file and the source document according to embodiment.Patch data storage cell 140 can be stored the patch data that provided by control module 150 or about the information of patch data the information of the size (comprising in the patch data in the situation of a plurality of files) of total size of the version of patch, patch data and each file (for example, about).
Control module 150 can generally be controlled the element of patch server 100, thereby so that patch server 100 is carried out patch installing.Describe each function for control module 150 below in detail control module 150.
Control module 150 can compare source document and patch file, and generates the patch data.
In embodiment, control module 150 can be loaded into internal memory 120 with patch file and source document, and request Hash generation unit 130 compares the cryptographic hash that source document and patch file and generation are used for the difference between it.Control module 150 can generate the patch table of the cryptographic hash that comprises generation and the index that is associated with the cryptographic hash that generates, and generates the patch data that comprise patch table and patch file, and the patch data that generate are stored in the patch data storage cell 140.
In another embodiment, control module 150 can use the cryptographic hash for patch file to generate the patch data.That is, control module 150 can generate and comprise for the cryptographic hash of whole patch file and be used for the patch table of the index of cryptographic hash, and generates the patch data that comprise patch table and patch file.
Control module 150 can be provided to the patch data patch client 200.
In embodiment, communication unit 110 keeps and the communication line of patch client 200 thereby control module 150 can be controlled, based on need determining whether patch installing about the information that is stored in the patch data in the patch data storage cell 140, and then the patch data are provided to patch client 200.
In another embodiment, when communication unit 110 is set up communication line with patch client 200 under the control of control module 150, control module 150 can be asked the information about the patch client 200 that is connected to client-side management unit 160, based in response to request receiving to information determine the patch data, and then the patch data are provided to patch client 200.
Patch client 200 can be managed in client-side management unit 160.In embodiment, checking can be carried out to patch client 200 in client-side management unit 160.In embodiment, client-side management unit 160 can be managed about the information of the patch installing that patch client 200 is carried out (for example, patch time and about the information of the version of patch).
Fig. 3 is the reference diagram of example of the processing of the generation patch table carried out of schematically illustrated control module 150 by Fig. 2.
With reference to figure 3, source document and patch file are loaded into respectively internal memory 120.Because source document and patch file have been loaded into internal memory 120, so control module 150 can use internal memory 120 to carry out more quickly relatively.Address in the 4 bits indication internal memory 120 of source document and patch file.The index of the 2 bits indication corresponding data of the content of source document and patch file.In the example that illustrates, each in source document and the patch file comprises four data.These four data can be four different files, or the part of at least one file.
Control module 150 can compare source document and patch file.That is, control module 150 can relatively be loaded into the content of each data of content and the patch file that is loaded into internal memory 120 of each data of the source document of internal memory 120.As shown in the drawing, control module 150 can determine that the content of index 01 and the content of index 11 differ from one another, and structure patch table 300.Patch table 300 can comprise index 310, cryptographic hash 320 and patch file address 330.Cryptographic hash 320 can represent the cryptographic hash corresponding to the patch file of index 01 and 11, and patch file address 330 can represent the address of the content of actual storage patch file.For example, patch file address 330 can represent to store address or the position of the patch data storage cell 140 of patch file.
Embodiment shown in Fig. 3 shows following example: source document is compared with patch file and based on generating the patch data corresponding to the content of the patch file of difference and the cryptographic hash that is used for this content.In this example, patch client 200 can be overwritten in patch file on the source document, calculates cryptographic hash, the cryptographic hash of the cryptographic hash that relatively calculates and patch data, and then carry out patch installing.
Fig. 4 is the figure that illustrates according to the structure of the embodiment of the patch client 200 of disclosed technology, and Fig. 5 and Fig. 6 are the reference diagrams that the embodiment of the patch scheme of being carried out by patch client 200 is shown.
With reference to figure 4, patch client 200 can comprise communication unit 210, internal memory 220, temporary storage 230 and control module 240.In embodiment, patch client 200 may further include at least one in patch data storage cell 250 and the Hash generation unit 260.
Communication unit 210 can be when control module 240 request the communication line of foundation or maintenance and patch server 100.
Internal memory 220 is be used to the memory device that storage space is provided.
Use memory storage (for example, HDD, RAID or SSD) to distribute temporary storage 230.Temporary storage 230 is carried out the function (that is, provide storage space) identical with internal memory 220, but owing to the I/O processing occurs so that its performance is lower than internal memory 220 in the loading procedure of data.
Thereby the element of control module 240 control patch clients 200 is carried out patch installing to terminal.
Control module 240 can use internal memory 220 to carry out patch installing.
In embodiment, control module 240 can by with the free space subregion of internal memory 220 at least two zones and source document and patch data are loaded into separately subregion carry out patch installing.For example, control module 240 can be carried out patch installing by distributing Three regions for internal memory 220 and source document, patch file and patch data are loaded into separately zone (or generating) in the zone.Fig. 5 is the reference diagram that this embodiment is shown.With reference to figure 5, control module 240 can distribute Three regions for internal memory 220, and use this Three regions as the zone 510 that is used for source document, be used for the zone 520 of patch file and be used for the zone 530 of patch data.Control module 240 can just be loaded into source document zone 510 by the source document of patch installing, will be loaded into patch data area 530 from the patch data that patch server 100 receives, and then generate patch file in patch file zone 520.For example, control module 240 can be analyzed the patch table of patch data area 530, determine to be used for patch installing corresponding to the content of index 01 and 11, determine that corresponding patch content is stored in address 11001 and 11010 places, and in patch file zone 520, generate patch file based on the data that are loaded into source document zone 510 and the data that are loaded into patch data area 530.That is, control module 240 can read data corresponding to the index that does not comprise the patch table from source document, and generates patch file based on the data that read.Control module 240 can be for the data search patch data corresponding to the index that comprises in the patch table, and are written to by the patch data that will find and generate patch file in the patch file.
Here, control module 240 can generate source document, patch file and patch data, and uses diverse ways that it is loaded into internal memory 220.For example, can use the memory pool method that source document is loaded into internal memory 220, can use impact damper overlapping pool method that patch file is loaded into internal memory 220, and can use the memory file mapping method that the patch data are loaded into internal memory 220.Its reason is that if use identical method that data are loaded into internal memory 220, then other loading processing may be subject to the impact of the mistake of generation in particular load is processed.
In addition, can be in according to Fig. 5 disclosed embodiment of control module 240 is carried out and change in a different manner skew when internal memory 220 is read the processing of source document, patch file and patch data or source document, patch file and patch data are written to the processing of internal memory 220.For example, when reading source document, control module 240 can use any skew displacement method.When writing patch file, control module 240 can use sequence offsets increase method.In addition, when reading the patch data, control module 240 can use sequence offsets increase method.Be offset if change in a different manner as described above, then other operating efficiency of processing the impact of the mistake that can not be subject in particular procedure, occuring and can increasing processor.
In another embodiment, control module 240 can use temporary storage 230 to carry out patch installing.Fig. 6 is the reference diagram that the embodiment that uses temporary storage 230 patch installing is shown.Embodiment shown in Fig. 6 is corresponding to the example of the patch installing of the order that changes original file data.With reference to figure 6, control module 240 can be measured the size with reformed part of source document in advance by comparing source document and patch data, and distributes the space corresponding to the size of measuring in temporary storage 230.With reference to the example shown in the figure 6, result as the patch table of analyzing the patch data, control module 240 determines to need to change three pieces of source document, the space corresponding to the size of this three block sizes of request in the temporary storage 230, and distribute the space of the size of request for temporary storage 230.Control module 240 can use the data of the temporary storage 230 change source documents of distribution, and generates patch file based on the data after changing.Here, control module 240 can use the data after output buffer memory pool method will change to be loaded into temporary storage 230.Output buffer memory pool method is from being easily and fast aspect the recovery of patch mistake, and this is because when patch installing is failed, automatically is recorded on the file about the information of the patch installing of failure.The patch method of the use temporary storage 230 shown in Fig. 6 is efficient when having the data that are used in a large number patch installing.That is, in the patch method of describing with reference to figure 5, loading can be carried out more quickly, and therefore, whole patch is processed owing to having used internal memory 220 to become quick.Yet, when causing amount for the data of patch installing to surpass the capacity of internal memory 220 owing to the actual capacity of internal memory 220 is limited, can not use the patch method of Fig. 5.On the contrary, in the patch method shown in Fig. 6, owing to distributed temporary storage 230 and then carried out patch installing for memory storage, therefore can easily carry out the patch installing of the data file (patch file that for example, has the large size that is equal to or greater than 1G) with larger size.
In another embodiment, control module 240 can be identified for the size of the data of patch installing, and carries out patch installing with in internal memory 220 and the temporary storage 230 at least one.That is, control module 240 can be carried out patch installing with the combination of the embodiment shown in Fig. 5 and Fig. 6.More specifically, when receiving the patch data, control module 240 can check the size for the data of patch installing, and checks the current available size of internal memory 220.If the size of data is equal to or less than the current available size of internal memory 220, then control module 240 can use internal memory 220 to carry out patch installing.On the contrary, if the size of data greater than the current available size of internal memory 220, then control module 240 can use temporary storage 230 to carry out patch installing.To with reference to figure 9 this embodiment be described in more detail below.
Patch data storage cell 250 can temporarily be stored the patch data that receive from patch server 100.For example, if downloaded the patch data from patch server 100, then control module 240 can be stored in these patch data in the patch data storage cell 250, and uses internal memory 220 and temporary storage 230 to carry out patch installing based on the patch data of storage.
In embodiment, patch data storage cell 250 can be stored the information about the patch installing of carrying out.For example, after carrying out patch installing, control module 240 can generate information about the patch installing information of version, patch date and the patch capacity of patch (for example, about) and the information that generates is offered patch data storage cell 250.Patch data storage cell 250 can be stored the information of generation.
Hash generation unit 260 can generate the cryptographic hash be used to the data that receive.For example, thereby control module 240 can be controlled Hash generation unit 260 after finishing patch installing, and Hash generation unit 260 generates the cryptographic hash of the data that are used for patch installing so that check whether correctly carried out patch installing.The cryptographic hash that comprises in the cryptographic hash that control module 240 can be relatively generated by Hash generation unit 260 and the patch table, and determine whether correctly to have carried out patch installing.
Fig. 7 is the process flow diagram that the embodiment of the patch method of being carried out by the patch client 200 of Fig. 4 is shown.The embodiment of disclosed patch method represents to use the embodiment of the patch installing that internal memory 220 carries out among Fig. 7.
Control module 240 can divide the internal memory 220 that is used in patch installing at step S710 from patch server 100 receive datas and at step S720.Here, control module 240 can be the Three regions that is used for source document, patch data and patch file and storage allocation 220 then with internal memory 220 subregions.
Control module 240 can be loaded into source document and patch data at step S730 the zone of internal memory 220.Here, control module 240 can use distinct methods that source document and patch data are loaded into internal memory 220.For example, if used the memory pool method that source document is loaded into internal memory 220, then can use File Mapping internal memory method that the patch data are loaded into internal memory 220.If use as mentioned above diverse ways to load data, even then do not need to carry out whole loading processing and when in the particular load method, making a mistake, also can prevent wrong propagation.
Control module 240 checks whether successfully carried out loading at step S740.If wrong (be no at step S740 place) occured in particular data, then control module 240 can be carried out the processing that only loads corresponding data.Although in the process flow diagram of Fig. 7, internal memory 220 is shown in that step S720 place heavily distributes and misdata is shown in step S730 place and is reloaded, in one embodiment, can only reloads data and do not have storage allocation 220.
If successfully carried out loading, then control module 240 can generate patch file based on the source document that is loaded into internal memory 220 and patch data at step S750 place.For example, control module 240 can be analyzed the patch table of patch data, source document is divided into one or more parts (its content will move and will carry out patch installing to these one or more parts based on the patch data) in the situation that does not have change, and in the zone of distributing to patch file based on division, generates patch file.Here, control module 240 can generate patch file one by one continuously or in a lump.Namely, control module 240 can sequentially read corresponding content from source document or patch data at the internal storage location from the starting point of distributing to patch file to the scope of the internal storage location of the terminal point of distributing to patch file, and reading of content, thereby generate patch file.In embodiment, control module 240 can will not have one or more parts mobile in the situation about changing to check source document for its content, read these parts from source document, write-once reads these parts at least a portion of patch file, and at least a portion of one or more part write-once patch files that the content of patch file will be moved to.
Control module 240 can be at the patch file of step S760 for the bug check acquisition.Here, control module 240 can use the patch file that the patch table that comprises in the patch data generates for bug check.For example, suppose to comprise in the patch table cryptographic hash for the patch data, then control module 240 can by calculate to be used for patch file by the cryptographic hash of the part of patch and will be compared the run-time error inspection by the cryptographic hash of the cryptographic hash of the part of patch and patch table.
If there is no any mistake (be no at step S770 place), then control module 240 stops patches and processes.If there be wrong (be yes at step S770 place), then control module 240 can be in step S780 error process process.For example, lose if distribute to as mentioned above the data of internal memory 220, then control module 240 can repeat again storage allocation 220 and again load the step S720 to S760 of data so that again carry out the patch installing of the part with different cryptographic hash.As another example, if distribute to the source document of internal memory 220 and patch data redundancy in internal memory, then control module 240 can be carried out based on source document and patch data and only override and wrong related part and step S750 and the S760 of error process.
Although in the superincumbent description, described the example that internal memory 220 is partitioned Three regions and carries out patch installing with reference to figure 7, another example that internal memory 220 can be partitioned two zones and can carry out patch installing also is possible.Namely, control module 240 can be the zone that is used for source document and the zone that is used for the patch data with internal memory 220 subregions, read content corresponding to the one or more parts that need the source document to change from the patch data, and change source document by overriding the content that reads, thereby generate patch file.
Fig. 8 is the process flow diagram that illustrates by another embodiment of the patch method of the patch client executing of Fig. 4.The embodiment of disclosed patch method relates to the embodiment of the patch installing of using temporary storage 230 execution among Fig. 8.
Control module 240 can be at step S810 from patch server 100 reading out datas, and measure the size of the data that are used for patch installing (that is, need in the source document change data) at step S820.In embodiment, control module 240 can be based on the size of the patch table measurement data of patch data.
Control module 240 can distribute temporary storage 230 corresponding to the capacity of the size of the data that will change at step S830, and is loaded in the temporary storage of distribution in the data that step S840 just changes.In embodiment, control module 230 can distribute temporary storage 230, and uses the just reformed data of output buffer memory pool method to be loaded into the temporary storage of distribution.In output buffer memory pool method, when the patch installing failure, automatically record hereof the information about the patch of failure.Therefore, the execution of mistake treatment step S870 to S890 can be very simple.
Control module 240 checks at step S850 whether loading is successful.If make a mistake (be no at step S850), then control module 240 can be carried out the step that again loads data.Although in the process flow diagram of Fig. 8, temporary storage 230 is shown in that step S830 is heavily distributed and the data that change is shown in step S840 and reloads, but in embodiment, can only reload the data that will change and do not distribute temporary storage 230.
Control module 240 can generate patch file based on the data that are loaded into temporary storage 230 at step S860, and at step S870 the patch file run-time error that generates is checked.If wrong (be yes at step S880) occured, then control module 240 can be in step S890 error process process.
Fig. 9 is the process flow diagram that the another embodiment of the patch method of being carried out by the patch client 200 of Fig. 4 is shown.Embodiment shown in Fig. 9 is based on the embodiment of the patch method that the combination of the embodiment of Fig. 7 and Fig. 8 carries out.
With reference to figure 9, control module 240 can receive the patch data and check the patch data from patch server 100 at step S910.For example, control module 240 can receive the patch data and then check the whole big or small of patch data.
After checking the patch data, control module 240 can calculate at step S920 the current free space of internal memory 220.Afterwards, control module 240 compares the free space of internal memory 220 and the size of patch data at step S930.If the free space of internal memory 220 is enough, then use internal memory 220 to carry out patch installing.On the contrary, if the free space of internal memory 220 is inadequate, then use temporary storage 230 to carry out patch installing.
In embodiment, control module 240 can be considered the memory headroom that will return when calculating the free space of internal memory 220.This can be represented by following equation 1:
Internal memory _ total=internal memory _ permission+(internal memory _ return * t) (1)
With reference to equation 1, operable available memory space when patch installing " internal memory _ total " can be current available memory space " internal memory _ permissions " and the memory headroom " internal memory _ return * t " that in special time, will return with.Here, the memory headroom that will return in the special time can be by estimating that the memory headroom that will return in the special time multiply by specific probability value t and represents.For example, supposing to estimate to apply after receiving the patch data time that whole patch will spend is about 1 minute, if then determined to estimate the memory headroom returned, control module 240 can estimate that the memory headroom that will return within 1 minute is set to estimate the memory headroom " internal memory _ return " that will return so.Here, probability value t can be proportional with the return time of estimating.For example, the probability value t that estimates the memory headroom " internal memory _ return A " that will return within 10 seconds can be higher than the probability value of estimating the memory headroom " internal memory _ return B " that will return in 40 seconds.
If available memory space is equal to or greater than the size (be yes at step S930) of patch data, then control module 240 can be carried out patch installing with internal memory 220 at step S940 to S970.Here, owing to described the step of using internal memory 220 to carry out patch installing with reference to figure 7, therefore omitted its detailed description.If available memory space is less than the size of patch data (be no at step S930), then control module 240 can be carried out patch installing with temporary storage 230 at step S941 to S971.Here, owing to described the step of using temporary storage 230 to carry out patch installing in the above with reference to figure 8, therefore omitted its detailed description.
Although from the process flow diagram of Fig. 9, omitted error processing procedure, can with the same ground error process process in the above-mentioned embodiment.
Based on the embodiment shown in the patch method execution graph 9 of the patch method of the Fig. 7 that uses internal memory 220 and the Fig. 8 that uses temporary storage 230.The patch method that uses internal memory 220 is at first carried out in embodiment indication shown in Fig. 9.That is, if all patch files all are assigned to internal memory 220, then use internal memory 220 to carry out rapidly patch installing.If the capacity of internal memory 220 is then carried out patch installing with temporary storage 230 less than total size of patch data.Therefore, can carry out more quickly the patch installing operation of a large amount of patch data.
Figure 10 is the process flow diagram that the another embodiment of the patch method of carrying out in the patch client 200 of Fig. 4 is shown.The embodiment of Figure 10 is corresponding to another embodiment of the patch method of carrying out based on the combination of the embodiment of Fig. 7 and Fig. 8, and relates to when the patch data comprise a plurality of file the embodiment of patch installing of carrying out each file of a plurality of files that are used for patch installing according to the method for optimizing.That is, in the embodiment of Fig. 9, determine to use internal memory 220 or temporary storage 230 based on whole patch data.In the embodiment of Figure 10, comprise the patch installing of the patch file of a plurality of files for any execution in each file use internal memory 220 and the temporary storage 230.
With reference to Figure 10, control module 240 can receive the patch data from patch server 100 at step S1010, and checks the patch data.In embodiment, after reception comprised patch data for a plurality of files of patch installing, control module 240 can check the size of each file in a plurality of files.In another embodiment, the patch data can comprise the information about the size of a plurality of files, and control module 240 can be based on this information pointer to each file in a plurality of files of large minor inspection of each file in a plurality of files.
Control module 240 can calculate at step S1020 the current free space of internal memory 220.In this case, control module 240 can compare the size of each file that comprises in the free space of internal memory 220 and the patch data.On the contrary, control module 240 can use internal memory 220 to carry out the patch installing of the file of the size with the active volume that is equal to or less than internal memory 220.Control module 240 can use temporary storage 230 to carry out to have the patch installing greater than the file of the size of the active volume of internal memory 220.Here, owing to can carry out as illustrated in fig. 9 the calculating of the free space of internal memory 220, therefore omitted its detailed description.
Control module 240 checks the file that whether has the size with the free space that is equal to or less than internal memory 220 at step S1030.If there is such file (be yes at step S1030), then control module 24 can use internal memory 220 to carry out the patch installing of these files in the patch data at step S1040 to S1070.Here, can use internal memory 220 to carry out the step of the patch installing of some files in the patch data for each file.If the free space of internal memory 220 is greater than the size of two files, then control module 240 can be carried out the patch installing of two or more files simultaneously.Owing to described the method detailed of using internal memory 220 to carry out patch installing with reference to figure 7 in the above, therefore will omit its detailed description.
Control module 240 can use temporary storage 230 to carry out all to have patch installing greater than the residue file in the patch data of the size of the free space of internal memory 220 at step S1041 to S1071.For example, control module 240 can calculate the summation of size of the residue file of patch data, and distributes the temporary storage 230 corresponding to this summation.Owing to described the method detailed of using the temporary storage 230 that distributes to carry out patch installing with reference to figure 8 in the above, therefore omitted its detailed description.
In the embodiment of Figure 10, at least one execution in use internal memory 220 and the temporary storage 230 comprises the patch installing of the patch data of a plurality of files.Therefore, can carry out more quickly patch installing.Here, control module 240 can use internal memory 220 and temporary storage 230 to carry out patch installing according to its calculated performance concurrently.That is, control module 240 can use internal memory 220 to carry out all to have the patch installing less than some files of the size of the free space of internal memory 220, and uses simultaneously temporary storage 230 to carry out the patch installing of remaining file.If carry out concurrently patch installing, then can reduce significantly to carry out the time that patch installing spends.
In disclosed technology, the utilization of the resource by maximization patch client can be carried out patch installing quicker and more efficiently.
In disclosed technology, can be fast and carry out reliably the patch installing of the patch file with high power capacity.
In disclosed technology, can use the patch algorithms of optimizing to carry out more quickly patch installing according to the size of the data that are used for patch installing.
In disclosed technology, if in patch is processed, have mistake, then pass through only to revise wrong part, rather than revise the whole file that is used for patch installing, can mode effective with resource and the tolerable mistake carry out patch installing.
Although disclose preferred implementation of the present invention for illustrating property purpose, but those skilled in the art will be appreciated that, in not departing from such as claims, in the situation of disclosed the spirit and scope of the present invention, can carry out various modifications, interpolation and replacement.

Claims (15)

1. patch method, described patch method is carried out in the patch client, and described patch client can be connected to patch server and comprise memory storage and internal memory, and described patch method comprises the steps:
(a) the described patch server of access and receive the patch data from described patch server;
(b) free space of the described internal memory of calculating;
(c) if the size of described patch data is less than or equal to the described free space of described internal memory, then use the described free space of described internal memory to carry out patch installing; And
(d) if the described size of described patch data greater than the described free space of described internal memory, then distribute temporary storage corresponding to the capacity of the described size of described patch data for described memory storage, and use the described temporary storage that distributes to carry out patch installing.
2. patch method according to claim 1, wherein, described patch data comprise the cryptographic hash at least one patch file.
3. patch method according to claim 1, wherein, step (b) comprising:
(b1) the current free space of the described internal memory of inspection;
(b2) calculate in special time the memory headroom of returning; And
(b3) by calculating described current free space and described with described free space memory headroom and that calculate described internal memory of returning.
4. patch method according to claim 3, wherein, step (b2) comprises the steps: by with described memory headroom and the probability value of returning being multiplied each other to calculate in the described special time with the memory headroom of returning, wherein, it is proportional that the time is returned in described probability value and described expectation with the memory headroom returned.
5. patch method according to claim 1, wherein, step (c) comprises the steps:
(c-1) the described free space subregion with described internal memory is the first area for source document, be used for the second area of described patch data and be used for the 3rd zone of patch file, then described source document, described patch data and described patch file are distributed to respectively in described first area, described second area and described the 3rd zone;
(c-2) respectively described source document and described patch data are loaded into described first area and described second area; And
(c-3) use the described source document and the described patch data that load in described the 3rd zone, to generate described patch file.
6. patch method according to claim 5, wherein, step (c-2) comprises the steps: to use different internal memory loading methods to load described source document and described patch data.
7. patch method according to claim 5, wherein, step (c) further comprises the steps:
Check whether successfully carried out described step (c-2); And
If mistake has only occured, then only again load described particular data in particular data.
8. patch method according to claim 5, wherein, described step (c-3) comprising:
Analyze the patch table that comprises in the described patch data; And
At least a portion of described source document and at least a portion with patch installing of described source document are distinguished.
9. patch method according to claim 1, wherein, step (d) comprises the steps: to use the described temporary storage that distributes to carry out patch installing based on output buffer memory pool method.
10. patch method according to claim 1, wherein, step (d) comprises the steps:
(d1) calculate in the described source document size with reformed data; And
(d2) partition capacity is corresponding to the described temporary storage of the size of the calculating of described data.
11. a patch server, described patch server are connected to the patch client and the patch data are provided, described patch server comprises:
Internal memory;
Hash generation unit, described Hash generation unit are constructed to generate at least one cryptographic hash be used to the data that receive; And
Control module, described control module is constructed to source document and patch file are loaded into described internal memory, control described Hash generation unit, so that the described patch file of the described source document that described Hash generation unit will load and loading compares and generates at least one cryptographic hash for difference, generation comprises the patch table of the cryptographic hash of generation, and generates the described patch data of the described patch table that comprises generation.
12. patch server according to claim 11, described patch server further comprises:
About the information of described patch data, described information comprises at least a in the following information: about the information of the patch release of described patch data, about the information of total size of described patch data and about the information of the size of each file in a plurality of files that comprise in the described patch data; And
The patch data storage cell, described patch data storage cell is constructed to store described patch data.
13. a patch client, described patch client can be used internal memory and memory storage, and the access patch server, receives the patch data and carries out patch installing, and described patch client comprises:
Control module, described control module compares for the size of the described patch data that will receive and the free space of described internal memory, if the described free space of described storer is equal to or greater than the size of the described patch data that receive, then use described internal memory to carry out patch installing, if and the described free space of described internal memory is less than the size of the described patch data that receive, then for the temporary storage of described memory storage distribution corresponding to the capacity of the size of described patch data, then use the described temporary storage that distributes to carry out patch installing.
14. patch client according to claim 13, wherein, if the described free space of described internal memory is equal to or greater than the size of the described patch data that receive, then described control module is at least two zones with the described free space subregion of described internal memory, source document and described patch data are loaded into zone behind separately the subregion, and carry out patch installing.
15. patch client according to claim 13, wherein, if the described free space of described internal memory is less than the size of the described patch data that receive, then described control module compares the size of source document and the size of described patch data, measure in advance in the described source document size with reformed at least a portion, and distribute temporary storage corresponding to the capacity of the size of measuring for described memory storage.
CN2012103330377A 2011-12-30 2012-09-10 Patch method using RAM(random-access memory)and temporary memory, patch server, and client Pending CN102945170A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020110147740A KR101246360B1 (en) 2011-12-30 2011-12-30 Method for data patch using memory and temporary memory and patch server and client thereof
KR10-2011-0147740 2011-12-30

Publications (1)

Publication Number Publication Date
CN102945170A true CN102945170A (en) 2013-02-27

Family

ID=47728119

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012103330377A Pending CN102945170A (en) 2011-12-30 2012-09-10 Patch method using RAM(random-access memory)and temporary memory, patch server, and client

Country Status (4)

Country Link
KR (1) KR101246360B1 (en)
CN (1) CN102945170A (en)
TW (1) TW201327168A (en)
WO (1) WO2013100302A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017084051A1 (en) * 2015-11-18 2017-05-26 深圳市大疆创新科技有限公司 External device management method, apparatus and system, memory, and unmanned aerial vehicle
CN107944021A (en) * 2017-12-11 2018-04-20 北京奇虎科技有限公司 File replacement method, device and terminal device
CN110109695A (en) * 2019-04-17 2019-08-09 华为技术有限公司 Patch method, relevant apparatus and system
CN111179913A (en) * 2019-12-31 2020-05-19 深圳市瑞讯云技术有限公司 Voice processing method and device
CN112788384A (en) * 2021-02-07 2021-05-11 深圳市大鑫浪电子科技有限公司 Wireless digital television screen projection method and device, computer equipment and storage medium

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002166304A (en) * 2000-11-30 2002-06-11 Ngk Spark Plug Co Ltd Throwaway cutting tool
US9780938B2 (en) * 2015-06-25 2017-10-03 Intel IP Corporation Patch download with improved acknowledge mechanism

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003150396A (en) * 2001-11-12 2003-05-23 Casio Comput Co Ltd Information processor and patch processing method
CN101739273A (en) * 2008-11-24 2010-06-16 联发科技股份有限公司 Memory sharing method
CN102215479A (en) * 2011-06-22 2011-10-12 中兴通讯股份有限公司 Method, server and system for downloading and installing upgrade package

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030182414A1 (en) * 2003-05-13 2003-09-25 O'neill Patrick J. System and method for updating and distributing information
EP1632848A1 (en) * 2004-09-06 2006-03-08 Irdeto Access B.V. Method of providing patches for software
KR100670797B1 (en) * 2004-12-17 2007-01-17 한국전자통신연구원 Apparatus for real-time patching without auxiliary storage device and method therefor
JP2008198060A (en) 2007-02-15 2008-08-28 Seiko Epson Corp Information processor, patch code mounting system, electronic equipment, and patch code mounting method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003150396A (en) * 2001-11-12 2003-05-23 Casio Comput Co Ltd Information processor and patch processing method
CN101739273A (en) * 2008-11-24 2010-06-16 联发科技股份有限公司 Memory sharing method
CN102215479A (en) * 2011-06-22 2011-10-12 中兴通讯股份有限公司 Method, server and system for downloading and installing upgrade package

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017084051A1 (en) * 2015-11-18 2017-05-26 深圳市大疆创新科技有限公司 External device management method, apparatus and system, memory, and unmanned aerial vehicle
US11003599B2 (en) 2015-11-18 2021-05-11 SZ DJI Technology Co., Ltd. Method, apparatus and system of managing external devices, memory and unmanned aerial vehicle
CN107944021A (en) * 2017-12-11 2018-04-20 北京奇虎科技有限公司 File replacement method, device and terminal device
CN107944021B (en) * 2017-12-11 2021-06-18 北京奇虎科技有限公司 File replacement method and device and terminal equipment
CN110109695A (en) * 2019-04-17 2019-08-09 华为技术有限公司 Patch method, relevant apparatus and system
CN110109695B (en) * 2019-04-17 2021-08-27 华为技术有限公司 Patch method, related device and system
US11797288B2 (en) 2019-04-17 2023-10-24 Huawei Technologies Co., Ltd. Patching method, related apparatus, and system
CN111179913A (en) * 2019-12-31 2020-05-19 深圳市瑞讯云技术有限公司 Voice processing method and device
CN111179913B (en) * 2019-12-31 2022-10-21 深圳市瑞讯云技术有限公司 Voice processing method and device
CN112788384A (en) * 2021-02-07 2021-05-11 深圳市大鑫浪电子科技有限公司 Wireless digital television screen projection method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
TW201327168A (en) 2013-07-01
KR101246360B1 (en) 2013-03-22
WO2013100302A1 (en) 2013-07-04

Similar Documents

Publication Publication Date Title
CN102945170A (en) Patch method using RAM(random-access memory)and temporary memory, patch server, and client
Li et al. Repair pipelining for erasure-coded storage: Algorithms and evaluation
US9817860B2 (en) Generation and application of correctness-enforced executable filters
Deng et al. Fault-tolerant and reliable computation in cloud computing
Ji et al. ispan: Parallel identification of strongly connected components with spanning trees
CN110147407B (en) Data processing method and device and database management server
EP3432157B1 (en) Data table joining mode processing method and apparatus
US9383978B2 (en) Apparatus and method for on-demand optimization of applications
US20160004455A1 (en) Method of controlling splitting of data, and system
CN110968554A (en) Block chain storage method, storage system and storage medium based on file chain blocks
CN116107664B (en) Low-cost high-dimensional multi-target software configuration parameter tuning method and system
CN110213326A (en) Expansion method, system, equipment and the storage medium of metadata node cluster
Moore et al. Lustre lockahead: Early experience and performance using optimized locking
Fahmy et al. CoS-HDFS: Co-locating geo-distributed spatial data in hadoop distributed file system
CN111158901B (en) Optimization method, optimization device, computer equipment and storage medium for calculation graph
Arani et al. An extended approach for efficient data storage in cloud computing environment
CN107463638A (en) File sharing method and equipment between offline virtual machine
Shi et al. UMR-EC: A unified and multi-rail erasure coding library for high-performance distributed storage systems
CN113590643B (en) Data synchronization method, device, equipment and storage medium based on dual-track database
CN115130130A (en) Network disk file unlocking method and device, network disk and storage medium
CN114840488A (en) Distributed storage method, system and storage medium based on super-fusion structure
US20160156525A1 (en) Dynamic conversion of hardware resources of a server system
US11121981B1 (en) Optimistically granting permission to host computing resources
US11379335B2 (en) Self-reporting remote copy performance on a consistency group
KR101298852B1 (en) Method of restoring file and system for the same

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20130227