CN106598659A - Data file construction method, method and device for updating application program - Google Patents

Data file construction method, method and device for updating application program Download PDF

Info

Publication number
CN106598659A
CN106598659A CN201611119534.1A CN201611119534A CN106598659A CN 106598659 A CN106598659 A CN 106598659A CN 201611119534 A CN201611119534 A CN 201611119534A CN 106598659 A CN106598659 A CN 106598659A
Authority
CN
China
Prior art keywords
binary data
set length
chain
updated
determining
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
CN201611119534.1A
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.)
Tide (suzhou) Financial Technology Service Co Ltd
Original Assignee
Tide (suzhou) Financial Technology Service Co Ltd
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 Tide (suzhou) Financial Technology Service Co Ltd filed Critical Tide (suzhou) Financial Technology Service Co Ltd
Priority to CN201611119534.1A priority Critical patent/CN106598659A/en
Publication of CN106598659A publication Critical patent/CN106598659A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

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)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a data file construction method, a method for updating an application program, a server-side device and a client device. The data file construction method is applied to the server-side device installed at one side of a server, and comprises the following steps; determining update content corresponding to a to-be-updated application program, and converting the update content into a binary data format; determining position information of the to-be-updated application program, and converting the update content into the binary data format; and combining a data file by use of the position information of the binary data format and the update content. By use of the technical scheme provided by the invention, the resource consumption of a set of terminal equipment can be lowered when the constructed data file is used for updating the application program installed in the terminal equipment.

Description

