CN106569844A - Processing method, processing device and equipment for program code update - Google Patents
Processing method, processing device and equipment for program code update Download PDFInfo
- Publication number
- CN106569844A CN106569844A CN201610848712.8A CN201610848712A CN106569844A CN 106569844 A CN106569844 A CN 106569844A CN 201610848712 A CN201610848712 A CN 201610848712A CN 106569844 A CN106569844 A CN 106569844A
- Authority
- CN
- China
- Prior art keywords
- updated
- application
- program code
- function
- new file
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
- G06F8/658—Incremental updates; Differential updates
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
An embodiment of the invention provides a processing method, a processing device and equipment for program code update. The method comprises the steps of receiving a program code update request which is transmitted from terminal equipment, wherein the program code update request comprises a to-be-updated application identification; according to the program code update request, acquiring a latest-edition update file of a to-be-updated application which corresponds with the to-be-updated application identification by means of a text difference comparison algorithm, wherein the update file comprises a common part and a different part which corresponds with each function; transmitting the update file of the to-be-updated application to the terminal equipment so that the terminal equipment updates the program file of the to-be-updated application according to the update file, and combining newly added functions of the application, wherein the update file comprises only one common file, thereby effectively reducing internal resource of the update file. On the condition that the terminal equipment performs application update, local capacity occupation is reduced. Furthermore network resource wastage and downloading time length can be reduced.
Description
Technical field
The present invention relates to field of computer technology, more particularly to a kind of program code update processing method, device and set
It is standby.
Background technology
In current cell-phone customer terminal field, either iOS or Android, user will obtain the function of application program
The renewal of (except the function of Web, here is mainly for the function renewal based on Native), it is necessary under application market
The new installation kit of load is on mobile phone.Examination & verification is needed because application market uploads renewal bag, audit time is by application market provider
Determine, so product demand is iterative constrained very big.Particularly when there is problem on some great lines, relying on repair time should
With market, it is difficult to control loss range.
Based on this, React Native are (referred to as:RN) official's network provides a kind of hot update method React-Native-
Pushy, the method is the JSBundle binary files after the integrated compilings of RN to be calculated based on BS text comparison in difference algorithms increase
Amount.It is meant that the renewal request sent according to the terminal unit of user side, by BS text comparison in difference algorithms to program generation
Code carries out contrasting the difference for obtaining different editions, i.e., above-mentioned increment, due in application program for after submitted, can be integrated by RN
Jsbundle after compiling throws built-in resource the inside into and goes, and a complete jsbundle is distinguishing platform (iOS/
Android) and on the premise of js compressions, volume has 600K or so.If over the Quick Extended of business, it is assumed that there is 100
The built-in resource of jsbundle, then size will reach 60M.The built-in resource of application program is excessive, the terminal unit of user
When line program renewal is entered, need to download application bag, cause to take excessive sheet when terminal unit more new application
Ground capacity, and the time-consuming overlength of application, waste of resource are downloaded every time.
The content of the invention
In order to solve the above problems, the embodiment of the present invention provides a kind of processing method of program code renewal, device and sets
It is standby.
First aspect present invention provides the processing method that a kind of program code updates, including:
The program code that receiving terminal apparatus send updates request;Program code updates request includes application mark to be updated
Know;
Updated according to program code and asked, treated more using text comparison in difference algorithm acquisition application identities to be updated are corresponding
The more new file of the latest edition of new opplication;More new file includes common portion difference section corresponding with each function;
The more new file of application to be updated is sent to terminal unit, so as to terminal unit treats renewal according to more new file answer
Program code is updated.
Optionally, updated according to program code and asked, application identities pair to be updated are obtained using text comparison in difference algorithm
The more new file of the latest edition of the application to be updated answered, including:
Using the latest edition and current version of the application to be updated of text comparison in difference method comparison;
The compiling file of at least one function of increasing in latest edition is merged into process, application to be updated is obtained
The more new file of latest edition;Common portion is the compiling file of the common portion of at least one function;Each function is corresponding
Difference section is the compiling file of the specific part of function.
Optionally, text comparison in difference algorithm is Google text difference matching algorithm (i.e. google-diff-match-
Patch algorithms).
Second aspect present invention provides the processing method that a kind of program code updates, including:
To the request of application server router code update;Program code updates request includes application mark to be updated
Know;
Receive the more new file of the corresponding application to be updated of application identities to be updated that application server sends;More new file
Including the common portion and difference section of each function of increasing newly in the compiling file of the latest edition of application to be updated;
It is updated according to the program code that more new file treats renewal application.
Optionally, institute's method also includes:
When the execution operation to the first function is detected, the corresponding difference section of the first function is obtained;
The corresponding difference section of first function and common portion are closed in the buffer using text comparison in difference algorithm
And perform, and the corresponding cache file of the first function is discharged at the end of the first function executing is detected.
Third aspect present invention provides the processing meanss that a kind of program code updates, including:
Receiver module, for the program code that receiving terminal apparatus send request is updated;Program code updates in request and wraps
Include application identities to be updated;
Processing module, asks for being updated according to program code, and using text comparison in difference algorithm application to be updated is obtained
Identify the more new file of the latest edition of corresponding application to be updated;More new file includes that common portion is corresponding with each function poor
Different part;
Sending module, for sending the more new file of application to be updated to terminal unit, so that terminal unit is according to renewal
File is updated to the program code of application to be updated.
Optionally, processing module specifically for:
Using the latest edition and current version of the application to be updated of text comparison in difference method comparison;
The compiling file of at least one function of increasing in latest edition is merged into process, application to be updated is obtained
The more new file of latest edition;Common portion is the compiling file of the common portion of at least one function;Each function is corresponding
Difference section is the compiling file of the specific part of function.
Optionally, the text comparison in difference algorithm that processing module is adopted is Google text difference matching algorithm (i.e. google-
Diff-match-patch algorithms).
Fourth aspect present invention provides the processing meanss that a kind of program code updates, including:
Sending module, for the request of application server router code update;Program code updates request to be included
Application identities to be updated;
Receiver module, for receiving the renewal of the corresponding application to be updated of application identities to be updated of application server transmission
File;Common portion and difference of the more new file including each function of increasing newly in the compiling file of the latest edition of application to be updated
Different part;
Processing module, is updated for treating the program code for updating application according to more new file.
Optionally, processing module is additionally operable to:
When the execution operation to the first function is detected, the corresponding difference section of the first function is obtained;
The corresponding difference section of first function and common portion are closed in the buffer using text comparison in difference algorithm
And perform, and the corresponding cache file of the first function is discharged at the end of the first function executing is detected.
Fifth aspect present invention provides a kind of server, including:Have program stored therein instruction memorizer, for control program
Processor, receptor and transmitter that instruction is performed;
Receptor is used for the program code renewal request that receiving terminal apparatus send;Program code updates request to be included treating
Update application identities;
Processor is used to be updated according to program code asks, and using text comparison in difference algorithm application identities to be updated are obtained
The more new file of the latest edition of corresponding application to be updated;More new file includes common portion difference portion corresponding with each function
Point;
Transmitter sends the more new file of application to be updated to terminal unit, so that terminal unit is treated according to more new file
The program code for updating application is updated.
Optionally, processor specifically for:
Using the latest edition and current version of the application to be updated of text comparison in difference method comparison;
The compiling file of at least one function of increasing in latest edition is merged into process, application to be updated is obtained
The more new file of latest edition;Common portion is the compiling file of the common portion of at least one function;Each function is corresponding
Difference section is the compiling file of the specific part of function.
Optionally, the text comparison in difference algorithm that processor is adopted is Google text difference matching algorithm (i.e. google-
Diff-match-patch algorithms).
Sixth aspect present invention provides a kind of terminal unit, including:Have program stored therein instruction memorizer, for controlling journey
Processor, transmitters and receivers that sequence instruction is performed;
Transmitter is used for the request of application server router code update;Program code updates request to be included treating more
New opplication is identified;
Receptor is used for the renewal text of the corresponding application to be updated of application identities to be updated for receiving application server transmission
Part;Common portion and difference of the more new file including each function of increasing newly in the compiling file of the latest edition of application to be updated
Part;
The program code that processor is used to treat renewal application according to more new file is updated.
Optionally, processor is additionally operable to:
When the execution operation to the first function is detected, the corresponding difference section of the first function is obtained;
The corresponding difference section of first function and common portion are closed in the buffer using text comparison in difference algorithm
And perform, and the corresponding cache file of the first function is discharged at the end of the first function executing is detected.
Processing method, device and equipment that program code provided in an embodiment of the present invention updates, application server is according to end
The program code that end equipment sends updates request, each function of the compiling file of the more new file of application to be updated is split and is closed
And, the more new file for obtaining includes a common portion of each function and the difference section of each function, is then sent to
Terminal unit, terminal unit is updated according to the more new file correspondence with program, by the way that the newly-increased function of application is closed
And, a public documents are only included in more new file, the built-in resource of more new file is effectively reduced, applied in terminal unit
When program updates, occupancy of the reduction to local capacity, and the waste of Internet resources can be reduced, shorten downloading duration.
Description of the drawings
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
The accompanying drawing to be used needed for having technology description is briefly described, it should be apparent that, drawings in the following description are these
Some bright embodiments, for those of ordinary skill in the art, without having to pay creative labor, can be with
Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is the flow chart of the processing method example one that program code provided in an embodiment of the present invention updates;
Fig. 2 is the flow chart of the processing method embodiment two that program code provided in an embodiment of the present invention updates;
Fig. 3 is the structural representation of the processing meanss embodiment one that program code provided in an embodiment of the present invention updates;
Fig. 4 is the structural representation of the processing meanss embodiment three that program code provided in an embodiment of the present invention updates;
Fig. 5 is the structural representation of server example provided in an embodiment of the present invention;
Fig. 6 is the structural representation of terminal unit embodiment one provided in an embodiment of the present invention.
Specific embodiment
To make purpose, technical scheme and the advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention
In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is
The a part of embodiment of the present invention, rather than the embodiment of whole.Based on the embodiment in the present invention, those of ordinary skill in the art
The all other embodiment obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
Fig. 1 is the flow chart of the processing method example one that program code provided in an embodiment of the present invention updates, such as Fig. 1 institutes
Show, the executive agent of the program is the application server for providing application program, or the server of software management platform, example
Such as:The management server of application market, the step that implements of the processing method that the program code updates is:
Step S101, the program code that receiving terminal apparatus send updates request;Wrap in the request of described program code update
Include application identities to be updated.
In the present embodiment, terminal unit opens application program (also referred to as using), or selects to carry out application program
During renewal, by the client of application program to the corresponding server router code update request of application program, it is right to ask
Application program is updated, and the program code updates the mark (identity) at least including application to be updated in request, so as to
It is which application program is updated that server can determine.
Step S102, asks according to described program code update, obtains described to be updated using text comparison in difference algorithm
The more new file of the latest edition of the corresponding application to be updated of application identities;The more new file includes common portion and each work(
Can correspondence difference section.
In this step, in order to reduce the built-in resource of application program (i.e. using), in server side, by application to be updated
Compiling file after compiling carries out deconsolidation process, obtains a stable common portion, and the difference of each different function
Part, the content of the common portion is unrelated with specific business tine and functional realiey, is the public storehouse in programming.
Specifically, using text comparison in difference algorithm (specifically for example:Google text difference matching algorithm (i.e. google-
Diff-match-patch algorithms)) latest edition of relatively more described application to be updated and current version;By in the latest edition
The compiling file of at least one increased function merges process, obtains the renewal text of the latest edition of the application to be updated
Part;The common portion is the compiling file of the common portion of at least one function;The corresponding difference section of each function
For the compiling file of the specific part of the function.
The built-in resource of application program is referred to:Application program packing when, the picture that some Jing frequentations are asked and
File is carried out packing the resource for obtaining, and so that application program is in the case where accessing network, can directly read these
Ground resource.Resource of these dozens inside installation kit is referred to as application resource.
The text comparison in difference algorithm being related in this programme refers to google-diff-match-patch algorithms, should
Google-diff-match-patch algorithms are the incremental portions for calculating text new early version, and by incremental portion
With a kind of algorithm of early version synthesis.From unlike the BS text comparison in difference algorithms referred in background technology, google-
Diff-match-patch is to carry out comparison in difference to content of text.
So that application program of mobile phone updates as an example, according to the particularity of the content of JSBundle in React Native, we
Case proposes for a JSBundle after packing compiling to split into a stable common portion plus difference section.Enter for one
Mouth file pageIndex.jsbundle, can split into stable commonPart.jsbundle and difference section
diffPart.jsbundle.Wherein, common portion commonPart.jsbundle is unrelated with concrete business, is React
Some public js storehouses in Native.And diffPart.jsbundle includes the file of multiple specific business or function.
For such scheme, commonPart.jsbundle generate method can be implemented as (by taking iOS as an example,
The principle of Android is identical):
(1) a, newly-built blank.ios.js file, introduces hereof React and React-Native, wherein not wrapping
Containing any service code, specific code is as follows:
import React from‘react’;
import{}from‘react-native’;
(2), blank.ios.js files are compiled into by common.ios.jsbundle by curl orders.
The generic command of curl is:curl bundleUrl–o bundleName
Wherein bundleUrl and bundleName are the custom contents of user input, such as in the examples below
BundleUrl ishttp://localhost:8081/blank.ios.bundleMinify=true&dev=false,
BundleName is common.ios.jsbundle
It should be noted that in this programme, because commonPart.jsbundle relies on Native codes,
The renewal of commonPart.jsbundle is that the version of sending out of and then application program is walked.
Step S103, sends more new file described in the application to be updated, so that the terminal to the terminal unit
Equipment more new file according to is updated to the program code of the application to be updated.
In this step, obtain including public portion after being split through the above-mentioned compiling file to application to be updated
The more new file with the corresponding difference section of each function, application server is divided the more new file for obtaining to be sent to into terminal and is set
It is standby, application to be updated is updated.
The processing method that the program code that the present embodiment is provided updates, the program that application server sends according to terminal unit
Code update is asked, and each function of the compiling file of the more new file of application to be updated is split and is merged, the renewal text for obtaining
Part includes a common portion of each function and the difference section of each function, is then sent to terminal unit, and terminal sets
It is standby to be updated with program according to the more new file correspondence, by the way that the newly-increased function of application is merged, in more new file only
Including a public documents, the built-in resource of more new file is effectively reduced, when terminal unit carries out application program update, reduced
Occupancy to local capacity, and the waste of Internet resources can be reduced, shorten downloading duration.
Fig. 2 is the flow chart of the processing method embodiment two that program code provided in an embodiment of the present invention updates, such as Fig. 2 institutes
Show, the executive agent of the program is the terminal unit of user side, for example:Mobile phone, panel computer, computer, TV etc. can be installed
The equipment of application program, the specific implementation of the processing method that the program code updates:
S201:To the request of application server router code update;The request of described program code update includes treating more
New opplication is identified.
In this step, terminal unit opens application program (also referred to as using), or selects to carry out more application program
When new, by the client of application program to the corresponding server router code update request of application program, request correspondence
It is updated with program, the program code is updated at least including the mark (identity) of application to be updated in request, with housecoat
Business device can determine it is which application program is updated.
S202:Receive the renewal of the corresponding application to be updated of application identities described to be updated that the application server sends
File;The more new file is public including each function of increasing newly in the compiling file of the latest edition of the application to be updated
Part and difference section.
In this step, server or application server be according to the request of terminal unit, to application program to be updated
Compiling file carries out deconsolidation process, and the more new file for obtaining includes the difference portion of a stable common portion and each function
Point, it is complete jsbundle compared to each function in existing mode, effectively reduce more new file (i.e. application bag)
Volume, terminal unit receive application server return more new file, due to more new file volume itself it is smaller, can be effective
Download time is reduced, Internet resources are saved.
S203:The program code of the application to be updated is updated according to the more new file.
Terminal unit carries out operation installation after more new file is received, and realizes the renewal to application to be updated.
On the basis of said process, further, because the common portion and difference section of each function are built-in money
Source is separate, therefore when certain function is run, needs the operation according to user, is marked off in the caching of terminal unit
It is exclusively used in running the memory space of the program, the difference section of common portion and the first function to be run is obtained out to be carried out
Merging treatment, is discharged the part caching after end of run.Specifically can be implemented as:
When the execution operation to the first function is detected, the corresponding difference section of first function is obtained;
The corresponding difference section of first function and the common portion are adopted into text comparison in difference algorithm (i.e.
Google-diff-match-patch algorithms) execution is merged in the buffer, and detecting the first function executing knot
First function corresponding cache file is discharged during beam.
On the basis of the example being updated to the application program of iOS system in FIG below, based on right above
The fractionation of jsbundle, have selected google-diff-match-patch algorithms and generates diff and merge diff.Calculating diff
When, on the basis of common portion commonPart.jsbundle, calculate current version pageIndex.jsbundle with
Text difference between commonPart.jsbundle, then the application program end of terminal equipment side take text difference description
Afterwards, recycle google-diff-match-patch algorithms that text difference is merged into into local commonPart.jsbundle
In.
Generate diff and call the API of google-diff-match-patch for (as a example by iOS ends, other ends can find correspondence
API), concrete implementation code is:
-(NSMutableArray*)diff_mainOfOldString:(NSString*)text1andNewString:
(NSString*)text2;
Terminal equipment side merge diff call the API of google-diff-match-patch for (as a example by iOS ends, other
End can find corresponding A PI), concrete method of calling is:
-(NSArray*)patch_apply:(NSArray*)sourcePatches toString:(NSString*)
text;
The processing method that the program code that this programme is provided updates, the program generation that application server sends according to terminal unit
Code updates request, each function of the compiling file of the more new file of application to be updated is split and is merged, the more new file for obtaining
Include a common portion of each function and the difference section of each function, be then sent to terminal unit, terminal unit
It is updated with program according to the more new file correspondence, by the way that the newly-increased function of application is merged, is only wrapped in more new file
A public documents are included, the built-in resource of more new file is effectively reduced, when terminal unit carries out application program update, it is right to reduce
The occupancy of local capacity, and the waste of Internet resources can be reduced, shorten downloading duration, and can be right in running
The difference section and common portion of the function of using merges process, and empties caching after use, will not increase extra
Capacity takes.
On the basis of any of the above-described embodiment, the processing meanss that the program code that the application is provided updates preferentially are applied
In hot renewal process, the process that heat updates is specially:
When in the carrier into React Native, needing first to determine whether that RN is cached, if caching, then directly enter
Row next step.If do not cached, server is gone to download corresponding RN resources (the RN code files that RN resources refer to) according to RN
Resource, carrier page renders the corresponding page and is shown.After the RN pages have been shown, new bottle opener thread is on backstage to server
The up-to-date information data of request current page.According to the data that previous step server is returned, branch operation is carried out:If forcing
Update, then pop-up prompting user needs to force refreshing current page to continue operation;If general optional renewal, then
In background update data, user enters to be updated after this page next time comes into force program;If do not updated, any operation is not done,
Flow process terminates.(in addition, to server request preloading data when APP starts, in advance the RN resource important to some is entered
Row loading, the so first step in above-mentioned flow process just directly can rapidly enter the page using RN cachings, improve Consumer's Experience.)
The processing method that the program code that the application is provided updates is applied during heat updates, it is possible to achieve below
Purpose:
(1), when built-in resource, built-in a commonPart.jsbundle and corresponding portal page pair are only needed
The diffPart.jsbundle for answering.Under normal conditions, commonPart.jsbundle accounts for the big of whole jsbundle nearly 2/3
Little, this compares the size that the resource built-in based on React-Native-pushy saves nearly 2/3.In addition, changing for business
For the renewal bag of process, all simply renewal of service code, the size of bag has also obtained good control.
(2) when, server calculates diff bags, due to being only compared to commonPart.jsbundle, so
Calculate increment complexity compare React-Native-pushy fall below it is minimum.APP ends are when diff is synthesized, it is only necessary to
One common.jsbundle and diff.jsbundle is merged, is merged performance and is compared React-
Native-pushy will averagely merge multiple, be greatly improved.
(3), the present invention calculate renewal, by some portal page for pageIndex.jsbundle in units of come
Operation, is in units of concrete business.The corresponding more new capital of each pageIndex.jsbundle be it is separate, i.e.,
A processing business and updates error is made, the renewal of other business is not interfered with yet.
Detachable characteristic of this programme based on the content of the bag (JSBundle) after React Native compilings, it is proposed that
Hot update scheme based on content of text.Built-in resource size is being controlled, bag size is being updated, server-side processes increment is complicated
Degree, app ends merge diff performances, and processing business and updates bag is separate the good performance of aspect such as does not couple.
Fig. 3 is the structural representation of the processing meanss embodiment one that program code provided in an embodiment of the present invention updates, such as
Shown in Fig. 3, the processing meanss 10 that the program code updates include:
Receiver module 11, for the program code that receiving terminal apparatus send request is updated;Program code is updated in request
Including application identities to be updated;
Processing module 12, asks for being updated according to program code, and using text comparison in difference algorithm to be updated answering is obtained
With the more new file of the latest edition for identifying corresponding application to be updated;More new file includes that common portion is corresponding with each function
Difference section;
Sending module 13, for sending the more new file of application to be updated to terminal unit, so that terminal unit is according to more
New file is updated to the program code of application to be updated.
The processing meanss that the program code that the present embodiment is provided updates, for performing the method that aforementioned any embodiment is provided
The technical scheme of middle application server or server, it is realized that principle is similar with technique effect, will not be described here.
Program code update processing meanss embodiment two in, processing module 12 specifically for:
Processing module specifically for:
Using the latest edition and current version of the application to be updated of text comparison in difference method comparison;
The compiling file of at least one function of increasing in latest edition is merged into process, application to be updated is obtained
The more new file of latest edition;Common portion is the compiling file of the common portion of at least one function;Each function is corresponding
Difference section is the compiling file of the specific part of function.
Optionally, the text comparison in difference algorithm that processing module 12 is adopted for Google text comparison in difference algorithm (i.e.
Google-diff-match-patch algorithms).
The processing meanss that the program code that the present embodiment is provided updates, for performing the method that aforementioned any embodiment is provided
The technical scheme of middle application server or server, it is realized that principle is similar with technique effect, will not be described here.
Fig. 4 is the structural representation of the processing meanss embodiment three that program code provided in an embodiment of the present invention updates, such as
Shown in Fig. 4, the processing meanss 20 that the program code updates include:
Sending module 21, for the request of application server router code update;Program code updates in request and wraps
Include application identities to be updated;
Receiver module 22, for receive application server transmission the corresponding application to be updated of application identities to be updated more
New file;The common portion of each function of increasing newly in the compiling file of the latest edition of more new file including application to be updated and
Difference section;
Processing module 23, is updated for treating the program code for updating application according to more new file.
Optionally, processing module 23 is additionally operable to:
When the execution operation to the first function is detected, the corresponding difference section of the first function is obtained;
The corresponding difference section of first function and common portion are closed in the buffer using text comparison in difference algorithm
And perform, and the corresponding cache file of the first function is discharged at the end of the first function executing is detected.
The processing meanss that the program code that the present embodiment is provided updates, for performing the method that aforementioned any embodiment is provided
The technical scheme of middle terminal unit, it is realized that principle is similar with technique effect, will not be described here.
Fig. 5 is the structural representation of server example provided in an embodiment of the present invention, as shown in figure 5, the server
Can be embodied in methods that:Have program stored therein instruction memorizer 31, for control program instruct perform processor 33, receive
Device 32 and transmitter 34;
Receptor 32 is used for the program code renewal request that receiving terminal apparatus send;Program code updates request to be included
Application identities to be updated;
Processor 33 is used to be updated according to program code asks, and using text comparison in difference algorithm application mark to be updated is obtained
Know the more new file of the latest edition of corresponding application to be updated;More new file includes common portion difference corresponding with each function
Part;
Transmitter 34 sends the more new file of application to be updated to terminal unit, so that terminal unit is according to more new file pair
The program code of application to be updated is updated.
Optionally, processor 32 specifically for:
Using the latest edition and current version of the application to be updated of text comparison in difference method comparison;
The compiling file of at least one function of increasing in latest edition is merged into process, application to be updated is obtained
The more new file of latest edition;Common portion is the compiling file of the common portion of at least one function;Each function is corresponding
Difference section is the compiling file of the specific part of function.
Optionally, the text comparison in difference algorithm that processor 33 is adopted is for google-diff-match-patch algorithms.
The server that the present embodiment is provided, for performing the method that aforementioned any embodiment is provided in application server or
The technical scheme of server, it is realized that principle is similar with technique effect, will not be described here.
Fig. 6 is the structural representation of terminal unit embodiment one provided in an embodiment of the present invention, as shown in fig. 6, the terminal
Equipment can be embodied in methods that:Have program stored therein instruction memorizer 41, for control program instruct perform processor 44,
Transmitter 42 and receptor 43;
Transmitter 42 is used for the request of application server router code update;Program code updates request to be included treating
Update application identities;
Receptor 43 is used for the renewal of the corresponding application to be updated of application identities to be updated for receiving application server transmission
File;Common portion and difference of the more new file including each function of increasing newly in the compiling file of the latest edition of application to be updated
Different part;
The program code that processor 44 is used to treat renewal application according to more new file is updated.
Optionally, processor 44 is additionally operable to:
When the execution operation to the first function is detected, the corresponding difference section of the first function is obtained;
The corresponding difference section of first function and common portion are closed in the buffer using text comparison in difference algorithm
And perform, and the corresponding cache file of the first function is discharged at the end of the first function executing is detected.
The terminal unit that the present embodiment is provided, for performing the skill of terminal unit in the method that aforementioned any embodiment is provided
Art scheme, it is realized that principle is similar with technique effect, will not be described here.
In the embodiment of any of the above-described server and terminal unit, it should be appreciated that processor can be CPU
(English:Central Processing Unit, referred to as:CPU), can also be other general processors, digital signal processor
(English:Digital Signal Processor, referred to as:DSP), special IC (English:Application
Specific Integrated Circuit, referred to as:ASIC) etc..General processor can be microprocessor or the processor
It can also be any conventional processor etc..The step of method with reference to disclosed in the embodiment of the present invention, can be embodied directly in hard
Part computing device is completed, or is completed with the hardware in processor and software module combination execution.
One of ordinary skill in the art will appreciate that:Realizing all or part of step of above-mentioned each method embodiment can lead to
Cross the related hardware of programmed instruction to complete.Aforesaid program can be stored in a computer read/write memory medium.The journey
Sequence upon execution, performs the step of including above-mentioned each method embodiment;And aforesaid storage medium includes:Read only memory (English
Text:Read-only memory, abbreviation:ROM), RAM, flash memory, hard disk, solid state hard disc, tape (English:magnetic
Tape), floppy disk (English:Floppy disk), CD (English:Optical disc) and its combination in any.
Finally it should be noted that:Various embodiments above only to illustrate technical scheme, rather than a limitation;To the greatest extent
Pipe has been described in detail with reference to foregoing embodiments to the present invention, it will be understood by those within the art that:Its according to
So the technical scheme described in foregoing embodiments can be modified, either which part or all technical characteristic are entered
Row equivalent;And these modifications or replacement, do not make the essence disengaging various embodiments of the present invention technology of appropriate technical solution
The scope of scheme.
Claims (12)
1. the processing method that a kind of program code updates, it is characterised in that include:
The program code that receiving terminal apparatus send updates request;The request of described program code update includes application mark to be updated
Know;
Asked according to described program code update, the application identities to be updated are obtained using text comparison in difference algorithm corresponding
The more new file of the latest edition of application to be updated;The more new file includes common portion difference portion corresponding with each function
Point;
Send more new file described in the application to be updated to the terminal unit so that the terminal unit according to more
New file is updated to the program code of the application to be updated.
2. method according to claim 1, it is characterised in that described to be asked according to described program code update, using text
This comparison in difference algorithm obtains the more new file of the latest edition of the corresponding application to be updated of the application identities to be updated, bag
Include:
Using the latest edition and current version of application to be updated described in text comparison in difference method comparison;
The compiling file of at least one function increased in the latest edition is merged into processs, described to be updated answer is obtained
The more new file of latest edition;The common portion is the compiling file of the common portion of at least one function;Often
The corresponding difference section of individual function is the compiling file of the specific part of the function.
3. method according to claim 1 and 2, it is characterised in that the text comparison in difference algorithm is that Google's text is poor
Different matching algorithm.
4. the processing method that a kind of program code updates, it is characterised in that include:
To the request of application server router code update;The request of described program code update includes application mark to be updated
Know;
Receive the more new file of the corresponding application to be updated of application identities described to be updated that the application server sends;It is described
Common portion and difference of the more new file including each function of increasing newly in the compiling file of the latest edition of the application to be updated
Different part;
The program code of the application to be updated is updated according to the more new file.
5. method according to claim 4, it is characterised in that institute's method also includes:
When the execution operation to the first function is detected, the corresponding difference section of first function is obtained;
The corresponding difference section of first function and the common portion are entered in the buffer using text comparison in difference algorithm
Row merges execution, and the corresponding cache file of first function is discharged at the end of first function executing is detected.
6. the processing meanss that a kind of program code updates, it is characterised in that include:
Receiver module, for the program code that receiving terminal apparatus send request is updated;Wrap in the request of described program code update
Include application identities to be updated;
Processing module, for asking according to described program code update, obtains described to be updated using text comparison in difference algorithm
The more new file of the latest edition of the corresponding application to be updated of application identities;The more new file includes common portion and each work(
Can correspondence difference section;
Sending module, for sending more new file described in the application to be updated to the terminal unit, so that the terminal
Equipment more new file according to is updated to the program code of the application to be updated.
7. device according to claim 6, it is characterised in that the processing module specifically for:
Using the latest edition and current version of application to be updated described in text comparison in difference method comparison;
The compiling file of at least one function increased in the latest edition is merged into processs, described to be updated answer is obtained
The more new file of latest edition;The common portion is the compiling file of the common portion of at least one function;Often
The corresponding difference section of individual function is the compiling file of the specific part of the function.
8. the device according to claim 6 or 7, it is characterised in that the text diversity ratio that the processing module is adopted
It is Google's text difference matching algorithm compared with algorithm.
9. the processing meanss that a kind of program code updates, it is characterised in that include:
Sending module, for the request of application server router code update;The request of described program code update includes
Application identities to be updated;
Receiver module, for receiving the corresponding application to be updated of application identities described to be updated that the application server sends
More new file;The more new file includes each function of increasing newly in the compiling file of the latest edition of the application to be updated
Common portion and difference section;
Processing module, is updated for the more new file according to the program code of the application to be updated.
10. device according to claim 9, it is characterised in that the processing module is additionally operable to:
When the execution operation to the first function is detected, the corresponding difference section of first function is obtained;
The corresponding difference section of first function and the common portion are entered in the buffer using text comparison in difference algorithm
Row merges execution, and the corresponding cache file of first function is discharged at the end of first function executing is detected.
11. a kind of servers, it is characterised in that include:Have program stored therein instruction memorizer, for control program instruction perform
Processor, receptor and transmitter;
The receptor is used for the program code renewal request that receiving terminal apparatus send;Wrap in the request of described program code update
Include application identities to be updated;
The processor is used to be asked according to described program code update, obtains described to be updated using text comparison in difference algorithm
The more new file of the latest edition of the corresponding application to be updated of application identities;The more new file includes common portion and each work(
Can correspondence difference section;
The transmitter to the terminal unit sends more new file described in the application to be updated, so that the terminal unit
The program code of the application to be updated is updated according to the more new file.
12. a kind of terminal units, it is characterised in that include:Have program stored therein instruction memorizer, for control program instruction hold
Capable processor, transmitters and receivers;
The transmitter is used for the request of application server router code update;The request of described program code update includes
Application identities to be updated;
The receptor is used to receive the corresponding application to be updated of application identities described to be updated that the application server sends
More new file;The more new file includes each function of increasing newly in the compiling file of the latest edition of the application to be updated
Common portion and difference section;
The processor is used for the more new file according to and the program code of the application to be updated is updated.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610848712.8A CN106569844B (en) | 2016-09-23 | 2016-09-23 | Processing method, device and equipment for updating program code |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610848712.8A CN106569844B (en) | 2016-09-23 | 2016-09-23 | Processing method, device and equipment for updating program code |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106569844A true CN106569844A (en) | 2017-04-19 |
CN106569844B CN106569844B (en) | 2020-05-12 |
Family
ID=58532491
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610848712.8A Active CN106569844B (en) | 2016-09-23 | 2016-09-23 | Processing method, device and equipment for updating program code |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106569844B (en) |
Cited By (28)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107908419A (en) * | 2017-10-27 | 2018-04-13 | 珠海金山网络游戏科技有限公司 | A kind of AssetBundle update methods and device based on difference |
CN108062228A (en) * | 2017-12-11 | 2018-05-22 | 深圳市买买提信息科技有限公司 | A kind of document handling method and its device |
CN108491225A (en) * | 2018-03-15 | 2018-09-04 | 维沃移动通信有限公司 | A kind of update packet generation method and mobile terminal |
CN108762772A (en) * | 2018-05-07 | 2018-11-06 | 百度在线网络技术(北京)有限公司 | The loading method and device of application |
CN109032629A (en) * | 2018-06-28 | 2018-12-18 | 北京达佳互联信息技术有限公司 | A kind of code update method and device |
CN109445833A (en) * | 2018-11-09 | 2019-03-08 | 苏宁消费金融有限公司 | A kind of method that React-native heat updates |
CN109471653A (en) * | 2018-09-29 | 2019-03-15 | 百度在线网络技术(北京)有限公司 | Update method, electronic equipment, server and the storage medium of application program |
CN109656773A (en) * | 2017-10-12 | 2019-04-19 | 卓望数码技术(深圳)有限公司 | A kind of processing frame collapsed extremely based on the application of IOS system |
CN109918097A (en) * | 2017-12-12 | 2019-06-21 | 优信数享(北京)信息技术有限公司 | A kind of method that binary difference calorimetric updates, apparatus and system |
CN109918098A (en) * | 2017-12-12 | 2019-06-21 | 优信数享(北京)信息技术有限公司 | What a kind of APP heat updated mentions survey method, apparatus and system |
CN110149702A (en) * | 2018-02-12 | 2019-08-20 | 展讯通信(上海)有限公司 | Method for parameter configuration and device, storage medium, base station, the user equipment of portions of bandwidth |
CN110166543A (en) * | 2019-05-16 | 2019-08-23 | 腾讯科技(深圳)有限公司 | Applied program processing method, device and computer equipment |
CN110780911A (en) * | 2018-07-30 | 2020-02-11 | 中兴通讯股份有限公司 | Information processing method, equipment and computer readable storage medium |
CN110837382A (en) * | 2019-09-26 | 2020-02-25 | 北京和德宇航技术有限公司 | Service framework-based narrowband space-based Internet of things terminal upgrading method and system |
CN111061501A (en) * | 2018-10-16 | 2020-04-24 | 福建天泉教育科技有限公司 | Hot updating method of android application and computer readable storage medium |
CN111435312A (en) * | 2019-01-15 | 2020-07-21 | 北京嘀嘀无限科技发展有限公司 | Application program management method and device and electronic equipment |
CN111831300A (en) * | 2019-08-23 | 2020-10-27 | 北京骑胜科技有限公司 | APP updating method and device, electronic equipment and computer readable storage medium |
CN111857781A (en) * | 2020-07-23 | 2020-10-30 | 平安普惠企业管理有限公司 | Resource updating method and related equipment |
CN111930612A (en) * | 2020-07-09 | 2020-11-13 | 北京皮尔布莱尼软件有限公司 | Method and device for detecting code updating correctness and computing equipment |
CN112230974A (en) * | 2019-07-15 | 2021-01-15 | 深圳Tcl数字技术有限公司 | Method and system for generating television differential upgrade package |
CN112262556A (en) * | 2018-11-01 | 2021-01-22 | 华为技术有限公司 | Model file management method and terminal equipment |
CN112486465A (en) * | 2020-12-11 | 2021-03-12 | 北京字节跳动网络技术有限公司 | Code updating method and device |
CN112559001A (en) * | 2019-09-26 | 2021-03-26 | 北京京东振世信息技术有限公司 | Method and device for updating application |
CN112947986A (en) * | 2020-09-29 | 2021-06-11 | 深圳市明源云科技有限公司 | Multi-version code sign-in control method and device, client and storage medium |
CN113238784A (en) * | 2021-06-16 | 2021-08-10 | 中国农业银行股份有限公司 | Transaction program updating method and device |
CN113535206A (en) * | 2021-07-23 | 2021-10-22 | 上海幻电信息科技有限公司 | Multi-version code upgrading method and system |
CN114692595A (en) * | 2022-05-31 | 2022-07-01 | 炫彩互动网络科技有限公司 | Repeated conflict scheme detection method based on text matching |
CN116010997A (en) * | 2023-03-20 | 2023-04-25 | 中国信息通信研究院 | Data resource hosting method and device based on continuity check of blockchain |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7350037B2 (en) * | 2003-05-21 | 2008-03-25 | Oki Electric Industry Co., Ltd. | Digital signal processor and digital signal processing method enabling concurrent program download and execution |
CN103428188A (en) * | 2012-05-25 | 2013-12-04 | 北京小米科技有限责任公司 | Method and apparatus for file updating, and associated equipment |
CN104077161A (en) * | 2014-06-19 | 2014-10-01 | 无锡天脉聚源传媒科技有限公司 | Client application updating method and device |
CN104965721A (en) * | 2014-07-10 | 2015-10-07 | 腾讯科技(深圳)有限公司 | Method and apparatus for updating an application |
CN105893073A (en) * | 2015-12-11 | 2016-08-24 | 乐视网信息技术(北京)股份有限公司 | Update method and system used for application program, and business server and pushing server used for updating application program |
-
2016
- 2016-09-23 CN CN201610848712.8A patent/CN106569844B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7350037B2 (en) * | 2003-05-21 | 2008-03-25 | Oki Electric Industry Co., Ltd. | Digital signal processor and digital signal processing method enabling concurrent program download and execution |
CN103428188A (en) * | 2012-05-25 | 2013-12-04 | 北京小米科技有限责任公司 | Method and apparatus for file updating, and associated equipment |
CN104077161A (en) * | 2014-06-19 | 2014-10-01 | 无锡天脉聚源传媒科技有限公司 | Client application updating method and device |
CN104965721A (en) * | 2014-07-10 | 2015-10-07 | 腾讯科技(深圳)有限公司 | Method and apparatus for updating an application |
CN105893073A (en) * | 2015-12-11 | 2016-08-24 | 乐视网信息技术(北京)股份有限公司 | Update method and system used for application program, and business server and pushing server used for updating application program |
Cited By (39)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109656773A (en) * | 2017-10-12 | 2019-04-19 | 卓望数码技术(深圳)有限公司 | A kind of processing frame collapsed extremely based on the application of IOS system |
CN107908419A (en) * | 2017-10-27 | 2018-04-13 | 珠海金山网络游戏科技有限公司 | A kind of AssetBundle update methods and device based on difference |
CN108062228A (en) * | 2017-12-11 | 2018-05-22 | 深圳市买买提信息科技有限公司 | A kind of document handling method and its device |
CN109918098A (en) * | 2017-12-12 | 2019-06-21 | 优信数享(北京)信息技术有限公司 | What a kind of APP heat updated mentions survey method, apparatus and system |
CN109918097A (en) * | 2017-12-12 | 2019-06-21 | 优信数享(北京)信息技术有限公司 | A kind of method that binary difference calorimetric updates, apparatus and system |
CN110149702B (en) * | 2018-02-12 | 2022-04-19 | 展讯通信(上海)有限公司 | Method and device for configuring parameters of bandwidth part, storage medium, base station and user equipment |
CN110149702A (en) * | 2018-02-12 | 2019-08-20 | 展讯通信(上海)有限公司 | Method for parameter configuration and device, storage medium, base station, the user equipment of portions of bandwidth |
CN108491225B (en) * | 2018-03-15 | 2021-10-12 | 维沃移动通信有限公司 | Update package generation method and mobile terminal |
CN108491225A (en) * | 2018-03-15 | 2018-09-04 | 维沃移动通信有限公司 | A kind of update packet generation method and mobile terminal |
CN108762772A (en) * | 2018-05-07 | 2018-11-06 | 百度在线网络技术(北京)有限公司 | The loading method and device of application |
CN109032629A (en) * | 2018-06-28 | 2018-12-18 | 北京达佳互联信息技术有限公司 | A kind of code update method and device |
CN110780911A (en) * | 2018-07-30 | 2020-02-11 | 中兴通讯股份有限公司 | Information processing method, equipment and computer readable storage medium |
CN109471653A (en) * | 2018-09-29 | 2019-03-15 | 百度在线网络技术(北京)有限公司 | Update method, electronic equipment, server and the storage medium of application program |
CN109471653B (en) * | 2018-09-29 | 2022-06-17 | 阿波罗智联(北京)科技有限公司 | Application program updating method, electronic device, server and storage medium |
CN111061501A (en) * | 2018-10-16 | 2020-04-24 | 福建天泉教育科技有限公司 | Hot updating method of android application and computer readable storage medium |
CN111061501B (en) * | 2018-10-16 | 2023-12-29 | 福建天泉教育科技有限公司 | Hot updating method of android application and computer readable storage medium |
CN112262556A (en) * | 2018-11-01 | 2021-01-22 | 华为技术有限公司 | Model file management method and terminal equipment |
US11940992B2 (en) | 2018-11-01 | 2024-03-26 | Huawei Technologies Co., Ltd. | Model file management method and terminal device |
CN109445833A (en) * | 2018-11-09 | 2019-03-08 | 苏宁消费金融有限公司 | A kind of method that React-native heat updates |
CN111435312A (en) * | 2019-01-15 | 2020-07-21 | 北京嘀嘀无限科技发展有限公司 | Application program management method and device and electronic equipment |
CN111435312B (en) * | 2019-01-15 | 2023-09-29 | 北京嘀嘀无限科技发展有限公司 | Application program management method and device and electronic equipment |
CN110166543A (en) * | 2019-05-16 | 2019-08-23 | 腾讯科技(深圳)有限公司 | Applied program processing method, device and computer equipment |
CN112230974A (en) * | 2019-07-15 | 2021-01-15 | 深圳Tcl数字技术有限公司 | Method and system for generating television differential upgrade package |
CN111831300A (en) * | 2019-08-23 | 2020-10-27 | 北京骑胜科技有限公司 | APP updating method and device, electronic equipment and computer readable storage medium |
CN112559001A (en) * | 2019-09-26 | 2021-03-26 | 北京京东振世信息技术有限公司 | Method and device for updating application |
CN112559001B (en) * | 2019-09-26 | 2023-09-26 | 北京京东振世信息技术有限公司 | Method and device for updating application |
CN110837382A (en) * | 2019-09-26 | 2020-02-25 | 北京和德宇航技术有限公司 | Service framework-based narrowband space-based Internet of things terminal upgrading method and system |
CN111930612B (en) * | 2020-07-09 | 2024-03-19 | 北京皮尔布莱尼软件有限公司 | Code updating correctness detection method and device and computing equipment |
CN111930612A (en) * | 2020-07-09 | 2020-11-13 | 北京皮尔布莱尼软件有限公司 | Method and device for detecting code updating correctness and computing equipment |
CN111857781A (en) * | 2020-07-23 | 2020-10-30 | 平安普惠企业管理有限公司 | Resource updating method and related equipment |
CN112947986B (en) * | 2020-09-29 | 2024-05-24 | 深圳市明源云科技有限公司 | Multi-version code sign-on control method, device, client and storage medium |
CN112947986A (en) * | 2020-09-29 | 2021-06-11 | 深圳市明源云科技有限公司 | Multi-version code sign-in control method and device, client and storage medium |
CN112486465A (en) * | 2020-12-11 | 2021-03-12 | 北京字节跳动网络技术有限公司 | Code updating method and device |
CN113238784A (en) * | 2021-06-16 | 2021-08-10 | 中国农业银行股份有限公司 | Transaction program updating method and device |
CN113535206B (en) * | 2021-07-23 | 2024-02-20 | 上海幻电信息科技有限公司 | Multi-version code upgrading method and system |
CN113535206A (en) * | 2021-07-23 | 2021-10-22 | 上海幻电信息科技有限公司 | Multi-version code upgrading method and system |
CN114692595B (en) * | 2022-05-31 | 2022-08-30 | 炫彩互动网络科技有限公司 | Repeated conflict scheme detection method based on text matching |
CN114692595A (en) * | 2022-05-31 | 2022-07-01 | 炫彩互动网络科技有限公司 | Repeated conflict scheme detection method based on text matching |
CN116010997A (en) * | 2023-03-20 | 2023-04-25 | 中国信息通信研究院 | Data resource hosting method and device based on continuity check of blockchain |
Also Published As
Publication number | Publication date |
---|---|
CN106569844B (en) | 2020-05-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106569844A (en) | Processing method, processing device and equipment for program code update | |
EP3333704B1 (en) | Method and apparatus for repairing kernel vulnerability | |
CN107025559B (en) | Service processing method and device | |
CN107463613A (en) | Page loading method and device | |
US20200125623A1 (en) | Method and system for loading web page, and server | |
CN108845816A (en) | Application program update method, system, computer equipment and storage medium | |
CN107015870B (en) | Method and device for realizing communication between web page and local application and electronic equipment | |
CN108052615A (en) | Processing method, device, medium and the electronic equipment of access request | |
CN106502646A (en) | The page info processing method and processing device of application | |
CN104063225B (en) | Screen locking theme development method and device | |
CN105407130A (en) | Mobile client plug-in system and mobile client plug-in processing method | |
KR20070008619A (en) | Execution of unverified programs in a wireless device operating environment | |
CN113259494B (en) | File storage method and device, electronic equipment and storage medium | |
CN105553727A (en) | Method, device and system for updating configuration information | |
CN108762800A (en) | The dynamic updating method and device of application program | |
CN113411404A (en) | File downloading method, device, server and storage medium | |
CN103246997B (en) | The transmission method of application store channel mark and system | |
CN108874426A (en) | Application program updating method and device and readable storage medium | |
CN110493336A (en) | The method and apparatus at target user end are determined in a kind of gray scale issuing process | |
GB2507037A (en) | Software application discovery using variable frequency file system scanning | |
WO2019237239A1 (en) | Data test method and apparatus, device/terminal/server and computer readable storage medium | |
CN110874445A (en) | Webpage loading method, client and business service center | |
CN107479923A (en) | Application program updating method, apparatus and display terminal | |
CN107426314B (en) | Data downloading method and device | |
CN107239475A (en) | One kind calls document method and device |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |