CN110851169B - Method, system, medium and electronic device for updating patch information - Google Patents

Method, system, medium and electronic device for updating patch information Download PDF

Info

Publication number
CN110851169B
CN110851169B CN202010049682.0A CN202010049682A CN110851169B CN 110851169 B CN110851169 B CN 110851169B CN 202010049682 A CN202010049682 A CN 202010049682A CN 110851169 B CN110851169 B CN 110851169B
Authority
CN
China
Prior art keywords
patch
information
release
equipment
device identifier
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.)
Active
Application number
CN202010049682.0A
Other languages
Chinese (zh)
Other versions
CN110851169A (en
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.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network Technology 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 Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN202010049682.0A priority Critical patent/CN110851169B/en
Publication of CN110851169A publication Critical patent/CN110851169A/en
Application granted granted Critical
Publication of CN110851169B publication Critical patent/CN110851169B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/658Incremental updates; Differential updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method for updating patch information, which comprises the following steps: acquiring a patch release request parameter; determining a first patch class matched with the patch basic parameters from the N patch classes based on the patch basic parameters; acquiring an existing equipment identification set from a first release data table associated with the first patch class logic; screening out the device identifiers which are the same as the device identifiers in the existing device identifier set from the target device identifier set to obtain an updated device identifier set; screening out equipment identifications different from the equipment identifications in the existing equipment identification set from the target equipment identification set to obtain an inserted equipment identification set; and writing the updated equipment identifier set and the inserted equipment identifier set into the database, and updating the release information of the first patch file. The updating efficiency can be improved.

Description

Method, system, medium and electronic device for updating patch information
Technical Field
The present invention relates to the field of patch delivery technologies, and in particular, to a method, a system, a medium, and an electronic device for updating patch information.
Background
Patch delivery refers to delivering a patch file to a client through a delivery platform at a delivery end, for example, patch updating of an application program. Before patch release, release data of a patch file needs to be managed first on a release platform, for example, client device identifiers of the patch file and release objects of the patch file are managed. In the prior art, a patch file and release data thereof are designed in a high coupling mode, and the release information updating efficiency is low.
Disclosure of Invention
In view of the above, the present invention has been made to provide a method and system for patch information update that overcomes or at least partially solves the above-mentioned problems.
On one hand, the present application provides the following technical solutions through an embodiment of the present application:
a method for updating patch information is used for a patch release platform, wherein the patch release platform comprises a database storing N patch files, the N patch files respectively define N patch classes, and the patch classes comprise patch basic information of the patch files corresponding to the patch classes; the patch platform also comprises N release data tables which are respectively logically associated with the N patch classes, wherein the release data tables are logically associated with the patch classes through the patch basic information;
the method comprises the following steps:
acquiring a patch release request parameter; the patch releasing request parameters comprise patch basic parameters and a target equipment identification set;
determining a first patch class matched with the patch basic parameters from the N patch classes based on the patch basic parameters; wherein the first patch class corresponds to a first patch file of the plurality of patch files;
acquiring an existing equipment identification set from a first release data table associated with the first patch class logic; the release data table comprises an existing equipment identification set, and the existing equipment identification set comprises equipment identifications of the client side equipment released by the first patch file;
screening out the device identifiers which are the same as the device identifiers in the existing device identifier set from the target device identifier set to obtain an updated device identifier set;
screening out equipment identifications different from the equipment identifications in the existing equipment identification set from the target equipment identification set to obtain an inserted equipment identification set;
processing the first delivery data table based on the updated device identifier set and the inserted device identifier set to obtain a processed first delivery data table;
and writing the processed data in the first launching data table into the database, and updating the information of the first patch file.
Optionally, the patch basic information includes package name information of the application program, a version number of the application program, and a version number of the patch, and the release data table includes a patch code;
the method for establishing the logic association between the patch basic information and the patch file by the release data table specifically comprises the following steps:
and establishing logic association between the package name information of the application program, the version number of the application program and the version number of the patch and the patch code.
Optionally, the patch class further includes a redundant field for storing patch release status information of a patch file corresponding to the patch class, and the patch release status information of the first patch file is stored in a first redundant field in the first patch class;
the method further comprises the following steps:
and obtaining the patch release state information of the first patch file based on the patch release state information in the first redundant field.
Optionally, the patch basic parameter includes a package name information parameter of the application program, a version number parameter of the application program, and a version number parameter of the patch;
the determining, based on the patch basic parameter, a first patch class matching the patch basic parameter from the N patch classes specifically includes:
calling an object acquisition function to acquire a target patch class based on the package name information parameter of the application program, the version number parameter of the application program and the version number parameter of the patch;
judging whether the target patch class is empty or not;
and if the target patch class is not empty, determining a first patch class matched with the patch basic parameters from the N patch classes.
Optionally, the delivery data table includes a device identifier information field and a device identifier type field, where the device identifier type field is used to store an existing device identifier type, and the device identifier information field is used to store the existing device identifier set;
the obtaining an existing device identifier set from a first release data table associated with the first patch class logic specifically includes:
calling a condition screening function, and screening out a first equipment identification type in the existing equipment identification types from the first release data table;
and calling a logic screening function, screening the existing equipment identifier included by the first equipment identifier type from the first release data table, and acquiring an existing equipment identifier set.
Optionally, the launch data table further includes a redundant field for storing patch basic information, and the patch basic information of the first patch file is stored in a second redundant field in the first launch data table;
the method further comprises the following steps:
and obtaining the patch basic information of the first patch file based on the patch basic information stored in the second redundant field.
Optionally, the processing the first delivery data table based on the updated device identifier set and the inserted device identifier set to obtain updated first delivery data specifically includes:
updating the first equipment identifier in the existing equipment identifier set, which is the same as the equipment identifier in the updated equipment identifier set, to a release state;
and inserting a second device identifier in the inserted device identifier set into the existing device identifier set, and identifying the second device identifier as a release state.
On the other hand, the present application provides a system for updating patch information through another embodiment of the present application, where the system is used for a patch distribution platform, and the patch distribution platform includes a database storing N patch files, where the N patch files respectively define N patch classes, and each of the patch classes includes patch basic information of a patch file corresponding to the patch class; the patch platform also comprises N release data tables which are respectively logically associated with the N patch classes, wherein the release data tables are logically associated with the patch classes through the patch basic information;
the system comprises:
the first obtaining module is used for obtaining the patch releasing request parameter; the patch releasing request parameters comprise patch basic parameters and a target equipment identification set;
a patch determining module, configured to determine, based on the patch basic parameter, a first patch class matching the patch basic parameter from the N patch classes; wherein the first patch class corresponds to a first patch file of the plurality of patch files;
a second obtaining module, configured to obtain an existing device identifier set from a first release data table associated with the first patch class logic; the release data table comprises an existing equipment identification set, and the existing equipment identification set comprises equipment identifications of the client side equipment released by the first patch file;
the first screening module is used for screening out the equipment identifiers which are the same as the equipment identifiers in the existing equipment identifier set from the target equipment identifier set to obtain an updated equipment identifier set;
the second screening module is used for screening out the equipment identifiers which are different from the equipment identifiers in the existing equipment identifier set from the target equipment identifier set to obtain an inserted equipment identifier set;
the data processing module is used for processing the first release data table based on the updated equipment identifier set and the inserted equipment identifier set to obtain a processed first release data table;
and the patch updating module is used for writing the data in the processed first launching data table into the database and updating the launching information of the first patch file.
The invention discloses a readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method.
The invention discloses an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor performing the steps of the method.
One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
the method is used for a patch release platform, efficiently updates patch release information, and is used as a basis, wherein the patch release platform comprises a database which stores N patch files. In order to improve the efficiency of dynamic update of patch release information, the invention firstly separates and designs patch files and release information data on a data structure, specifically, N patch classes are respectively defined for N patch files in a database, and the patch classes comprise patch basic information of the patch files corresponding to the patch classes; and constructing N release data tables which are respectively logically associated with the N patch classes in a patch platform, wherein the specific logical association method is that the release data tables are logically associated with the patch classes through the patch basic information through codes to form weak association between the release data tables and patch files, so that the coupling degree of the patch files and release information data is reduced. Therefore, on the basis of the data structure, the whole releasing strategy can be directly realized in the releasing data table, then the releasing strategy is written into the database, and the patch releasing information can be updated only by completing one access to the database for one releasing request, so that the efficiency of patch releasing data management can be obviously improved. Based on the data structure, the patch information updating step of the method of the invention comprises the following steps: acquiring a patch release request parameter; the patch releasing request parameters comprise patch basic parameters and a target equipment identification set; determining a first patch class matched with the patch basic parameters from the N patch classes based on the patch basic parameters; wherein the first patch class corresponds to a first patch file of the plurality of patch files; acquiring an existing equipment identification set from a first release data table associated with the first patch class logic; the release data table comprises an existing equipment identification set, and the existing equipment identification set comprises equipment identifications of the client side equipment released by the first patch file; screening out the device identifiers which are the same as the device identifiers in the existing device identifier set from the target device identifier set to obtain an updated device identifier set; screening out equipment identifications different from the equipment identifications in the existing equipment identification set from the target equipment identification set to obtain an inserted equipment identification set; processing the first delivery data table based on the updated device identifier set and the inserted device identifier set to obtain a processed first delivery data table; and writing the processed data in the first launching data table into the database, and updating the information of the first patch file. The updating step is to complete the updating of the device identifier release state only in the release data table weakly associated with the patch file for the parameters in the one-time updating request, and finally complete the updating of the patch information through one-time access to the database, so that frequent access to the database in the prior art is avoided, and the efficiency of dynamic updating of the patch release information is remarkably improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
FIG. 1 is a flow diagram of a method for updating patch information in one embodiment of the invention;
FIG. 2 is a system architecture diagram for patch information update in one embodiment of the invention.
Detailed Description
The embodiment of the application provides a method, a system, a medium and an electronic device for updating patch information, and solves the technical problem of low updating efficiency of the existing release information.
In order to solve the technical problems, the general idea of the embodiment of the application is as follows:
a method for updating patch information is used for a patch release platform, wherein the patch release platform comprises a database storing N patch files, the N patch files respectively define N patch classes, and the patch classes comprise patch basic information of the patch files corresponding to the patch classes; the patch platform also comprises N release data tables which are respectively logically associated with the N patch classes, wherein the release data tables are logically associated with the patch classes through the patch basic information; the method comprises the following steps: acquiring a patch release request parameter; the patch releasing request parameters comprise patch basic parameters and a target equipment identification set; determining a first patch class matched with the patch basic parameters from the N patch classes based on the patch basic parameters; wherein the first patch class corresponds to a first patch file of the plurality of patch files; acquiring an existing equipment identification set from a first release data table associated with the first patch class logic; the release data table comprises an existing equipment identification set, and the existing equipment identification set comprises equipment identifications of the client side equipment released by the first patch file; screening out the device identifiers which are the same as the device identifiers in the existing device identifier set from the target device identifier set to obtain an updated device identifier set; screening out equipment identifications different from the equipment identifications in the existing equipment identification set from the target equipment identification set to obtain an inserted equipment identification set; processing the first delivery data table based on the updated device identifier set and the inserted device identifier set to obtain a processed first delivery data table; and writing the processed data in the first release data table into the database, and updating the release information of the first patch file.
In order to better understand the technical solution, the technical solution will be described in detail with reference to the drawings and the specific embodiments.
First, it is stated that the term "and/or" appearing herein is merely one type of associative relationship that describes an associated object, meaning that three types of relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
Patch updates to an Application (APP) are a common software update method. The method mainly maintains the release state of the patch file to the client side through the patch release platform, and when the client side triggers updating, the patch file is sent to the client side from the platform to be updated in an application mode. Therefore, in the distribution platform, it is necessary to update the placement information of the patch file (for example, update the placement status for the client) according to the placement request parameter, for example, to manage the patch file and the client device identifier of the placement target thereof. In the prior art, a patch file and release information thereof are designed in a high coupling manner, and release information of the patch file is updated only by releasing and changing the patch file in a database, so that the database needs to be accessed frequently and strongly in association, and the release information updating efficiency of the patch file is low.
To this end, the present application first provides a method for updating patch information through an embodiment, so as to describe how to overcome the above problem.
Example one
The implementation provides a method for updating patch information, which is used for a patch publishing platform, wherein the patch publishing platform comprises a database for storing N patch files, the N patch files respectively define N patch classes, and the patch classes comprise patch basic information of patch files corresponding to the patch classes; the patch platform also comprises N release data tables which are respectively logically associated with the N patch classes, wherein the release data tables are logically associated with the patch classes through the patch basic information;
it should be noted that, the Patch file (english Patch) and the release policy (i.e. the release data table) are separately designed, and such a design has the advantages that the Patch and the release are decoupled, and independent management of the Patch and the release policy can be realized. In the prior art, patches and release information are usually designed together in the implementation process, so that the coupling degree is greatly improved, and the subsequent function upgrading iteration is relatively complicated.
In the specific implementation process, the patch file is defined as a class (namely, the patch class), and the basic patch information is defined in the class, so that the logical association is established with the release data table, specifically, the association is performed through codes. It should be noted that, here, the logical association implemented by the code level is different from the existing external key association of the database, the external key association is a strong association, and data at both ends needs to be maintained simultaneously during operation, while the logical association is a weak association, and only data at one end needs to be maintained during operation. Therefore, when the patch is updated, the release information of the patch for the client device is only required to be updated according to the parameters in the release request in the release platform, and therefore, the real-time property of the patch file data in the database is not required to be ensured (because the patch is not required to be generated and sent to the client, the release platform is ready for release and is sent when the client is triggered).
It should be noted that the patch class may include multiple types, and taking the android system as an example, the patch file may be defined as a class android hotpatch, that is, the class represents an android hotpatch. For example, the class describes specific information of the patch, and the related description information is as follows:
v primary bond/private Integer id;
v APP application ID/private String appId;
v. packet name information/private String pkgName;
v APP version number/private Integer version code;
v version name/private String versioning name;
/private Integer patch version number;
/. Patch description information/. private String PatchDesc;
(ii)/. DID delivery status,/. private Integer didPublishstatus;
v Channel release status/private Integer Channel PublissStatus;
(ii)/. full dosing status/private Integer aggregate publishstatus;
v. file URL/private String fileUrl;
file size (B)/private Integer file size;
v. file MD 5/private String file MD5;
v. operator/private String operator;
creation time/private Long createTime;
update time/private Long update time.
The patch basic information includes package name information pkgName of the application program, version number versionCode of the application program, version number patchVersionCode of the patch, and the like. In the specific implementation process, one piece of patch version information can be uniquely determined through pkgName, versionCode and patchVersionCode.
As an optional implementation manner, the patch class further includes a redundant field for storing patch release status information of a patch file corresponding to the patch class, and the patch release status information of the first patch file is stored in the first redundant field in the first patch class.
Specifically, in the above-described structure, a first redundant field in which the didpubishstatus is designed is added for storing patch release status information of a corresponding patch file, so that release status information can be obtained very efficiently through the didpubishstatus when subsequently searching whether to release the patch.
Further, the placement data table may include a plurality of fields for storing placement information, but at least a field for storing information logically associated with the patch class and a field for storing a client device identification. For example, the information of the delivery data table is described as follows:
/private Integer ID;
/** * android_hot_patch*/private Integer patchId;
id information of/private String publishing combined with publish _ type;
type information of putting id 1: did/private Integer publishType;
(ii)/. state of delivery 0: no delivery, 1: delivery/private Integer publishStatus;
redundant packet name information/private String pkgName;
APP version number/private Integer version code;
patch version number/private Integer patch version code;
v. operator/private String operator;
creation time/private Long createTime;
update time/private Long update time.
Specifically, the release data table includes a patch code patch id; and establishing logic association between the package name information of the application program, the version number of the application program and the version number of the patch and the patch code. And establishing logic association between the N patch classes and the N delivery data tables.
Specifically, the delivery data table includes a device identification information field publishId and a device identification type field publishType, where the device identification type field is used to store an existing device identification type, and the device identification information field is used to store the existing device identification set.
The information stored in the device identification information field and the device identification type field can jointly determine the device identification information, and due to the existence of publishType, the dynamic extension of the device identification type can be realized, that is, the device identifications under different types can be stored, for example, all identifications capable of uniquely identifying the client device, such as device ID (abbreviated DID), mobile phone number used for device registration, and the like. This makes the data structure of the present invention suitable for various types of device identification, with good expandability. In a specific implementation, when the publishType is 1, the pud type is indicated as DID type, and the data stored by the publishId is the specific DID data information. The publishType can also be expanded to expand different types, and the publishId stores the specific data information of the type corresponding to the publishType.
After the above data structure is clarified, how to implement patch information update will be described in detail below based on the above data structure.
Referring to fig. 1, the method includes:
s101, acquiring a patch release request parameter; the patch releasing request parameters comprise patch basic parameters and a target equipment identification set;
s102, determining a first patch class matched with the patch basic parameters from the N patch classes based on the patch basic parameters; wherein the first patch class corresponds to a first patch file of the plurality of patch files;
s103, acquiring an existing equipment identification set from a first release data table associated with the first patch logic; the release data table comprises an existing equipment identification set, and the existing equipment identification set comprises equipment identifications of the client side equipment released by the first patch file;
s104, screening out the device identifiers which are the same as the device identifiers in the existing device identifier set from the target device identifier set to obtain an updated device identifier set;
s105, screening out equipment identifiers which are different from the equipment identifiers in the existing equipment identifier set from the target equipment identifier set to obtain an inserted equipment identifier set;
s106, processing the first release data table based on the updated device identifier set and the inserted device identifier set to obtain a processed first release data table;
and S107, writing the processed data in the first release data table into the database, and updating the release information of the first patch file.
The steps in this embodiment are explained in detail below with reference to fig. 1.
Firstly, executing step S101 to obtain a patch release request parameter; the patch releasing request parameters comprise patch basic parameters and a target device identification set.
In the specific release information updating process, a release function needs to be designed to maintain a release data table, and the input of the release function is the parameter in the patch release request. The patch releasing request parameters comprise patch basic parameters and a target device identification set. Accordingly, when the input of the placement function is designed, the input of the device identifier is in a list form, so that a plurality of target devices can be placed at one time, that is, the patch placement request parameter may include a target device identifier set. Wherein, a plurality of target devices are put in one time, batch processing is realized, the putting efficiency is obviously improved,
specifically, taking the DID device identifier as an example, the specific function of the release function is defined as follows:
Public void publisDid(DidPublisReq didPublishReq){}
the function is a public type function with a returned value void, the name of the function is publish, the parameter type is didpubisreq, and the parameter is didpubisreq.
The didpublicreq parameter represents a necessary parameter condition required for delivering DID, and the specific information in the didpublicreq is as follows:
package name information/@ NotNull (message = "pkgName cannot be empty") private stringpkname;
/version number/@ NotNull (message = "version code cannot be empty") private version code;
/patch version information/@ NotNull (message = "patch version code cannot be null") private int patch version code;
update package version information @ NotNull (message = "didList cannot be empty") privateList < String > didList;
the didList represents DID list information to be delivered, and because the didList is a list, a plurality of DID devices can be delivered at one time. The patch base information includes package name information of the application program, a version number of the application program, and a version number of the patch.
After the patch release request parameter is obtained, the patch release request parameter is used as an input parameter of a release function, and after the release function is input, the specific implementation logic of the release function is as follows:
next, S102 is executed, and a first patch class matching the patch basic parameter is determined from the N patch classes based on the patch basic parameter; the first patch class corresponds to a first patch file in the plurality of patch files.
It should be noted that, in this embodiment, maintenance of the release data table is performed for each patch file (which may be understood as one patch package), so that accurate update of patch file release information can be achieved.
In a specific implementation process, since one patch file is uniquely determined by the package name information of the applicable program, the version number of the application program, and the version number of the patch, a first patch class matching the patch basic parameter is determined from the N patch classes by the package name information of the application program, the version number of the application program, and the version number of the patch acquired in S101.
As an optional implementation manner, the determining, based on the patch basic parameter, a first patch class matching the patch basic parameter from the N patch classes specifically includes:
calling an object acquisition function to acquire a target patch class based on the package name information parameter of the application program, the version number parameter of the application program and the version number parameter of the patch;
judging whether the target patch class is empty or not;
and if the target patch class is not empty, determining a first patch class matched with the patch basic parameters from the N patch classes.
Specifically, taking the DID device identifier as an example, the DID device identifier can be called
The method comprises the steps that fetchHotPatch (didPublishReq.getPKName ()), didPublishReq.getVersionCode (), and didPublishReq.getVersionCode ()) functions are used for obtaining an object hot patch hotPatch (namely a target patch class) of an android HotPatch type, wherein one patch file is uniquely locked in the fetHotPatch functions through three dimensions of pkName, VersionCode and PatchVersionCode. The obtaining method in the fetchHotPatch is to match through the three conditions, and an object HotPatch of the android HotPatch type is returned only if the matching is complete.
In this embodiment, fetchHotPatch represents a function for acquiring a hot patch.
Then judging whether the hotPatch object is empty or not, if so, throwing an exception to terminate the throwing process, wherein the specific method for throwing the exception is that
the next new venues exception (FAIL _ FIND _ path _ INFO, FAIL _ FIND _ path _ INFO _ MSG), where FAIL _ FIND _ path _ INFO and FAIL _ FIND _ path _ INFO _ MSG are two pieces of yield information.
If not, next, executing S103, and acquiring an existing device identifier set from a first release data table associated with the first patch class logic; the release data table comprises an existing device identifier set, and the existing device identifier set comprises a device identifier of the client device to which the first patch file has been released.
For efficient subsequent processing of the device identifier, an existing device identifier set needs to be obtained from the first delivery data table. It should be noted that the existing device identification set may or may not be null. When the device identifier set is empty, it indicates that the first patch file has not been previously released (it can be understood that the first release data table is operated for the first time), and if not empty, it indicates that the first patch file has been previously released, and according to the method of the present invention, the existing device identifier set is necessarily stored in the first release data table.
As an optional implementation manner, the delivery data table includes a device identifier information field and a device identifier type field, where the device identifier type field is used to store an existing device identifier type, and the device identifier information field is used to store the existing device identifier set;
then, the obtaining an existing device identifier set from the first release data table associated with the first patch class logic specifically includes:
calling a condition screening function, and screening out a first equipment identification type in the existing equipment identification types from the first release data table;
calling a logic screening function, screening the existing equipment identification included in the first equipment identification type from the first release data table, and acquiring an existing equipment identification set
Specifically, the DID device id is also taken as an example,
firstly, construct a
PublishP2 ppatchoxample = newPublishP2 ppatchoxample (). Among them, the object PublishP2 ppatchoxample type is PublishP2 ppatchoxample.
Then call up
The method comprises the steps of setting screening conditions of a publishP2pPatchExample object by using publishP2pPatchExample (). andPkPkNameEqualto (pkName), andVersionCoqualto (versionCode), andPatchVersionCoqualto (PatchVersionCode), and making condition matching rules of three aspects of versionCode, PatchVersionCoqualTo and pubshType when the screening conditions are set, wherein publishType is an input device identification type and indicates that a certain type of device identification is updated. Finally through calling
Selectbyextract (publishP2 ppatcexample) method to implement logical screening function, and screen out a List < publishP2pPatch > type data publishP2pPatch List.
Wherein, publishp2 ppatcheteExample
Is a conditional screening function, and publishP2 pputmapper.
Next, in order to improve the maintenance efficiency of the device identifier, data in the publicp 2pPatchList and the device identifier in the device identifier list input by the drop function in S101 need to be merged. The final purpose of the merging is to realize: the existing released equipment identification in the first release data list is only subjected to state updating operation subsequently; and performing insertion operation on the device identifications which exist in the device identification list but do not exist in the first delivery data list. Therefore, the data in publishP2pPatchList needs to be split into two pieces.
It should be noted that, in the prior art, since the release information and the patch file are not separately designed, it is also impossible to efficiently implement the above-mentioned inserting and updating operations on the device identifier, because the existing method must maintain the database, and considering the low efficiency of frequent access to the database, it is impossible to efficiently update and insert the device identifier in this implementation.
Next, S104 is executed to screen out the device identifier that is the same as the device identifier in the existing device identifier set from the target device identifier set, and obtain an updated device identifier set.
In a specific implementation process, taking the DID device identifier as an example, a function of the same DID device is resolved through definition to filter out an updated device identifier set, where the specific function is defined as follows:
Private List<PublishP2pPatch>
getUpdatePublishP2pPatchList(DidPublishReq didPublishReq,
List<PublishP2pPatch>publishP2pPatchList)
the above function is implemented as follows:
firstly, defining a receiving set, and specifically defining List < publishP2pPatch > updateP2pPatchList = new ArrayList < > ();
then pass through
for (Publish 2pPatch publishP2pPatch: publishP2pPatch) mode to process polling treatment to publishP2pPatch List parameter, then polling interior to process secondary polling treatment by for (String did: didpurification Req. getDidList ()), then matching again, specifically by means of
if matching is successful, the matched object is stored into the updateP2pPatchList by calling the updateP2pPatchList.
Next, S105 is executed to screen out, from the target device identifier set, a device identifier that is different from the device identifiers in the existing device identifier set, and obtain an inserted device identifier set.
In the specific implementation process, also taking the DID device identifier as an example, through a defined function:
List<PublishP2pPatch>getInsertPublishP2pPatchList(DidPublishReqdidPublishReq,AndroidHotPatch hotPatch,
List<PublishP2pPatch>publishP2pPatchList)
a received set of insertPublishP2pPatch is defined by the List < PublishP2pPatch > insertPublishP2pPatch = new ArrayList < >) function.
Then, the object of publishP2pPatchList in the parameter is converted into an object of List < String > type, and the specific conversion process is as follows:
List<String>dbDidList =
publishP2pPatchList.stream().map(PublishP2pPatch::getPublishId).collect(Collectors.toList());
return !dbDidList.contains(item);
collect(Collectors.toList());
in the process, the device identifiers in the getPulshId function, which are different from the device identifiers in the existing device identifier set, are extracted mainly through a map operation, then a! dbDidList.contacts (item) function is matched, that is, data which does not exist in dbDidList is returned, a primary set of data dbDidList is returned, then the collection is passed through a collection (collectors. ToList ()), and the function converts the data into List < String > insert DidList data information.
Next, the dbDidList data is constructed into a publishP2pPatch object, specifically, polling is performed in a for (String did: insertDidList) manner, then the publishP2pPatch object is assigned, finally, the assigned data is stored into the insertPublish 2pPatch by calling the storage function insertPublish 2pPatch, and then the data is returned by returning the insertPublish 2pPatch.
Next, S106 is executed, and based on the updated device identifier set and the inserted device identifier set, the first delivery data table is processed to obtain a processed first delivery data table.
An updated device identification set updatePublishP2pPatch for update and an inserted device identification set insertPublishP2pPatch for insertion may be obtained by S105.
In a specific implementation process, the processing the first delivery data table based on the updated device identifier set and the inserted device identifier set to obtain updated first delivery data specifically includes:
updating the first equipment identifier in the existing equipment identifier set, which is the same as the equipment identifier in the updated equipment identifier set, to a release state;
and inserting a second device identifier in the inserted device identifier set into the existing device identifier set, and identifying the second device identifier as a release state.
It should be noted that, if the first device identifier in the existing device identifier set that is the same as the device identifier in the updated device identifier set is updated to the drop state, the first device identifier does not need to be repeatedly inserted, but only the second device identifier in the inserted device identifier set needs to be inserted into the existing device identifier set, and the second device identifier is identified to the drop state, which significantly improves the data processing efficiency.
And then, executing S107, writing the data in the processed first release data table into the database, and updating the release information of the first patch file.
And updating the release information of the first patch file in the database by using the processed data in the first release data table, completing the task of releasing the request in S101, making the first patch file ready for releasing the target device identifier set in the release request, and releasing the first patch file to the target client device once the target client device corresponding to the target device identifier set triggers the update.
The technical scheme in the embodiment of the application at least has the following technical effects or advantages:
the method of the embodiment is used for a patch release platform, and is used for efficiently updating patch release information, and the patch release platform comprises a database storing N patch files as a basis. In order to improve the efficiency of dynamic update of patch release information, the invention firstly separates and designs patch files and release information data on a data structure, specifically, N patch classes are respectively defined for N patch files in a database, and the patch classes comprise patch basic information of the patch files corresponding to the patch classes; and constructing N release data tables which are respectively logically associated with the N patch classes in a patch platform, wherein the specific logical association method is that the release data tables are logically associated with the patch classes through the patch basic information through codes to form weak association between the release data tables and patch files, so that the coupling degree of the patch files and release information data is reduced. Therefore, on the basis of the data structure, the whole releasing strategy can be directly realized in the releasing data table, then the releasing strategy is written into the database, and the patch releasing information can be updated only by completing one access to the database for one releasing request, so that the efficiency of patch releasing data management can be obviously improved. Based on the data structure, the patch information updating step of the method of the invention comprises the following steps: acquiring a patch release request parameter; the patch releasing request parameters comprise patch basic parameters and a target equipment identification set; determining a first patch class matched with the patch basic parameters from the N patch classes based on the patch basic parameters; wherein the first patch class corresponds to a first patch file of the plurality of patch files; acquiring an existing equipment identification set from a first release data table associated with the first patch class logic; the release data table comprises an existing equipment identification set, and the existing equipment identification set comprises equipment identifications of the client side equipment released by the first patch file; screening out the device identifiers which are the same as the device identifiers in the existing device identifier set from the target device identifier set to obtain an updated device identifier set; screening out equipment identifications different from the equipment identifications in the existing equipment identification set from the target equipment identification set to obtain an inserted equipment identification set; processing the first delivery data table based on the updated device identifier set and the inserted device identifier set to obtain a processed first delivery data table; and writing the processed data in the first launching data table into the database, and updating the information of the first patch file. The updating step is to complete the updating of the device identifier release state only in the release data table weakly associated with the patch file for the parameters in the one-time updating request, and finally complete the updating of the patch information through one-time access to the database, so that frequent access to the database in the prior art is avoided, and the efficiency of dynamic updating of the patch release information is remarkably improved.
Example two
Based on the same inventive concept as the embodiment, the embodiment provides a system for updating patch information, which is used for a patch publishing platform, wherein the patch publishing platform comprises a database storing N patch files, the N patch files respectively define N patch classes, and the patch classes comprise patch basic information of patch files corresponding to the patch classes; the patch platform also comprises N release data tables which are respectively logically associated with the N patch classes, wherein the release data tables are logically associated with the patch classes through the patch basic information;
referring to fig. 2, the system includes:
the first obtaining module is used for obtaining the patch releasing request parameter; the patch releasing request parameters comprise patch basic parameters and a target equipment identification set;
a patch determining module, configured to determine, based on the patch basic parameter, a first patch class matching the patch basic parameter from the N patch classes; wherein the first patch class corresponds to a first patch file of the plurality of patch files;
a second obtaining module, configured to obtain an existing device identifier set from a first release data table associated with the first patch class logic; the release data table comprises an existing equipment identification set, and the existing equipment identification set comprises equipment identifications of the client side equipment released by the first patch file;
the first screening module is used for screening out the equipment identifiers which are the same as the equipment identifiers in the existing equipment identifier set from the target equipment identifier set to obtain an updated equipment identifier set;
the second screening module is used for screening out the equipment identifiers which are different from the equipment identifiers in the existing equipment identifier set from the target equipment identifier set to obtain an inserted equipment identifier set;
the data processing module is used for processing the first release data table based on the updated equipment identifier set and the inserted equipment identifier set to obtain a processed first release data table;
and the patch updating module is used for writing the data in the processed first launching data table into the database and updating the launching information of the first patch file.
Since the data processing system described in this embodiment is a system adopted to implement the method for updating patch information in this embodiment, based on the method for updating patch information described in the first embodiment of this application, a person skilled in the art can understand the specific implementation manner of the system in this embodiment and various variations thereof, and therefore, how to implement the method in the first embodiment by using the system in this embodiment is not described in detail here. The system used by those skilled in the art to implement the method for updating patch information in the embodiment of the present application is within the scope of the present application.
Based on the same inventive concept as in the previous embodiments, embodiments of the present invention further provide a readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of any of the methods described above.
Based on the same inventive concept as in the previous embodiments, an embodiment of the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements the steps of any one of the methods when executing the program.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. A method for updating patch information is used for a patch release platform, wherein the patch release platform comprises a database storing N patch files, and the method is characterized in that the N patch files respectively define N patch classes, and the patch classes comprise patch basic information of the patch files corresponding to the patch classes; the patch platform also comprises N release data tables which are respectively logically associated with the N patch classes, wherein the release data tables are logically associated with the patch classes through the patch basic information; n is a positive integer;
the method comprises the following steps:
acquiring a patch release request parameter; the patch releasing request parameters comprise patch basic parameters and a target equipment identification set;
determining a first patch class matched with the patch basic parameters from the N patch classes based on the patch basic parameters; the first patch class corresponds to a first patch file in the N patch files;
acquiring an existing equipment identification set from a first release data table associated with the first patch class logic; the release data table comprises an existing equipment identification set, and the existing equipment identification set comprises equipment identifications of the client side equipment released by the first patch file;
screening out the device identifiers which are the same as the device identifiers in the existing device identifier set from the target device identifier set to obtain an updated device identifier set;
screening out equipment identifications different from the equipment identifications in the existing equipment identification set from the target equipment identification set to obtain an inserted equipment identification set;
processing the first delivery data table based on the updated device identifier set and the inserted device identifier set to obtain a processed first delivery data table;
and writing the processed data in the first launching data table into the database, and updating the information of the first patch file.
2. The method for updating patch information as claimed in claim 1, wherein the patch base information includes package name information of an application program, a version number of the application program, and a version number of a patch, and the delivery data table includes a patch code;
the method for establishing the logic association between the patch basic information and the patch file by the release data table specifically comprises the following steps:
and establishing logic association between the package name information of the application program, the version number of the application program and the version number of the patch and the patch code.
3. The method for updating patch information as claimed in claim 1, wherein the patch class further includes a redundant field for storing patch release status information of a patch file corresponding to the patch class, and the patch release status information of the first patch file is stored in a first redundant field in the first patch class;
the method further comprises the following steps:
and obtaining the patch release state information of the first patch file based on the patch release state information in the first redundant field.
4. The method for patch information updating as claimed in claim 1, wherein the patch base parameter includes a package name information parameter of an application program, a version number parameter of an application program, and a version number parameter of a patch;
the determining, based on the patch basic parameter, a first patch class matching the patch basic parameter from the N patch classes specifically includes:
calling an object acquisition function to acquire a target patch class based on the package name information parameter of the application program, the version number parameter of the application program and the version number parameter of the patch;
judging whether the target patch class is empty or not;
and if the target patch class is not empty, determining a first patch class matched with the patch basic parameters from the N patch classes.
5. The patch information updating method according to claim 1, wherein the placement data table includes a device identifier information field and a device identifier type field, wherein the device identifier type field is used to store an existing device identifier type, and the device identifier information field is used to store the existing device identifier set;
the obtaining an existing device identifier set from a first release data table associated with the first patch class logic specifically includes:
calling a condition screening function, and screening out a first equipment identification type in the existing equipment identification types from the first release data table;
and calling a logic screening function, screening the existing equipment identifier included by the first equipment identifier type from the first release data table, and acquiring an existing equipment identifier set.
6. The method for updating patch information as claimed in claim 1, wherein the release data table further includes a redundant field for storing patch base information, the patch base information of the first patch file being stored in a second redundant field in the first release data table;
the method further comprises the following steps:
and obtaining the patch basic information of the first patch file based on the patch basic information stored in the second redundant field.
7. The patch information updating method according to claim 5, wherein the processing the first delivery data table based on the updated device identifier set and the inserted device identifier set to obtain updated first delivery data specifically includes:
updating the first equipment identifier in the existing equipment identifier set, which is the same as the equipment identifier in the updated equipment identifier set, to a release state;
and inserting a second device identifier in the inserted device identifier set into the existing device identifier set, and identifying the second device identifier as a release state.
8. A system for updating patch information is used for a patch release platform, wherein the patch release platform comprises a database storing N patch files, and the system is characterized in that the N patch files respectively define N patch classes, and the patch classes comprise patch basic information of the patch files corresponding to the patch classes; the patch platform also comprises N release data tables which are respectively logically associated with the N patch classes, wherein the release data tables are logically associated with the patch classes through the patch basic information; n is a positive integer;
the system comprises:
the first obtaining module is used for obtaining the patch releasing request parameter; the patch releasing request parameters comprise patch basic parameters and a target equipment identification set;
a patch determining module, configured to determine, based on the patch basic parameter, a first patch class matching the patch basic parameter from the N patch classes; the first patch class corresponds to a first patch file in the N patch files;
a second obtaining module, configured to obtain an existing device identifier set from a first release data table associated with the first patch class logic; the release data table comprises an existing equipment identification set, and the existing equipment identification set comprises equipment identifications of the client side equipment released by the first patch file;
the first screening module is used for screening out the equipment identifiers which are the same as the equipment identifiers in the existing equipment identifier set from the target equipment identifier set to obtain an updated equipment identifier set;
the second screening module is used for screening out the equipment identifiers which are different from the equipment identifiers in the existing equipment identifier set from the target equipment identifier set to obtain an inserted equipment identifier set;
the data processing module is used for processing the first release data table based on the updated equipment identifier set and the inserted equipment identifier set to obtain a processed first release data table;
and the patch updating module is used for writing the data in the processed first launching data table into the database and updating the launching information of the first patch file.
9. A readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the steps of the method of any of claims 1-7 are implemented when the program is executed by the processor.
CN202010049682.0A 2020-01-16 2020-01-16 Method, system, medium and electronic device for updating patch information Active CN110851169B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010049682.0A CN110851169B (en) 2020-01-16 2020-01-16 Method, system, medium and electronic device for updating patch information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010049682.0A CN110851169B (en) 2020-01-16 2020-01-16 Method, system, medium and electronic device for updating patch information