Data file construction method, application program updating method and device
Technical Field
The invention relates to the technical field of computers, in particular to a method for constructing a data file, a method for updating an application program and a device.
Background
With the continuous development of the internet economy, the updating speed of the application program is faster and faster.
At present, when an application installed in a terminal device is updated, a version iteration mode is generally adopted for updating. Specifically, after a corresponding compiling environment (e.g., a Visual Studio compiling environment) is preset in a terminal device (e.g., a personal computer or a mobile phone), and a data file corresponding to the iterative version is acquired from a server, the acquired data file is executed by using the preset compiling environment, that is, the acquired data file is compiled in the preset compiling environment, so that the application program to be updated can be updated.
However, in the above technical solution, the compiling environment such as Visual Studio has a high demand on resources (e.g., memory and processor) of the terminal device, and meanwhile, when the data file corresponding to the iterative version is obtained, the data volume of the data file is large, the demand on network resources of the terminal device is also very high, which results in a serious resource consumption of the terminal device.
Disclosure of Invention
The embodiment of the invention provides a data file construction method, an application program updating method, a server device and a client device, which can reduce the resource consumption of terminal equipment.
In a first aspect, an embodiment of the present invention provides a method for constructing a data file, where the method is applied to a server device installed on a server side, and includes:
s1: determining the updating content corresponding to the application program to be updated, and converting the updating content into a binary data format;
s2: determining the position information of the application program to be updated, and converting the position information into a binary data format;
s3: the location information and the update content in binary data format are combined into a data file.
Preferably, the first and second electrodes are formed of a metal,
the determining the location information of the application program to be updated and converting the location information into a binary data format includes:
determining an installation path of the application program to be updated, and converting the installation path into a binary data format;
determining a data bit length parameter of the installation path in a binary data format, and identifying the data bit length parameter by using a first binary data chain with a first set length;
and combining the first binary data chain and the installation path of the binary data format into position information of the binary data format.
Preferably, the first and second electrodes are formed of a metal,
the determining of the update content corresponding to the application program to be updated and the converting of the update content into a binary data format include:
determining an update category corresponding to an application program to be updated, wherein the update category comprises: any of upgrade, delete, or compile;
identifying the update category by using a second binary data chain with a second set length;
when the update category is upgrade, executing A1 to A3:
a1: determining upgrading content and position parameters of the upgrading content corresponding to the application program to be updated;
a2: identifying the position parameter by using a third binary data chain with a third set length, and converting the upgrading content into a binary data format;
a3: combining the second binary data chain, the third binary data chain and the upgrading content in the binary data format into updating content in the binary data format;
or,
when the update category is delete, executing B1-B3:
b1: determining a position parameter of the data to be deleted corresponding to the application program to be updated;
b2: identifying the position parameter by using a fourth binary data chain with a fourth set length;
b3: combining the second binary data chain and the fourth binary data chain into updated content in a binary data format;
or,
when the update category is compiled, C1-C3 are executed:
c1: determining a position parameter of a geometry to be formed corresponding to the application program to be updated, and identifying the position parameter by using a fifth binary data chain with a fifth set length;
c2: determining a compiling type of a geometry to be formed, and identifying the compiling type by utilizing a sixth binary data chain with a sixth set length; wherein the compilation type comprises rebuild or build;
c3: generating updating content in a binary data format according to the compiling type;
preferably, the first and second electrodes are formed of a metal,
when the compilation type is rebuild, the C3 includes: determining the type of a geometric body to be formed and definition information of the geometric body to be formed; identifying the type of the geometric body to be formed by utilizing a seventh binary data chain with a seventh set length, and converting the definition information into a binary data format; combining the second binary data chain, the fifth binary data chain, the sixth binary data chain, the seventh binary data chain and the definition information of the binary data format into an update content of the binary data format;
preferably, the first and second electrodes are formed of a metal,
when the compilation type is build, the C3 includes: determining a mark position parameter of the geometry to be formed corresponding to the application program to be updated, and identifying the mark position parameter by using an eighth binary data chain with an eighth set length; combining the updated content in binary data format using the second, sixth, eighth, and fifth binary data chains.
In a second aspect, an embodiment of the present invention provides a method for updating an application, which is applied to a client device installed on a terminal device side, and includes:
acquiring a data file corresponding to an application program to be updated;
acquiring position information in a binary data format from the data file, and acquiring updating content in the binary data format from the data file;
and performing corresponding service processing on the application program to be updated by using the updating content in the binary data format according to the position information in the binary data format.
Preferably, the first and second electrodes are formed of a metal,
the acquiring the position information in the binary data format from the data file includes:
sequentially reading binary data chains with a first set length from a first data bit of the data file;
determining a data bit length parameter according to the binary data chain with the first set length;
reading the binary data chain corresponding to the data bit length parameter from the next bit of the binary data chain with the first set length in the data file;
and determining the installation path of the application program to be updated according to the binary data chain corresponding to the data bit length parameter.
Preferably, the first and second electrodes are formed of a metal,
the obtaining of the update content in the binary data format from the data file includes:
reading a binary data chain with a second set length from the next bit of the binary data chain corresponding to the data bit length parameter in the data file;
determining an updating type according to the binary data chain with the second set length;
when the update category is upgrade, executing a1 to a 4:
a 1: reading a binary data chain with a third set length from the next bit of the binary data chain with the second set length in the data file;
a 2: determining a position parameter according to the binary data chain with the third set length;
a 3: reading the binary data chain corresponding to the upgrading content from the next bit of the binary data chain with the third set length in the data file;
a 4: determining the upgrading content according to the read binary data chain corresponding to the upgrading content;
then, the performing, according to the location information in the binary data format, corresponding service processing on the application program to be updated by using the update content in the binary data format includes: determining the application program to be updated according to the installation path, and replacing the data content corresponding to the position parameter in the application program to be updated by using the upgrading content;
or,
when the update category is delete, performing b 1-b 2:
b 1: reading a binary data chain with a fourth set length from the next bit of the binary data chain with the second set length in the data file;
b 2: determining a position parameter according to the binary data chain with the fourth set length;
then, the performing, according to the location information in the binary data format, corresponding service processing on the application program to be updated by using the update content in the binary data format includes: determining the application program to be updated according to the installation path, and deleting the data content corresponding to the position parameter in the determined application program to be updated;
or,
when the update category is compiled, performing c 1-c 3:
c 1: reading a binary data chain with a fifth set length from the next bit of the binary data chain with the second set length in the data file;
c 2: determining a position parameter according to the binary data chain with the fifth set length;
c 3: reading a binary data chain with a sixth set length from the next bit of the binary data chain with the fifth set length in the data file;
c 4: determining a compiling type according to the binary data chain with the sixth set length;
c 5: determining corresponding information according to the determined compiling type and the data file;
preferably, the first and second electrodes are formed of a metal,
when the compilation type is rebuild, the c5 includes: reading a binary data chain with a seventh set length from the next bit of the binary data chain with the sixth set length in the data file; determining the type of the geometric body to be formed according to the binary data chain with the seventh set length; reading a binary data chain with an eighth set length from the next bit of the binary data chain with the seventh set length in the data file; determining definition information of a geometric body to be formed according to the binary data chain with the eighth set length;
then, the performing, according to the location information in the binary data format, corresponding service processing on the application program to be updated by using the update content in the binary data format includes: loading the application program to be updated to a data space of the terminal equipment according to the installation path; constructing a geometric body to be formed according to the type and the definition information of the geometric body to be formed; according to the position parameters, the built geometric body to be formed is assembled into the application program to be updated loaded into the data space;
preferably, the first and second electrodes are formed of a metal,
when the compilation type is a build, the c5 includes: reading a binary data chain with an eighth set length from the next bit of the binary data chain with the sixth set length in the data file; determining a mark position parameter according to the binary data chain with the eighth set length;
then, the performing, according to the location information in the binary data format, corresponding service processing on the application program to be updated by using the update content in the binary data format includes: loading the application program to be updated to a data space of the terminal equipment according to the installation path; determining the geometry to be formed in the data space according to the mark position parameters; moving the determined geometry to be formed within the data space according to the location parameters.
In a third aspect, an embodiment of the present invention provides a server apparatus, installed in a server, including:
the first processing module is used for determining the updating content corresponding to the application program to be updated and converting the updating content into a binary data format;
the second processing module is used for determining the position information of the application program to be updated and converting the position information into a binary data format;
and the third processing module is used for combining the position information and the updated content in a binary data format into a data file.
In a fourth aspect, an embodiment of the present invention provides a client apparatus, installed in a terminal device, including:
the acquisition module is used for acquiring a data file corresponding to the application program to be updated;
the data reading module is used for acquiring the position information of the binary data format from the data file and acquiring the updating content of the binary data format from the data file;
and the updating processing module is used for performing corresponding business processing on the application program to be updated by using the updating content in the binary data format according to the position information in the binary data format.
Preferably, the first and second electrodes are formed of a metal,
the data reading module comprises: a first reading unit, a first determining unit, a second reading unit, and a second determining unit; wherein,
the first reading unit is used for sequentially reading binary data chains with a first set length from a first data bit of the data file;
the first determining unit is used for determining a data bit length parameter according to the binary data chain with the first set length;
the second reading unit is used for reading the binary data chain corresponding to the data bit length parameter from the next bit of the binary data chain with the first set length in the data file;
and the second determining unit is used for determining the installation path of the application program to be updated according to the binary data chain corresponding to the data bit length parameter.
Preferably, the first and second electrodes are formed of a metal,
the data reading module further comprises: a third reading unit and a third determining unit;
the third reading unit is used for reading a binary data chain with a second set length from the next bit of the binary data chain corresponding to the data bit length parameter in the data file;
the third determining unit is configured to determine an update category according to the binary data chain with the second set length;
when the update type is upgrade, the data reading module further includes: a fourth reading unit, a fourth determining unit, a fifth reading unit, and a fifth determining unit; wherein,
the fourth reading unit is used for reading a binary data chain with a third set length from the next bit of the binary data chain with the second set length in the data file;
the fourth determining unit is configured to determine a position parameter according to the binary data chain with the third set length;
the fifth reading unit is configured to read the binary data chain corresponding to the upgrade content from the next bit of the binary data chain of the third set length in the data file;
the fifth determining unit is configured to determine the upgrade content according to the read binary data chain corresponding to the upgrade content;
the update processing module is configured to determine the application program to be updated according to the installation path, and replace the data content corresponding to the location parameter in the application program to be updated with the upgrade content;
or,
when the update type is deletion, the data reading module further includes: a sixth reading unit and a sixth determining unit; wherein,
the sixth reading unit is configured to read a binary data chain of a fourth set length from a next bit of the binary data chain of the second set length in the data file;
the sixth determining unit is configured to determine a position parameter according to the binary data chain with the fourth set length;
the update processing module is configured to determine the application program to be updated according to the installation path, and delete the data content corresponding to the location parameter in the determined application program to be updated;
or,
when the update type is compiled, the data reading module further includes: a seventh reading unit, a seventh determining unit, an eighth reading unit, an eighth determining unit, and a processing unit; wherein,
the seventh reading unit is configured to read a binary data chain of a fifth set length from a next bit of the binary data chain of the second set length in the data file;
the seventh determining unit is configured to determine a position parameter according to the binary data chain with the fifth set length;
the eighth reading unit is configured to read a binary data chain of a sixth set length from a next bit of the binary data chain of the fifth set length in the data file;
the eighth determining unit is configured to determine a compiling type according to the binary data chain with the sixth set length;
the processing unit is used for determining corresponding information according to the determined compiling type and the data file;
preferably, the first and second electrodes are formed of a metal,
when the compilation type determined by the eighth determining unit is rebuilt, the processing unit includes: the reading device comprises a first reading subunit, a first determining subunit, a second reading subunit and a second determining subunit; wherein,
the first reading subunit is configured to read a binary data chain of a seventh set length from a next bit of the binary data chain of the sixth set length in the data file;
the first determining subunit is configured to determine, according to the binary data chain with the seventh set length, a type of a geometric body to be formed;
the second reading subunit is configured to read a binary data chain of an eighth set length from a next bit of the binary data chain of the seventh set length in the data file;
the second determining subunit is configured to determine, according to the binary data chain of the eighth set length, definition information of a geometric solid to be formed;
the update processing module is configured to load the application program to be updated to the data space of the terminal device according to the installation path; constructing a geometric body to be formed according to the type and the definition information of the geometric body to be formed; according to the position parameters, the built geometric body to be formed is assembled into the application program to be updated loaded into the data space;
preferably, the first and second electrodes are formed of a metal,
when the compilation type determined by the eighth determining unit is a build, the processing unit includes: a third reading subunit and a third determining subunit; wherein,
the third reading subunit is configured to read a binary data chain of an eighth set length from a next bit of the binary data chain of the sixth set length in the data file;
the third determining subunit is configured to determine a mark position parameter according to the binary data chain of the eighth set length;
the update processing module is configured to load the application program to be updated to the data space of the terminal device according to the installation path; determining the geometry to be formed in the data space according to the mark position parameters; moving the determined geometry to be formed within the data space according to the location parameters.
The embodiment of the invention provides a data file construction method, an application program updating method, a server device and a client device. When the constructed data file is used for updating the application program installed in the terminal equipment, the data file in the binary data format has higher compression rate, the data file can be acquired from the server only by occupying smaller network resources of the terminal equipment, meanwhile, the position information and the updating content in the binary data format can be directly acquired from the acquired data file, the application program to be updated is updated by using the acquired position information and the updating content, and the corresponding compiling environment does not need to be set in the terminal equipment to compile the acquired data file, so that the resource consumption of the terminal equipment can be reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flowchart of a method for constructing a data file according to an embodiment of the present invention;
FIG. 2 is a flow chart of another method for constructing a data file according to an embodiment of the present invention;
FIG. 3 is a flowchart of an application update method according to an embodiment of the present invention;
FIG. 4 is a flowchart of another method for updating an application according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a client device according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of another client device according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of another client device according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a client device according to another embodiment of the present invention;
fig. 9 is a schematic structural diagram of a server device according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a system for updating an application according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer and more complete, the technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention, and based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without creative efforts belong to the scope of the present invention.
As shown in fig. 1, an embodiment of the present invention provides a method for constructing a data file, which is applied to a server device installed on a server side, and includes:
s1: determining the updating content corresponding to the application program to be updated, and converting the updating content into a binary data format;
s2: determining the position information of the application program to be updated, and converting the position information into a binary data format;
s3: the location information and the update content in binary data format are combined into a data file.
In the above embodiment of the present invention, the update content corresponding to the application program to be updated and the location information of the application program to be updated are converted into the binary data format, and the location information and the update content in the binary data format are combined into the data file. When the constructed data file is used for updating the application program installed in the terminal equipment, the data file in the binary data format has higher compression rate, the data file can be acquired from the server only by occupying smaller network resources of the terminal equipment, meanwhile, the position information and the updating content in the binary data format can be directly acquired from the acquired data file, the application program to be updated is updated by using the acquired position information and the updating content, and the corresponding compiling environment does not need to be set in the terminal equipment to compile the acquired data file, so that the resource consumption of the terminal equipment can be reduced.
Further, when the application installed in the terminal device is updated, the installation path of the application to be updated needs to be determined first, so as to determine the application installed in the terminal device to be updated, and since different applications to be updated have different installation paths, when the installation path is identified by using the binary data chain, the binary data chain may have different data bit lengths. In view of this, in an embodiment of the present invention, the determining the location information of the application to be updated and converting the location information into a binary data format includes:
determining an installation path of the application program to be updated, and converting the installation path into a binary data format;
determining a data bit length parameter of the installation path in a binary data format, and identifying the data bit length parameter by using a first binary data chain with a first set length;
and combining the first binary data chain and the installation path of the binary data format into position information of the binary data format.
For example, after the installation path is converted into the binary data format, the installation path of the binary data format needs to occupy 128 binary data bits, that is, the data bit length parameter is 128, where the data bit length parameter can be identified by using a first binary data chain of a first set length, specifically, taking the first set length as 16 as an example, the first binary data chain for identifying the data bit length parameter may be: 0000000010000000, respectively; and combining 128 binary data bits corresponding to the first binary data chain and the installation path to form the position information in the binary data format. On the contrary, when the application program to be updated installed in the terminal device is updated, the binary data chain with the length of 16 (i.e. the data chain consisting of 16 binary data bits) can be read from the first bit of the data file, and then the installation path with the binary data format of 128 data bits behind the read binary data chain in the data file is determined.
In the above embodiment of the present invention, the binary data chain with the first set length and the installation path with the binary data format are combined to form the location information, instead of directly identifying the installation path by using the binary data chain with the set length, so that an excessive data size corresponding to the location information when the set length is greater than the data bit length parameter of the installation path can be avoided, and the data size of the constructed data file can be reduced.
When an update is performed for an application installed in a terminal device, the update category generally includes upgrade, deletion, and compilation. Wherein, upgrading refers to replacing corresponding data content of the application program to form a new application program; deletion refers to deleting corresponding data content of the application program to form a new application program; compiling refers to creating and inserting data content corresponding to one function module in the application program to form a new application program, or moving the data content corresponding to one function module from a current position to another position to form a new application program. Therefore, for different update categories, embodiments of the present invention specifically provide the following three ways to determine the update content corresponding to the application to be updated, and convert the update content into a binary data format:
implementation mode 1: when the update type is upgrade, that is, corresponding data content in the application program needs to be replaced, the determining of the update content corresponding to the application program to be updated and the converting of the update content into a binary data format include:
determining an update type corresponding to an application program to be updated;
identifying the update category by using a second binary data chain with a second set length;
determining upgrading content and position parameters of the upgrading content corresponding to the application program to be updated;
identifying the position parameter by using a third binary data chain with a third set length, and converting the upgrading content into a binary data format;
and combining the second binary data chain, the third binary data chain and the upgrading content in the binary data format into updating content in the binary data format.
In the above-described implementation 1, the second set length may be 2; for example, when the update category is upgrade, it can be identified using binary data chain 01; when the update category is delete, it can be identified using the binary data chain 10; when the update category is compiled, it can be identified using the binary data chain 11. The updating category is identified only by using the binary data chain with the length of 2, so that the data volume of the data file can be reduced; of course, other lengths of binary data chains may be utilized to identify update categories, where possible.
In the foregoing implementation manner 1, the position parameter corresponding to the upgrade content may be a start position and an end position corresponding to the data content to be replaced by the upgrade content in the application program to be updated. For example, after the application program is installed in the terminal device, the application program is usually stored directly on a non-volatile storage medium (e.g., a hard disk) of the terminal device in a storage manner of a binary data chain, and assuming that the data content between the nth data bit and the mth data bit in the binary data chain of the application program to be updated is the data content to be replaced by the upgrade content, the location parameters may include a start location n +1 and an end location m-1. Specifically, taking the third set length of 48 as an example, the starting position n +1 and the ending position m-1 can be identified by 24 binary data bits respectively, and the 24 binary data bits corresponding to the starting position n +1 and the ending position m-1 are combined into a third binary data chain including 48 data bits.
In the implementation mode 1, in order to improve the working efficiency, when the application program to be updated is targeted, the data content carried in the data file can be immediately available and ready to use, the upgrade content in the binary data format can be located behind the third binary data chain corresponding to the position parameter, and the upgrade content of the data file can also carry an end identifier; for example, a binary data chain corresponding to a designated symbol such as a space character or a line feed character may be used as the end identifier. For example, assume that the end identifier "/", "/" takes 8 data bits and its corresponding binary data chain is: 00000000, after the upgrade content in binary data format, a binary data chain 00000000 may be carried. Therefore, two adjacent updating contents are separated by using the binary data chain corresponding to the ending identifier, so that the same data file carries a plurality of updating contents.
Implementation mode 2: when the update type is deletion, that is, when the corresponding data content in the application program needs to be deleted, the update content corresponding to the application program to be updated is determined, and the update content is converted into a binary data format, including:
determining an update category corresponding to an application program to be updated, wherein the update category comprises: any of upgrade, delete, or compile;
identifying the update category by using a second binary data chain with a second set length;
determining a position parameter of the data to be deleted corresponding to the application program to be updated;
identifying the position parameter by using a fourth binary data chain with a fourth set length;
and combining the second binary data chain and the fourth binary data chain into the updating content in the binary data format.
In the implementation 2, the location parameter of the data to be deleted corresponding to the application program to be updated may be a corresponding start location and end location of the data to be deleted in the application program to be updated, and the method for identifying the location parameter by using the binary data chain table may be similar to the method for identifying the location parameter by using the third binary data chain in the implementation 1. Meanwhile, after deleting the binary data chain corresponding to the location parameter of the content, the binary data chain corresponding to the end identifier may be carried, similarly to the above-described embodiment.
Implementation mode 3: when the update type is compiled, that is, when a data content corresponding to a functional module needs to be newly created and inserted in the application program to be updated to form a new application program, or when a data content corresponding to a functional module needs to be moved from a current location to another location to form a new application program, the determining of the update content corresponding to the application program to be updated and the converting of the update content into a binary data format includes:
determining an update category corresponding to an application program to be updated, wherein the update category comprises: any of upgrade, delete, or compile;
identifying the update category by using a second binary data chain with a second set length;
determining a position parameter of a geometry to be formed corresponding to the application program to be updated, and identifying the position parameter by using a fifth binary data chain with a fifth set length;
determining a compiling type of a geometry to be formed, and identifying the compiling type by utilizing a sixth binary data chain with a sixth set length; wherein the compilation type comprises rebuild or build;
and generating the updating content in the binary data format according to the compiling type.
In the above implementation 3, the geometry to be formed corresponds to the location parameter in the application to be updated, and may correspond to two adjacent locations; for example, in the binary data chain of the application to be updated, the geometry to be formed needs to be inserted after the nth data bit, and then the position parameter may include a start position n and an end position n + 1. The method of identifying the location parameter by using the binary data chain is similar to the method of identifying the location parameter by using the third binary data chain in the above-described manner 1.
In the implementation 3, when the update type is compilation, the geometry to be formed may include two compilation types, i.e., rebuilding and building, where rebuilding refers to newly building and inserting data content corresponding to one function module in the application program to be updated to form a new application program; the building refers to moving the data content corresponding to one functional module already existing in the application program to be updated from the current position to other positions. Here, an embodiment of the present invention specifically provides a method for generating an update content in a binary data format according to a compilation type when the compilation type is a reconstruction case and a build case, respectively:
the first condition is as follows: when the compilation type is rebuild. The generating of the update content in the binary data format according to the compilation type includes: determining the type of a geometric body to be formed and definition information of the geometric body to be formed; identifying the type of the geometric body to be formed by utilizing a seventh binary data chain with a seventh set length, and converting the definition information into a binary data format; and combining the second binary data chain, the fifth binary data chain, the sixth binary data chain, the seventh binary data chain and the definition information of the binary data format into the update content of the binary data format.
Here, the type of the geometry to be formed specifically refers to an organization structure between a plurality of sub-modules under the geometry to be formed (functional modules), and the definition information of the geometry to be formed refers to a binary data chain corresponding to each letter block of the geometry to be formed.
Case two: when the compilation type is a build. The generating of the update content in the binary data format according to the compilation type includes: determining a mark position parameter of the geometry to be formed corresponding to the application program to be updated, and identifying the mark position parameter by using an eighth binary data chain with an eighth set length; combining the updated content in binary data format using the second, sixth, eighth, and fifth binary data chains.
Here, the mark position parameter of the geometric object to be formed may be specifically a start position and an end position corresponding to data content to be moved in the application program to be updated, and meanwhile, the method for identifying the position parameter by using the binary data chain may be similar to the method for identifying the position parameter by using the third binary data chain in implementation mode 1.
It should be understood that, similar to the above embodiment, the binary data chain corresponding to the ending identifier can be carried after the binary data chain corresponding to the information is compiled, and can be carried after the binary data chain corresponding to the tag location parameter.
In order to more clearly illustrate the technical solution of the embodiment of the present invention, the construction of an alternative example for the specified data content in the application program to be updated may include the following steps:
step 201, determining an installation path of an application program to be updated, and converting the installation path into a binary data format.
Here, the installation path may be specifically composed of a combination of the name of the application to be updated and its relative path starting from the installation directory in the terminal device. For example, the name of the application program to be updated is document, and the relative path of the application program to be updated starting with the installation directory in the terminal device is C \ ProgramFiles, the installation path can be determined as C \ ProgrammFiles \ document, and then C \ ProgrammFiles \ document is converted into a binary data format.
Step 202, determining a data bit length parameter of an installation path of a binary data format, and identifying the data bit length parameter by using a first binary data chain with a first set length.
For example, after C: \ Programfiles \ document is converted into a binary data format, the installation path of the binary data format is 128 data bits, and the data bit length parameter can be determined to be 128; taking the first set length of 16 as an example, the first binary data chain for identifying the data bit length parameter may be: 0000000010000000.
and step 203, combining the first binary data chain and the installation path of the binary data format into position information of the binary data format.
Here, when the first binary data chain and the 128 binary data bits corresponding to the installation path are combined, the 128 data bits corresponding to the installation path of the binary data format may be placed after the first binary data chain of the first set length of 16.
Step 204, determining the update type of the application program to be updated.
The embodiment of the present invention only takes the update category as an example for upgrading, and certainly, other update categories such as deletion, compilation, and the like may also be included.
Step 205, identify the update category by using a second binary data chain with a second set length.
For example, the update category "upgrade" can be identified here by a second binary data chain 01 of a second set length of 2.
Step 206, determining the upgrade content and the corresponding location parameter in the application to be updated.
In the embodiment of the invention, the upgrade content is used for replacing the data content corresponding to the position parameter in the application program to be updated, and the data parameter comprises the starting position m-1 and the ending position n +1, which is taken as an example, to represent that the data content corresponding to m-n data bits between the starting position m-1 and the ending position n +1 in the application program to be updated needs to be replaced.
And step 207, identifying the position parameter by using a third binary data chain with a third set length, and converting the upgrade content into a binary data format.
Here, taking the third set length as 48 as an example, the starting position n and the ending position m can be respectively identified by 24 binary data bits, and the 24 binary data bits corresponding to the starting position n and the ending position m are combined into a third binary data chain including 48 data bits.
And step 208, combining the second binary data chain, the third binary data chain and the upgrading content in the binary data format into the updating content in the binary data format.
Here, the second binary data chain, the third binary data chain, and the upgrade contents of the binary data format may be combined in order to form the update contents of the binary data format.
In step 209, the location information and the updated content in binary data format are combined into a data file.
As shown in fig. 3, an embodiment of the present invention provides a method for updating an application program, which is applied to a client device installed on a terminal device side, and includes:
step 301, acquiring a data file corresponding to an application program to be updated;
step 302, obtaining the position information in the binary data format from the data file, and obtaining the updating content in the binary data format from the data file;
and 303, performing corresponding service processing on the application program to be updated by using the update content in the binary data format according to the position information in the binary data format.
In the above embodiment of the present invention, because the data file in the binary data format has a higher compression rate, the data file corresponding to the application program to be updated can be acquired from the server or other network devices only by occupying a smaller network resource of the terminal device; meanwhile, the position information and the updating content in the binary data format can be directly acquired from the acquired data file, the application program to be updated is updated by using the acquired position information and the updating content, and a corresponding compiling environment does not need to be set in the terminal equipment to compile the acquired data file; the resource consumption of the terminal equipment can be reduced.
Further, in order to accurately obtain the installation path of the application program to be updated, in an embodiment of the present invention, the obtaining the location information in the binary data format from the data file includes:
sequentially reading binary data chains with a first set length from a first data bit of the data file;
determining a data bit length parameter according to the binary data chain with the first set length;
reading the binary data chain corresponding to the data bit length parameter from the next bit of the binary data chain with the first set length in the data file;
and determining the installation path of the application program to be updated according to the binary data chain corresponding to the data bit length parameter.
For example, starting from the first data bit of the data file, a first binary data chain of a set length of 16 is read: 0000000010000000, the data bit length parameter is determined to be 128 according to the binary data chain, then the binary data chain with the length of 128 can be read from the 17 th bit of the data file, and since the read binary data chain with the length of 128 is the binary data representation format of the installation path, the installation path of the application program to be updated can be determined according to the read binary data chain with the length of 128.
Further, because the update types carried by the update content are different, the data organization structure of the update content is also different, and for the three update types of update, such as update, delete, and compile, the embodiment of the present invention specifically provides the following three implementation manners to achieve obtaining the update content in the binary data format from the data file:
the implementation mode A is as follows: when the update type is upgrade, that is, when the corresponding data content in the application program needs to be replaced, the obtaining of the update content in the binary data format from the data file includes:
reading a binary data chain with a second set length from the next bit of the binary data chain corresponding to the data bit length parameter in the data file;
determining an updating type according to the binary data chain with the second set length;
reading a binary data chain with a third set length from the next bit of the binary data chain with the second set length in the data file;
determining a position parameter according to the binary data chain with the third set length;
reading the binary data chain corresponding to the upgrading content from the next bit of the binary data chain with the third set length in the data file;
and determining the upgrading content according to the read binary data chain corresponding to the upgrading content.
Correspondingly, in an embodiment of the present invention, the performing, according to the location information in the binary data format, corresponding service processing on the application program to be updated by using the update content in the binary data format includes: and determining the application program to be updated according to the installation path, and replacing the data content corresponding to the position parameter in the application program to be updated by using the upgrading content.
In the above embodiment, when it is determined that the update type is the update, that is, only the corresponding data content in the application program to be updated needs to be replaced, the update content in the binary data format, such as the update content and the corresponding location parameter, may be determined from the acquired data file, then the application program to be updated in the terminal device is determined according to the installation path of the application program to be updated, and then the data content corresponding to the location parameter in the determined application program to be updated is replaced with the update content. It should be understood that the application program to be updated is determined according to the installation path, that is, a binary data chain corresponding to the application program to be updated stored on the nonvolatile storage medium of the terminal device is determined according to the installation path. For example, after the binary data chain of the application program to be updated is determined, assuming that the position parameters corresponding to the upgrade content are n and m, the data content between the (n + 1) th data bit and the (m-1) th data bit in the binary data chain of the application program to be updated can be removed, and the upgrade content in the binary data format is filled between the (n + 1) th data bit and the (m-1) th data bit to form a new application program, so as to update the application program to be updated.
The implementation mode B is as follows: when the update type is deletion, that is, when the corresponding data content in the application program needs to be deleted, the obtaining of the update content in the binary data format from the data file includes:
reading a binary data chain with a second set length from the next bit of the binary data chain corresponding to the data bit length parameter in the data file;
determining an updating type according to the binary data chain with the second set length;
reading a binary data chain with a fourth set length from the next bit of the binary data chain with the second set length in the data file;
and determining a position parameter according to the binary data chain with the fourth set length.
Correspondingly, in an embodiment of the present invention, the performing, according to the location information in the binary data format, corresponding service processing on the application program to be updated by using the update content in the binary data format includes: and determining the application program to be updated according to the installation path, and deleting the data content corresponding to the position parameter in the determined application program to be updated.
In the above embodiment, when it is determined that the update type is deletion, that is, only the corresponding data content in the application program to be updated needs to be deleted, the location parameter corresponding to the data to be deleted may be determined from the acquired data file, then the application program to be updated in the terminal device is determined according to the installation path of the application program to be updated, and then the data content corresponding to the location parameter in the application program to be updated is deleted. For example, after the binary data chain of the application program to be updated in the terminal device is determined, assuming that the position parameters corresponding to the data to be deleted are n and m, the data content between the (n + 1) th data bit and the (m-1) th data bit can be removed to form a new application program, and the application program to be updated is updated.
The implementation mode C is as follows: when the update type is compiled, that is, when a new data content corresponding to a functional module needs to be created and inserted in the application program to be updated to form a new application program, or when a data content corresponding to a functional module needs to be moved from a current location to another location to form a new application program, the obtaining of the update content in the binary data format from the data file includes:
reading a binary data chain with a second set length from the next bit of the binary data chain corresponding to the data bit length parameter in the data file;
determining an updating type according to the binary data chain with the second set length;
reading a binary data chain with a fifth set length from the next bit of the binary data chain with the second set length in the data file;
determining a position parameter according to the binary data chain with the fifth set length;
reading a binary data chain with a sixth set length from the next bit of the binary data chain with the fifth set length in the data file;
determining a compiling type according to the binary data chain with the sixth set length;
and determining corresponding information according to the determined compiling type and the data file.
In the above embodiment of the present invention, since the compiling types may generally include rebuilding and building, when the compiling types are different, the organization structures of the updated contents are also different; specifically, when the compiling type is rebuilding, the data file needs to carry the type and definition information of the geometry to be formed, and when the compiling type is building, the data file needs to carry the mark position parameter of the geometry to be formed corresponding to the application program to be updated. Here, an embodiment of the present invention specifically provides a method for determining corresponding information according to a determined compilation type and a data file when the compilation type is a reconstruction case and a build case, respectively:
case a: when the compilation type is rebuild. The determining corresponding information according to the determined compiling type and the data file comprises: reading a binary data chain with a seventh set length from the next bit of the binary data chain with the sixth set length in the data file; determining the type of the geometric body to be formed according to the binary data chain with the seventh set length; reading a binary data chain with an eighth set length from the next bit of the binary data chain with the seventh set length in the data file; and determining definition information of a geometric body to be formed according to the binary data chain with the eighth set length.
Correspondingly, in an embodiment of the present invention, the performing, according to the location information in the binary data format, corresponding service processing on the application program to be updated by using the update content in the binary data format includes: loading the application program to be updated to a data space of the terminal equipment according to the installation path; constructing a geometric body to be formed according to the type and the definition information of the geometric body to be formed; according to the position parameters, the built geometric body to be formed is assembled into the application program to be updated loaded into the data space.
Case B: when the compilation type is a build. The determining corresponding information according to the determined compiling type and the data file comprises: reading a binary data chain with an eighth set length from the next bit of the binary data chain with the sixth set length in the data file; and determining a mark position parameter according to the binary data chain with the eighth set length.
Correspondingly, in an embodiment of the present invention, the performing, according to the location information in the binary data format, corresponding service processing on the application program to be updated by using the update content in the binary data format includes: loading the application program to be updated to a data space of the terminal equipment according to the installation path; determining the geometry to be formed in the data space according to the mark position parameters; moving the determined geometry to be formed within the data space according to the location parameters.
In order to more clearly describe the technical solution of the embodiment of the present invention, the data file constructed by the technical solution provided by the above embodiment of the present invention is acquired, and for the application program to be updated installed in the terminal device, an example of replacing the specified data content of the application program to be updated by using the acquired data file may include the following steps:
step 401, acquiring a data file corresponding to the application program to be updated.
In the embodiment of the invention, on one hand, the acquired data file is in a binary data format, and the acquired data file can be identified without setting corresponding compiling in the terminal equipment to compile the acquired data file, so that the compiling environment is prevented from occupying a large amount of resources of the terminal equipment. On the other hand, the data file can be acquired from the corresponding server through the network, the data file is in a binary data format, the data file in the binary data format has high compression rate, the data file can be acquired from the server only by occupying small network resources of the terminal equipment, and the network resource consumption of the terminal equipment is further reduced. On the other hand, the data file in the binary data format can well control the structure and the data content of the application program to be updated, the data file only needs to carry the upgrade content, the position parameter of the upgrade content corresponding to the application program to be updated, the position information of the application program to be updated and the like, and does not need to carry the iterative version (namely, a new version of the application program) corresponding to the application program to be updated, so that the data volume of the obtained data file is further reduced, and the network resource consumption of the terminal equipment can be further reduced.
Step 402, reading binary data chains with a first set length sequentially from a first data bit of the data file.
Step 403, determining a data bit length parameter according to the binary data chain with the first set length.
Step 404, reading the binary data chain corresponding to the data bit length parameter from the next bit of the binary data chain with the first set length in the data file.
Step 405, determining the installation path of the application program to be updated according to the binary data chain corresponding to the data bit length parameter.
For example, when the first set length is 16, the read binary data chain of length 16 is 0000000010000000, the data bit length parameter can be determined to be 128. Then, starting from the 17 th bit of the data file, a binary data chain of length 128, which is a binary data representation format of the installation path, is read, and thus, from the read binary data chain of length 128, the installation path of the application to be updated can be determined.
Step 406, reading the binary data chain with the second set length from the next bit of the binary data chain corresponding to the data bit length parameter in the data file.
Step 407, determine the update type according to the binary data chain with the second set length.
Here, for example, the second set length is 2, that is, a binary data chain with a length of 2 is read from 145 bits of the data file, and the update type can be determined according to the read binary data chain with a length of 2. For example, when the read binary data chain is 01, the update category may be determined to be upgrade; when the read binary data chain is 10, the update category can be determined to be deletion; when the binary data chain read is 11, the update category may be determined to be compiled.
In the following steps of the present invention, only upgrading when updating the category is taken as an example.
Step 408, reading the binary data chain with the third set length from the next bit of the binary data chain with the second set length in the data file.
Step 409, determining the position parameter according to the binary data chain with the third set length.
Taking the third set length of 48 as an example, a binary data chain with a length of 48 may be read from the 147 th bit of the data file, assuming that the representation manner of the position parameter includes a start position and an end position, and the start position and the end position are respectively identified by the binary data chain with a length of 24, where the start position is n and the end position is m; then the first 24 bits of the read 48-length binary data chain can be used to identify the starting position n and the last 24 bits can be used to represent the ending position m.
It should be understood that the start position n and the end position m refer to the corresponding start position and end position of the data content to be replaced in the application to be updated, which is installed in the terminal device.
Step 410, reading the binary data chain corresponding to the upgrade content from the next bit of the binary data chain with the third set length in the data file.
It should be understood that, when the same data file includes a plurality of update categories and location parameters, upgrade contents, etc. corresponding to the current update category. Here, the upgrade content may also be followed by an end identifier. For example, the data file may utilize a binary data chain corresponding to a given symbol, such as two consecutive space characters or line breaks, as the ending identifier. Specifically, for example, assume that the end identifier "/", "/" takes 8 data bits, and its corresponding binary data chain is: 00000000, after the upgrade content in binary data format, a binary data chain 00000000 may be carried. Therefore, two adjacent updating contents are separated by using the binary data chain corresponding to the ending identifier, and the purpose that the same data file carries a plurality of updating contents can be realized.
Correspondingly, when reading the binary data chain corresponding to the upgrade content, the corresponding end identifier needs to be read all the time. Of course, if there is a binary data chain after the identifier is ended, after the following steps 411 to 413 are performed, it is further required to continue reading the binary data chain with the length of 2, and determine the compiling type according to the read data chain to perform corresponding service processing. Specifically, if the determined compilation type is upgrade, it is necessary to continue executing similar contents to those of the above-described steps 406 to 409.
Step 411, determining the upgrade content according to the read binary data chain corresponding to the upgrade content.
And step 412, determining the application program to be updated installed in the terminal equipment according to the installation path.
And step 413, replacing the data content corresponding to the location parameter in the determined application program to be updated with the upgrade content.
It should be noted that, because the application program to be updated installed in the terminal device is usually stored in a nonvolatile storage medium (e.g., a hard disk) of the terminal device in a binary data format, for updating and deleting two update categories, it is not necessary to change data contents corresponding to other functional modules in the application program to be updated, and the application program to be updated can be updated by directly reading and writing the binary data in the nonvolatile storage medium. However, when the update type is compiled, no matter the position of the data content corresponding to one functional module in the application program to be updated is moved, or the data content corresponding to a new functional module is newly created and inserted, interference may be caused to the data content corresponding to other functional modules in the application program to be updated, and therefore, the application program to be updated needs to be loaded into the data space (i.e., the memory) of the terminal device according to the installation path of the application program to be updated, and then the data content corresponding to the corresponding functional module is newly created and inserted in the application program to be updated is executed, or the position of the data content corresponding to the functional module already existing in the application program to be updated is moved.
As shown in fig. 5, an embodiment of the present invention provides a client apparatus, installed in a terminal device, including:
an obtaining module 501, configured to obtain a data file corresponding to an application program to be updated;
a data reading module 502, configured to obtain location information in a binary data format from the data file, and obtain update content in the binary data format from the data file;
the update processing module 503 is configured to perform corresponding service processing on the application program to be updated by using the update content in the binary data format according to the location information in the binary data format.
As shown in fig. 6, in an embodiment of the present invention, the data reading module 502 includes: a first reading unit 5021, a first determining unit 5022, a second reading unit 5023, and a second determining unit 5024;
the first reading unit 5021 is configured to sequentially read a binary data chain with a first set length from a first data bit of the data file;
the first determining unit 5022 is configured to determine a data bit length parameter according to the binary data chain with the first set length;
the second reading unit 5023 is configured to read the binary data chain corresponding to the data bit length parameter from the next bit of the binary data chain with the first set length in the data file;
the second determining unit 5024 is configured to determine an installation path of the application to be updated according to the binary data chain corresponding to the data bit length parameter.
Further, in an embodiment of the present invention, the data reading module 502 further includes: a third reading unit 5025, a third determining unit 5026, a fourth reading unit 5027, a fourth determining unit 5028, a fifth reading unit 5029, and a fifth determining unit 50210; wherein,
the third reading unit 5025 is configured to read a binary data chain with a second set length from the next bit of the binary data chain corresponding to the data bit length parameter in the data file;
the third determining unit 5026 is configured to determine an update category according to the binary data chain with the second set length;
the fourth reading unit 5027 is configured to read a binary data chain of a third set length from the next bit of the binary data chain of the second set length in the data file;
the fourth determining unit 5028 is configured to determine a position parameter according to the binary data chain with the third set length;
the fifth reading unit 5029 is configured to read the binary data chain corresponding to the upgrade content from the next bit of the binary data chain with the third set length in the data file;
the fifth determining unit 50210 is configured to determine the upgrade content according to the read binary data chain corresponding to the upgrade content;
the update processing module 503 is configured to determine the application program to be updated according to the installation path, and replace the data content corresponding to the location parameter in the application program to be updated with the upgrade content;
further, as shown in fig. 7, in an embodiment of the present invention, the data reading module 502 further includes: a third reading unit 5025, a third determining unit 5026, a sixth reading unit 50211, and a sixth determining unit 50212; wherein,
the third reading unit 5025 is configured to read a binary data chain with a second set length from the next bit of the binary data chain corresponding to the data bit length parameter in the data file;
the third determining unit 5026 is configured to determine an update category according to the binary data chain with the second set length;
the sixth reading unit 50211 is configured to read a binary data chain of a fourth set length from a next bit of the binary data chain of the second set length in the data file;
the sixth determining unit 50212 is configured to determine a position parameter according to the binary data chain with the fourth set length;
the update processing module 503 is configured to determine the application program to be updated according to the installation path, and delete the data content corresponding to the location parameter in the determined application program to be updated.
Further, as shown in fig. 8, in an embodiment of the present invention, the data reading module 502 further includes: a third reading unit 5025, a third determining unit 5026, a seventh reading unit 50213, a seventh determining unit 50214, an eighth reading unit 50215, an eighth determining unit 50216, and a processing unit 50217; wherein,
the third reading unit 5025 is configured to read a binary data chain with a second set length from the next bit of the binary data chain corresponding to the data bit length parameter in the data file;
the third determining unit 5026 is configured to determine an update category according to the binary data chain with the second set length;
the seventh reading unit 5023 is configured to read a binary data chain of a fifth set length from the next bit of the binary data chain of the second set length in the data file;
the seventh determining unit 50214 is configured to determine a position parameter according to the binary data chain with the fifth set length;
the eighth reading unit 50215 is configured to read a binary data chain of a sixth set length from the next bit of the binary data chain of the fifth set length in the data file;
the eighth determining unit 50216 is configured to determine a compiling type according to the binary data chain with the sixth set length;
the processing unit 50217 is configured to determine corresponding information according to the determined compiling type and the data file.
Specifically, in order to implement adding a new geometry in the application to be updated, in an embodiment of the present invention, the processing unit 50217 includes: the reading device comprises a first reading subunit, a first determining subunit, a second reading subunit and a second determining subunit; wherein,
the first reading subunit is configured to read a binary data chain of a seventh set length from a next bit of the binary data chain of the sixth set length in the data file;
the first determining subunit is configured to determine, according to the binary data chain with the seventh set length, a type of a geometric body to be formed;
the second reading subunit is configured to read a binary data chain of an eighth set length from a next bit of the binary data chain of the seventh set length in the data file;
the second determining subunit is configured to determine, according to the binary data chain of the eighth set length, definition information of a geometric solid to be formed;
the update processing module 502 is configured to load the application program to be updated to the data space of the terminal device according to the installation path; constructing a geometric body to be formed according to the type and the definition information of the geometric body to be formed; according to the position parameters, the built geometric body to be formed is assembled into the application program to be updated loaded into the data space;
specifically, in order to implement moving a geometry in an application to be updated, in an embodiment of the present invention, the processing unit 50217 includes: a third reading subunit and a third determining subunit; wherein,
the third reading subunit is configured to read a binary data chain of an eighth set length from a next bit of the binary data chain of the sixth set length in the data file;
the third determining subunit is configured to determine a mark position parameter according to the binary data chain of the eighth set length;
the update processing module 503 is configured to load the application program to be updated to the data space of the terminal device according to the installation path; determining the geometry to be formed in the data space according to the mark position parameters; moving the determined geometry to be formed within the data space according to the location parameters.
As shown in fig. 9, an embodiment of the present invention provides a server apparatus, including:
a first processing module 901, configured to determine an update content corresponding to an application program to be updated, and convert the update content into a binary data format;
a second processing module 902, configured to determine location information of the application to be updated, and convert the location information into a binary data format;
a third processing module 903, configured to combine the location information and the update content in a binary data format into a data file.
In an embodiment of the present invention, the second processing module 902 includes: the device comprises a path determining unit, a first identification processing unit and a first combination processing unit; wherein,
the path determining unit is used for determining an installation path of the application program to be updated and converting the installation path into a binary data format;
the first identification processing unit is used for determining a data bit length parameter of the installation path in a binary data format and identifying the data bit length parameter by using a first binary data chain with a first set length;
the first combination processing unit is configured to combine the first binary data chain and the installation path in the binary data format into position information in the binary data format.
In an embodiment of the present invention, the first processing module 901 includes: the device comprises an update type determining unit, a second identification processing unit, a first position parameter determining unit, a third identification processing unit and a second combining unit; wherein,
an update category determination unit, configured to determine an update category corresponding to an application to be updated, where the update category includes: any of upgrade, delete, or compile;
the second identification processing unit is used for identifying the updating category by using a second binary data chain with a second set length;
the first position parameter determining unit is used for determining the upgrading content and the position parameter of the upgrading content corresponding to the application program to be updated;
the third identification processing unit is used for identifying the position parameter by using a third binary data chain with a third set length and converting the upgrading content into a binary data format;
and the second combination processing unit is used for combining the second binary data chain, the third binary data chain and the upgrading content in the binary data format into updating content in the binary data format.
In an embodiment of the present invention, the first processing module 901 includes: the device comprises an update type determining unit, a second identification processing unit, a second position parameter determining unit, a fourth identification processing unit and a third combined processing unit; wherein,
an update category determination unit, configured to determine an update category corresponding to an application to be updated, where the update category includes: any of upgrade, delete, or compile;
the second identification processing unit is used for identifying the updating category by using a second binary data chain with a second set length;
the second position parameter determining unit is used for determining the position parameter of the data to be deleted corresponding to the application program to be updated;
the fourth identification processing unit is used for identifying the position parameter by using a fourth binary data chain with a fourth set length;
and the third combination processing unit is used for combining the updated content in the binary data format by using the second binary data chain and the fourth binary data chain.
In an embodiment of the present invention, the first processing module 901 includes: the device comprises an updating type determining unit, a second identification processing unit, a third position parameter determining unit, a compiling type determining unit and a fourth combination processing unit; wherein,
the update type determining unit is configured to determine an update type corresponding to an application program to be updated, where the update type includes: any of upgrade, delete, or compile;
the second identification processing unit is used for identifying the update category by using a second binary data chain with a second set length;
the third position parameter determining unit is configured to determine a position parameter of the geometry to be formed corresponding to the application program to be updated, and identify the position parameter by using a fifth binary data chain of a fifth set length;
the compiling type determining unit is used for determining the compiling type of the geometry to be formed and identifying the compiling type by utilizing a sixth binary data chain with a sixth set length; wherein the compilation type comprises rebuild or build;
and the fourth combined processing unit is used for generating the updating content in the binary data format according to the compiling type.
Specifically, in an embodiment of the present invention, the fourth combined processing unit is configured to determine a type of a geometry to be formed and definition information of the geometry to be formed when the compiling type is reconstruction; identifying the type of the geometric body to be formed by utilizing a seventh binary data chain with a seventh set length, and converting the definition information into a binary data format; combining the second binary data chain, the fifth binary data chain, the sixth binary data chain, the seventh binary data chain and the definition information of the binary data format into an update content of the binary data format; or, when the compilation type is the build, determining a mark position parameter of the geometry to be formed corresponding to the application program to be updated, and identifying the mark position parameter by using an eighth binary data chain with an eighth set length; combining the updated content in binary data format using the second, sixth, eighth, and fifth binary data chains.
As shown in fig. 10, an embodiment of the present invention provides a system for updating an application program, including:
the server device 90 provided in any embodiment of the present invention, and the client device 40 provided in any embodiment of the present invention; wherein,
the server device 90 is installed in a server; the client apparatus 40 is installed in a terminal device; the server is connected with the terminal equipment.
Because the information interaction, execution process, and other contents between the units in the device are based on the same concept as the method embodiment of the present invention, specific contents may refer to the description in the method embodiment of the present invention, and are not described herein again.
In summary, the embodiments of the present invention have at least the following advantages:
1. in an embodiment of the present invention, the update content corresponding to the application program to be updated and the location information of the application program to be updated are converted into binary data formats, and the location information and the update content in the binary data formats are combined into a data file. When the constructed data file is used for updating the application program installed in the terminal equipment, the data file in the binary data format has higher compression rate, the data file can be acquired from the server only by occupying smaller network resources of the terminal equipment, meanwhile, the position information and the updating content in the binary data format can be directly acquired from the acquired data file, the application program to be updated is updated by using the acquired position information and the updating content, and the corresponding compiling environment does not need to be set in the terminal equipment to compile the acquired data file, so that the resource consumption of the terminal equipment can be reduced.
2. In an embodiment of the present invention, when the client device installed on the terminal device acquires the data file from the server device installed on the server side through the network, the data file only needs to carry the location information and the update content of the application program to be updated, and the client device can perform corresponding service processing on the application program to be updated installed in the terminal device according to the location information and the update content. The installation file corresponding to the iterative version of the application program to be updated does not need to be obtained, so that the quantity of data transmitted between the terminal equipment and the server is small, and the network resource consumption of the terminal equipment can be reduced.
3. In an embodiment of the present invention, the data file carries an installation path in a binary data format of the application program to be updated and a data bit length parameter of the installation path in the binary data format, and when the application program to be updated installed in the terminal device is updated, the data bit length parameter of the installation path can be determined according to the data file, the installation path can be determined according to the determined data bit length parameter, and the automatic update of the application program to be updated installed in the terminal device can be performed by using the update content carried by the data file according to the determined installation path without manual intervention.
4. In an embodiment of the present invention, in a data file, after a binary data chain corresponding to an upgrade content, after a binary data chain corresponding to a position parameter of a delete content, after a binary data chain corresponding to a compilation information, and after a binary data chain corresponding to a mark position parameter are located, the binary data chain corresponding to an end identifier may be carried, after the binary data chain corresponding to the end identifier is ended, a new update content may be added, and two adjacent update contents are separated by using the binary data chain corresponding to the end identifier, thereby implementing that a plurality of update contents are carried in the same data file.
5. In an embodiment of the invention, the binary data chain with the first set length and the installation path with the binary data format are combined into the position information, rather than the binary data chain with the set length is directly used for identifying the installation path, so that the phenomenon that the data volume corresponding to the position information is too large when the set length is greater than the data bit length parameter of the installation path can be avoided, and the data volume of the constructed data file can be reduced.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, the inclusion of an element by the phrase "comprising a" does not exclude the presence of other similar elements in a process, method, article, or apparatus that comprises the element.
Finally, it is to be noted that: the above description is only a preferred embodiment of the present invention, and is only used to illustrate the technical solutions of the present invention, and not to limit the protection scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. A method for constructing a data file, which is applied to a server device installed on one side of a server, comprises the following steps:
determining the updating content corresponding to the application program to be updated, and converting the updating content into a binary data format;
determining the position information of the application program to be updated, and converting the position information into a binary data format;
the location information and the update content in binary data format are combined into a data file.
2. The method of constructing a data file according to claim 1,
the determining the location information of the application program to be updated and converting the location information into a binary data format includes:
determining an installation path of the application program to be updated, and converting the installation path into a binary data format;
determining a data bit length parameter of the installation path in a binary data format, and identifying the data bit length parameter by using a first binary data chain with a first set length;
and combining the first binary data chain and the installation path of the binary data format into position information of the binary data format.
3. The method of constructing a data file according to claim 1,
the determining of the update content corresponding to the application program to be updated and the converting of the update content into a binary data format include:
determining an update category corresponding to an application program to be updated, wherein the update category comprises: any of upgrade, delete, or compile;
identifying the update category by using a second binary data chain with a second set length;
when the update category is upgrade, executing A1 to A3:
a1: determining upgrading content and position parameters of the upgrading content corresponding to the application program to be updated;
a2: identifying the position parameter by using a third binary data chain with a third set length, and converting the upgrading content into a binary data format;
a3: combining the second binary data chain, the third binary data chain and the upgrading content in the binary data format into updating content in the binary data format;
or,
when the update category is delete, executing B1-B3:
b1: determining a position parameter of the data to be deleted corresponding to the application program to be updated;
b2: identifying the position parameter by using a fourth binary data chain with a fourth set length;
b3: combining the second binary data chain and the fourth binary data chain into updated content in a binary data format;
or,
when the update category is compiled, C1-C3 are executed:
c1: determining a position parameter of a geometry to be formed corresponding to the application program to be updated, and identifying the position parameter by using a fifth binary data chain with a fifth set length;
c2: determining a compiling type of a geometry to be formed, and identifying the compiling type by utilizing a sixth binary data chain with a sixth set length; wherein the compilation type comprises rebuild or build;
c3: generating updating content in a binary data format according to the compiling type;
wherein,
when the compilation type is rebuild, the C3 includes: determining the type of a geometric body to be formed and definition information of the geometric body to be formed; identifying the type of the geometric body to be formed by utilizing a seventh binary data chain with a seventh set length, and converting the definition information into a binary data format; combining the second binary data chain, the fifth binary data chain, the sixth binary data chain, the seventh binary data chain and the definition information of the binary data format into an update content of the binary data format;
when the compilation type is build, the C3 includes: determining a mark position parameter of the geometry to be formed corresponding to the application program to be updated, and identifying the mark position parameter by using an eighth binary data chain with an eighth set length; combining the updated content in binary data format using the second, sixth, eighth, and fifth binary data chains.
4. A method for updating an application program, applied to a client device installed on a terminal device side, comprising:
acquiring a data file corresponding to an application program to be updated;
acquiring position information in a binary data format from the data file, and acquiring updating content in the binary data format from the data file;
and performing corresponding service processing on the application program to be updated by using the updating content in the binary data format according to the position information in the binary data format.
5. The method for updating an application according to claim 4,
the acquiring the position information in the binary data format from the data file includes:
sequentially reading binary data chains with a first set length from a first data bit of the data file;
determining a data bit length parameter according to the binary data chain with the first set length;
reading the binary data chain corresponding to the data bit length parameter from the next bit of the binary data chain with the first set length in the data file;
and determining the installation path of the application program to be updated according to the binary data chain corresponding to the data bit length parameter.
6. The method for updating an application according to claim 5,
the obtaining of the update content in the binary data format from the data file includes:
reading a binary data chain with a second set length from the next bit of the binary data chain corresponding to the data bit length parameter in the data file;
determining an updating type according to the binary data chain with the second set length;
when the update category is upgrade, executing a1 to a 4:
a 1: reading a binary data chain with a third set length from the next bit of the binary data chain with the second set length in the data file;
a 2: determining a position parameter according to the binary data chain with the third set length;
a 3: reading the binary data chain corresponding to the upgrading content from the next bit of the binary data chain with the third set length in the data file;
a 4: determining the upgrading content according to the read binary data chain corresponding to the upgrading content;
then, the performing, according to the location information in the binary data format, corresponding service processing on the application program to be updated by using the update content in the binary data format includes: determining the application program to be updated according to the installation path, and replacing the data content corresponding to the position parameter in the application program to be updated by using the upgrading content;
or,
when the update category is delete, performing b 1-b 2:
b 1: reading a binary data chain with a fourth set length from the next bit of the binary data chain with the second set length in the data file;
b 2: determining a position parameter according to the binary data chain with the fourth set length;
then, the performing, according to the location information in the binary data format, corresponding service processing on the application program to be updated by using the update content in the binary data format includes: determining the application program to be updated according to the installation path, and deleting the data content corresponding to the position parameter in the determined application program to be updated;
or,
when the update category is compiled, performing c 1-c 3:
c 1: reading a binary data chain with a fifth set length from the next bit of the binary data chain with the second set length in the data file;
c 2: determining a position parameter according to the binary data chain with the fifth set length;
c 3: reading a binary data chain with a sixth set length from the next bit of the binary data chain with the fifth set length in the data file;
c 4: determining a compiling type according to the binary data chain with the sixth set length;
c 5: determining corresponding information according to the determined compiling type and the data file;
wherein, when the compilation type is rebuild, the c5 comprises: reading a binary data chain with a seventh set length from the next bit of the binary data chain with the sixth set length in the data file; determining the type of the geometric body to be formed according to the binary data chain with the seventh set length; reading a binary data chain with an eighth set length from the next bit of the binary data chain with the seventh set length in the data file; determining definition information of a geometric body to be formed according to the binary data chain with the eighth set length;
then, the performing, according to the location information in the binary data format, corresponding service processing on the application program to be updated by using the update content in the binary data format includes: loading the application program to be updated to a data space of the terminal equipment according to the installation path; constructing a geometric body to be formed according to the type and the definition information of the geometric body to be formed; according to the position parameters, the built geometric body to be formed is assembled into the application program to be updated loaded into the data space;
when the compilation type is a build, the c5 includes: reading a binary data chain with an eighth set length from the next bit of the binary data chain with the sixth set length in the data file; determining a mark position parameter according to the binary data chain with the eighth set length;
then, the performing, according to the location information in the binary data format, corresponding service processing on the application program to be updated by using the update content in the binary data format includes: loading the application program to be updated to a data space of the terminal equipment according to the installation path; determining the geometry to be formed in the data space according to the mark position parameters; moving the determined geometry to be formed within the data space according to the location parameters.
7. A server-side device installed in a server, comprising:
the first processing module is used for determining the updating content corresponding to the application program to be updated and converting the updating content into a binary data format;
the second processing module is used for determining the position information of the application program to be updated and converting the position information into a binary data format;
and the third processing module is used for combining the position information and the updated content in a binary data format into a data file.
8. A client apparatus, installed in a terminal device, comprising:
the acquisition module is used for acquiring a data file corresponding to the application program to be updated;
the data reading module is used for acquiring the position information of the binary data format from the data file and acquiring the updating content of the binary data format from the data file;
and the updating processing module is used for performing corresponding business processing on the application program to be updated by using the updating content in the binary data format according to the position information in the binary data format.
9. The client device of claim 8,
the data reading module comprises: a first reading unit, a first determining unit, a second reading unit, and a second determining unit; wherein,
the first reading unit is used for sequentially reading binary data chains with a first set length from a first data bit of the data file;
the first determining unit is used for determining a data bit length parameter according to the binary data chain with the first set length;
the second reading unit is used for reading the binary data chain corresponding to the data bit length parameter from the next bit of the binary data chain with the first set length in the data file;
and the second determining unit is used for determining the installation path of the application program to be updated according to the binary data chain corresponding to the data bit length parameter.
10. The client device of claim 9,
the data reading module further comprises: a third reading unit and a third determining unit;
the third reading unit is used for reading a binary data chain with a second set length from the next bit of the binary data chain corresponding to the data bit length parameter in the data file;
the third determining unit is configured to determine an update category according to the binary data chain with the second set length;
when the update type is upgrade, the data reading module further includes: a fourth reading unit, a fourth determining unit, a fifth reading unit, and a fifth determining unit; wherein,
the fourth reading unit is used for reading a binary data chain with a third set length from the next bit of the binary data chain with the second set length in the data file;
the fourth determining unit is configured to determine a position parameter according to the binary data chain with the third set length;
the fifth reading unit is configured to read the binary data chain corresponding to the upgrade content from the next bit of the binary data chain of the third set length in the data file;
the fifth determining unit is configured to determine the upgrade content according to the read binary data chain corresponding to the upgrade content;
the update processing module is configured to determine the application program to be updated according to the installation path, and replace the data content corresponding to the location parameter in the application program to be updated with the upgrade content;
or,
when the update type is deletion, the data reading module further includes: a sixth reading unit and a sixth determining unit; wherein,
the sixth reading unit is configured to read a binary data chain of a fourth set length from a next bit of the binary data chain of the second set length in the data file;
the sixth determining unit is configured to determine a position parameter according to the binary data chain with the fourth set length;
the update processing module is configured to determine the application program to be updated according to the installation path, and delete the data content corresponding to the location parameter in the determined application program to be updated;
or,
when the update type is compiled, the data reading module further includes: a seventh reading unit, a seventh determining unit, an eighth reading unit, an eighth determining unit, and a processing unit; wherein,
the seventh reading unit is configured to read a binary data chain of a fifth set length from a next bit of the binary data chain of the second set length in the data file;
the seventh determining unit is configured to determine a position parameter according to the binary data chain with the fifth set length;
the eighth reading unit is configured to read a binary data chain of a sixth set length from a next bit of the binary data chain of the fifth set length in the data file;
the eighth determining unit is configured to determine a compiling type according to the binary data chain with the sixth set length;
the processing unit is used for determining corresponding information according to the determined compiling type and the data file;
when the compilation type determined by the eighth determining unit is rebuilt, the processing unit includes: the reading device comprises a first reading subunit, a first determining subunit, a second reading subunit and a second determining subunit; wherein,
the first reading subunit is configured to read a binary data chain of a seventh set length from a next bit of the binary data chain of the sixth set length in the data file;
the first determining subunit is configured to determine, according to the binary data chain with the seventh set length, a type of a geometric body to be formed;
the second reading subunit is configured to read a binary data chain of an eighth set length from a next bit of the binary data chain of the seventh set length in the data file;
the second determining subunit is configured to determine, according to the binary data chain of the eighth set length, definition information of a geometric solid to be formed;
the update processing module is configured to load the application program to be updated to the data space of the terminal device according to the installation path; constructing a geometric body to be formed according to the type and the definition information of the geometric body to be formed; according to the position parameters, the built geometric body to be formed is assembled into the application program to be updated loaded into the data space;
when the compilation type determined by the eighth determining unit is a build, the processing unit includes: a third reading subunit and a third determining subunit; wherein,
the third reading subunit is configured to read a binary data chain of an eighth set length from a next bit of the binary data chain of the sixth set length in the data file;
the third determining subunit is configured to determine a mark position parameter according to the binary data chain of the eighth set length;
the update processing module is configured to load the application program to be updated to the data space of the terminal device according to the installation path; determining the geometry to be formed in the data space according to the mark position parameters; moving the determined geometry to be formed within the data space according to the location parameters.
CN201611119534.1A 2016-12-08 2016-12-08 Data file construction method, method and device for updating application program Pending CN106598659A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611119534.1A CN106598659A (en) 2016-12-08 2016-12-08 Data file construction method, method and device for updating application program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611119534.1A CN106598659A (en) 2016-12-08 2016-12-08 Data file construction method, method and device for updating application program

Publications (1)

Publication Number Publication Date
CN106598659A true CN106598659A (en) 2017-04-26

Family

ID=58596505

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611119534.1A Pending CN106598659A (en) 2016-12-08 2016-12-08 Data file construction method, method and device for updating application program

Country Status (1)

Country Link
CN (1) CN106598659A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108875320A (en) * 2018-07-17 2018-11-23 北京元心科技有限公司 Software security means of defence, device, electronic equipment and computer storage medium
CN108989429A (en) * 2018-07-19 2018-12-11 平安科技(深圳)有限公司 The method, apparatus of real-time update page data, electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103136013A (en) * 2011-12-01 2013-06-05 腾讯科技(深圳)有限公司 Method and system of software upgrade
CN105045631A (en) * 2015-07-30 2015-11-11 北京奇虎科技有限公司 Method and device for upgrading client-side applications
CN106095455A (en) * 2016-06-17 2016-11-09 北京小米移动软件有限公司 A kind of application update method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103136013A (en) * 2011-12-01 2013-06-05 腾讯科技(深圳)有限公司 Method and system of software upgrade
CN105045631A (en) * 2015-07-30 2015-11-11 北京奇虎科技有限公司 Method and device for upgrading client-side applications
CN106095455A (en) * 2016-06-17 2016-11-09 北京小米移动软件有限公司 A kind of application update method and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108875320A (en) * 2018-07-17 2018-11-23 北京元心科技有限公司 Software security means of defence, device, electronic equipment and computer storage medium
CN108875320B (en) * 2018-07-17 2021-10-08 北京元心科技有限公司 Software security protection method and device, electronic equipment and computer storage medium
CN108989429A (en) * 2018-07-19 2018-12-11 平安科技(深圳)有限公司 The method, apparatus of real-time update page data, electronic equipment