Publications (2)

Publication Number Publication Date
CN110851169A CN110851169A (en) 2020-02-28
CN110851169B true CN110851169B (en) 2020-04-21

Family

ID=69610819

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010049682.0A Active CN110851169B (en) 2020-01-16 2020-01-16 Method, system, medium and electronic device for updating patch information

Country Status (1)

Country Link
CN (1) CN110851169B (en)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6952823B2 (en) * 1998-09-01 2005-10-04 Pkware, Inc. Software patch generator using compression techniques
CN102156650B (en) * 2011-03-02 2014-06-25 奇智软件(北京)有限公司 Method and device capable of implementing automatic analysis of patch
CN105357318A (en) * 2015-12-08 2016-02-24 浪潮电子信息产业股份有限公司 Design method of intranet patch distribution management system
CN105763369B (en) * 2016-02-04 2018-08-17 湖南长城信息金融设备有限责任公司 A kind of terminal unit remote software version distribution method and system
US11354117B2 (en) * 2016-07-13 2022-06-07 Oracle International Corporation Adaptable patching mechanism for mixed memory systems
CN109918086A (en) * 2018-12-27 2019-06-21 北京奇安信科技有限公司 Patch file installation process method and device
CN110032388B (en) * 2019-04-04 2022-04-29 创新先进技术有限公司 Incremental file construction, publishing and downloading method and device