Similar Documents

Publication Publication Date Title
CN107526743B (en) Method and apparatus for compressing file system metadata
US20210124573A1 (en) Firmware upgrade method and apparatus, and terminal
US11003625B2 (en) Method and apparatus for operating on file
CN102693280A (en) Webpage browsing method, WebApp framework, method and device for executing JavaScript, and mobile terminal
CN104391725A (en) Page display method and page display device
CN104536744A (en) Method and server for automatically building and deploying codes
CN103559184A (en) Form page display method and device
CN106557307B (en) Service data processing method and system
CN108595338A (en) Test case write method, device, computer equipment and storage medium
CN109669692B (en) Source code sharing method, server, computer readable storage medium and system
CN112732321B (en) Firmware modification method, device, computer readable storage medium and equipment
CN104731588A (en) Page layout file generation method and device
US8196093B2 (en) Apparatus and method for componentizing legacy system
CN104468419A (en) Method and system for recovering configuration of interchanger and interchanger
CN106598659A (en) Data file construction method, method and device for updating application program
CN108694049A (en) A kind of method and apparatus of update software
CN111427511B (en) Data storage method and device
CN106708479A (en) Page rendering method and device
CN113704819B (en) Coding output method and device of application log and computer readable storage medium
KR102192479B1 (en) Method for analysing prgoram code of electonic device and electronic device
KR20180041191A (en) Page construction method, apparatus, device and non-volatile computer storage medium
CN112486465B (en) Code updating method and device
US8893099B1 (en) Inner function local variable name shadowing
CN105279247A (en) Expression library generation method and device
CN109344082A (en) A kind of method and system of automatic scratchpad register

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Wusong Industrial Park, Wuzhong Development District of Suzhou City, Jiangsu province 215100 Wusong Road No. 818

Applicant after: Tide Financial Information Technology Co Ltd

Address before: Wuzhong Economic Development Zone in Suzhou City, Jiangsu Province, the River Street 215104 tower rhyme Road No. 178 Building 2 layer 1

Applicant before: Tide (Suzhou) Financial Technology Service Co., Ltd.

WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20170426