Also Published As

Publication number Publication date
CN110851169A (en) 2020-02-28

Similar Documents

Publication Publication Date Title
CN109242500B (en) Block chain transaction validity verification method and device and storage medium
CN111381858B (en) Application program upgrading method, server and terminal equipment
US9696977B2 (en) Method and system for allocating ID of software component
CN101645801A (en) Software version upgrading method based on cluster management and order exchange board
CN108256006B (en) Method and system for loading badge pictures in live broadcast room
CN104918114B (en) A kind of operating system update method and device
CN102202087B (en) Method for identifying storage equipment and system thereof
CN110225078B (en) Application service updating method, system and terminal equipment
GB2449037A (en) Multilayer distributed processing system
CN111111214B (en) Game archiving processing method, device and system
CN110535776B (en) Gateway current limiting method, device, gateway, system and storage medium
CN104699511A (en) Plug-in upgrading method and plug-in upgrading device
CN110990350B (en) Log analysis method and device
CN110543469A (en) Database version management method and server
CN112256930A (en) Method, device and system for batch generation of identification codes for distributed services
CN110851169B (en) Method, system, medium and electronic device for updating patch information
CN114185991A (en) Method and related device for realizing data synchronization based on distributed database
CN113821249A (en) Project development configuration method and device, electronic equipment and readable storage medium
CN109842482B (en) Information synchronization method, system and terminal equipment
US10740323B1 (en) Global uniqueness checking in distributed databases
CN115437703A (en) Business process arranging method, device, equipment and storage medium
CN106201606A (en) software distribution method and system
CN104301355A (en) Cluster heat disposition method and system based on single machine complete disposition and new old node pool
CN114328591A (en) Transaction execution method, device, equipment and storage medium
CN111857955A (en) Method for automatically constructing and updating resource configuration information in heterogeneous cloud environment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant