CN117762447A - Automatic updating method, device and equipment of software function package and storage medium - Google Patents
Automatic updating method, device and equipment of software function package and storage medium Download PDFInfo
- Publication number
- CN117762447A CN117762447A CN202311750168.XA CN202311750168A CN117762447A CN 117762447 A CN117762447 A CN 117762447A CN 202311750168 A CN202311750168 A CN 202311750168A CN 117762447 A CN117762447 A CN 117762447A
- Authority
- CN
- China
- Prior art keywords
- preset
- version
- file
- software function
- function package
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 66
- 230000004048 modification Effects 0.000 claims abstract description 40
- 238000012986 modification Methods 0.000 claims abstract description 40
- 238000012545 processing Methods 0.000 claims abstract description 26
- 238000004590 computer program Methods 0.000 claims description 5
- 230000006837 decompression Effects 0.000 claims description 5
- 230000006835 compression Effects 0.000 claims description 4
- 238000007906 compression Methods 0.000 claims description 4
- 230000006870 function Effects 0.000 description 90
- 238000010586 diagram Methods 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000011161 development Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 230000004931 aggregating effect Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Stored Programmes (AREA)
Abstract
The application provides an automatic updating method, device and equipment of a software function package and a storage medium, and relates to the technical field of Internet. Decompressing a preset software function package to obtain the current version of each type of file in the preset software function package; if the current version indicates that the version of the preset software functional package is lower than the preset version of the preset software development tool, modifying file contents corresponding to the current version in each class file into file contents corresponding to the preset version by adopting a preset byte code processing tool to obtain each class file after version modification; and compressing each class file after the version modification to generate a target software function package so as to call the target software function package by adopting a preset software development tool. By adopting the method, the preset software function package can be automatically updated to the preset version, the update efficiency of the preset software function package is improved, meanwhile, the manual update of the preset software function package is avoided, and the consumption of manpower and material resources is reduced.
Description
Technical Field
The present application relates to the field of internet technologies, and in particular, to a method, an apparatus, a device, and a storage medium for automatically updating a software function package.
Background
The current main stream version JDK (Java Development Kit) of JAVA ecology is JDK8 and JDK11, which still occupy 90%, and JDK17 is modified in many ways, such as JIT compiler, garbage collection period, language property, etc., and is also a version supported in the future for a long time.
However, the JAVA project of an individual or an enterprise often depends on functions provided by a large number of third party JAR packages (Java Archive File), but most of these JAR packages do not support JDK17, and if the JAR packages need to be upgraded to a version supporting JDK17, the traditional scheme needs to rewrite the JAR packages, so that a large amount of manpower and material resources are consumed when upgrading the JAR packages, which is more input and inefficient.
Disclosure of Invention
The present application provides a method, apparatus, device and storage medium for automatically updating a software function package, so as to solve the problems in the prior art.
The technical scheme adopted by the embodiment of the application is as follows:
in a first aspect, an embodiment of the present application provides an automatic update method for a software functional package, including:
decompressing a preset software function package to obtain the current version of each class file in the preset software function package;
if the current version indicates that the version of the preset software functional package is lower than the preset version of the preset software development tool, a preset byte code processing tool is adopted to modify the file content corresponding to the current version in each class file into the file content corresponding to the preset version, so that each class file with the modified version is obtained;
and compressing each class file after the version modification to generate a target software function package so as to call the target software function package by adopting the preset software development tool.
In an embodiment, before decompressing the preset software function package to obtain the current version of each class file in the preset software function package, the method further includes:
and reading the preset software function package according to the path parameters of the preset software function package.
In an embodiment, the decompressing the preset software function package to obtain the current version of each class file in the preset software function package includes:
decompressing the preset software function package to obtain each class file and basic attribute configuration file in the preset software function package;
and reading the current version of each class file from each class file or the basic attribute configuration file.
In an embodiment, before compressing each class file after the version modification and generating the target software function package, the method further includes:
modifying version configuration information of each type of files in the basic attribute configuration file into information corresponding to the preset version to obtain a modified basic attribute configuration file;
compressing each class file after the version modification to generate a target software function package, wherein the method comprises the following steps:
and compressing each class file after the version modification and the modified basic attribute configuration file to generate the target software function package.
In an embodiment, the modifying, by using a preset byte code processing tool, the file content corresponding to the current version in the class files to the file content corresponding to the preset version to obtain version-modified class files includes:
according to the upgrading specification of the preset version and the current version, determining interface information to be removed and interface information to be replaced in each class file;
and deleting the interface information to be removed in each class file by adopting the preset byte code processing tool, and adding the interface information to be replaced into each class file to obtain each class file after the version modification.
In an embodiment, the method further comprises:
acquiring a project object model file of a preset software project corresponding to the preset software development tool; and deleting the dependency relationship corresponding to the interface information to be removed in the project object model file, and adding the dependency relationship corresponding to the interface information to be replaced.
In an embodiment, after determining the interface information to be removed and the interface information to be replaced in the respective class files, the method further includes:
detecting whether the interface information to be replaced in each class file accords with a preset reflection condition;
and if the target interface information to be replaced in the various types of files does not meet the preset reflection condition, outputting alarm parameters aiming at the target interface information to be replaced to the basic attribute configuration file.
In a second aspect, an embodiment of the present application provides an automatic update apparatus for a software functional package, including:
the decompression module is used for decompressing the preset software function package to obtain the current version of each class of file in the preset software function package;
the modification module is used for modifying the file content corresponding to the current version in each type of file into the file content corresponding to the preset version by adopting a preset byte code processing tool if the current version indicates that the version of the preset software functional package is lower than the preset version of the preset software development tool, so as to obtain each type of file after version modification;
and the compression module is used for compressing each class file after the version modification to generate a target software function package so as to call the target software function package by adopting the preset software development tool.
In a third aspect, an embodiment of the present application provides an electronic device, including: the system comprises a processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor, when the electronic device runs, the processor and the storage medium are communicated through the bus, and the processor executes the program instructions to execute the automatic updating method of the software functional package according to any embodiment.
In a fourth aspect, embodiments of the present application provide a readable storage medium having a computer program stored thereon, where the computer program when executed by a processor performs the method for automatically updating a software functional package according to any of the above embodiments.
The beneficial effects of this application are: the application provides an automatic updating method, device, equipment and storage medium of a software function package, wherein the method comprises the steps of decompressing a preset software function package to obtain current versions of various files in the preset software function package; if the current version indicates that the version of the preset software functional package is lower than the preset version of the preset software development tool, modifying file contents corresponding to the current version in each class file into file contents corresponding to the preset version by adopting a preset byte code processing tool to obtain each class file after version modification; and compressing each class file after the version modification to generate a target software function package so as to call the target software function package by adopting a preset software development tool.
When the version of the preset software function package is lower than the preset version, the preset software function package can be automatically updated to the preset version by adopting the preset byte code processing tool, so that the updating efficiency of the preset software function package is improved, meanwhile, the manual updating of the preset software function package is avoided, and the consumption of manpower and material resources is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered limiting the scope, and that other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for automatically updating a software package according to an embodiment of the present application;
FIG. 2 is a second flowchart of an automatic update method of a software package according to an embodiment of the present application;
FIG. 3 is a third flow chart of an automatic update method of a software package according to an embodiment of the present application;
FIG. 4 is a flowchart illustrating a method for automatically updating a software package according to an embodiment of the present application;
FIG. 5 is a flowchart of a method for automatically updating a software package according to an embodiment of the present application;
FIG. 6 is a flowchart illustrating a method for automatically updating a software package according to an embodiment of the present application;
FIG. 7 is a schematic structural diagram of an automatic update device for a software functional package according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments.
Thus, the following detailed description of the embodiments of the present application, as provided in the accompanying drawings, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
Furthermore, the terms first, second and the like in the description and in the claims of the present application and in the above-described figures, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that, without conflict, features in embodiments of the present application may be combined with each other.
The embodiment of the application provides an automatic updating method of a software function package, which can be generated by any electronic device with processing and computing capabilities, and the electronic device can be, for example, a terminal-oriented electronic device or a rear-end server.
The method for automatically updating the software function package provided by the application is specifically illustrated by a plurality of examples in the following with reference to the accompanying drawings.
Fig. 1 is a flow chart of an automatic update method of a software function package according to an embodiment of the present application, as shown in fig. 1, the automatic update method of the software function package of the present embodiment includes:
s101, decompressing the preset software function package to obtain the current version of each type of file in the preset software function package.
The preset software function package may be, for example, a JAR file (Java Archive File) for aggregating a large number of Java class files, related metadata and resource files, and the preset software development tool may use the JAR file to develop Java platform application software or library.
S102, if the current version indicates that the version of the preset software functional package is lower than the preset version of the preset software development tool, a preset byte code processing tool is adopted to modify the file content corresponding to the current version in each class file into the file content corresponding to the preset version, and each class file after version modification is obtained.
Taking a JAR file as an example, a preset software development tool as JDK (Java Development Kit) and a JAR version with a preset version supporting JDK17 as a preset software function package, decompressing the JAR file to obtain the current version of each class file in the JAR file, and if the current version indicates that the version of the JAR file does not support JDK17, considering that the version of the JAR file is lower than the preset version, and adopting a preset byte code processing tool to modify the file content related to the current version in each class file of the JAR file into the file content supporting JDK17 to obtain each class file with the modified version.
The JDK is a Java software development tool and is mainly used for Java application programs on mobile equipment and embedded equipment, and the JDK is a Java development core and comprises a Java running environment and a Java tool; the preset bytecode processing tool may be, for example, an ASM, which is a Java bytecode manipulation framework that is capable of modifying existing class files in binary form or dynamically generating class files.
When the JAR file does not support JDK17, ASM is adopted, so that file contents of current versions in various types of files of the JAR file can be modified into file contents supporting JDK17, and the JAR file is automatically upgraded to a version supporting JDK 17.
S103, compressing each class file after version modification to generate a target software function package so as to call the target software function package by adopting a preset software development tool.
After each class file with the modified version is obtained, each class file with the modified version is compressed to generate a target software function package, so that the target software function package is called by adopting a preset software development tool.
For example, after modifying the file content of each class file about the current version in the JAR file into the file content supporting JDK17, compressing each class file after version modification to generate the JAR file supporting JDK17, and calling the JAR file by a preset software development tool (JDK 17).
In summary, the present embodiment provides an automatic update method for a software function package, which adopts a preset byte code processing tool, when the version of the preset software function package is lower than the preset version, the preset software function package can be automatically updated to the preset version, so that the update efficiency of the preset software function package is improved, meanwhile, the manual update of the preset software function package is avoided, and the consumption of manpower and material resources is reduced.
In an embodiment, before decompressing the preset software function package to obtain the current version of each class of files in the preset software function package, all files in the preset software function package need to be read according to path parameters of the preset software function package, and the preset software function package can be decompressed after reading.
On the basis of the foregoing embodiment, fig. 2 is a second flow chart of an automatic update method of a software function package according to an embodiment of the present application, and as shown in fig. 2, the decompressing a preset software function package to obtain a current version of each class file in the preset software function package may include:
s201, decompressing the preset software function package to obtain each class file and basic attribute configuration file in the preset software function package.
The preset software function package comprises various class files and basic attribute configuration files, and the various class files and basic attribute configuration files in the preset software function package can be obtained by decompressing the preset software function package. The basic attribute configuration file contains description information of a preset software function package.
S202, reading the current version of each class file from each class file or the basic attribute configuration file.
Taking a JAR file as an example, after being packaged by a JAR command, a manifest.mf directory is created as a basic attribute configuration file, and each class file also corresponds to one Major version information.
In this embodiment, the Created-By information in the manifest. Mf file may be read, or the Major version of any one class file may be read, and if the Created-By contains information below JDK17 or the Major version is below 62, it is determined that the current version of the JAR file is below a version capable of supporting JDK 17.
Fig. 3 is a third flow chart of an automatic update method of a software functional package according to an embodiment of the present application, as shown in fig. 3, where before compressing each class file after version modification to generate a target software functional package, the automatic update method of the software functional package may further include:
s301, modifying version configuration information of each class file in the basic attribute configuration file into information corresponding to a preset version to obtain a modified basic attribute configuration file.
And modifying the file content corresponding to the current version in each class file into the file content corresponding to the preset version to obtain each class file with the modified version, and modifying the version configuration information of each class file in the basic attribute configuration file into the information corresponding to the preset version to obtain the modified basic attribute configuration file.
The compressing the version-modified class files in S103 to generate the target software function package may include:
s302, compressing each class file after version modification and the basic attribute configuration file after modification to generate a target software function package.
After each class file after version modification and each basic attribute configuration file after modification are obtained, compressing each class file after version modification and each basic attribute configuration file after modification, and generating a target software function package, wherein each class file in the target software function package and information about the version in the basic attribute configuration file are modified into a version supporting JDK 17.
An embodiment of the present application further provides a specific implementation manner of modifying each class file, and fig. 4 is a schematic flow chart of a method for automatically updating a software function package provided in an embodiment of the present application, as shown in fig. 4, by adopting a preset byte code processing tool, modifying file contents corresponding to a current version in each class file into file contents corresponding to a preset version, so as to obtain each class file after version modification, where the method includes:
s401, according to the upgrade specification of the preset version and the current version, interface information to be removed and interface information to be replaced in each class file are determined.
Maven is a management tool for constructing and managing Java related items, in this embodiment, a Maven plug-in may be created, where the Maven plug-in is used to call a functional interface, the functional interface defines an upgrade specification of a preset version, and after executing the interface, the JAR file may be updated to a JAR file supporting JDK 17.
Specifically, according to the upgrade specification of the preset version and the current version of the JAR file, interface information to be removed and interface information to be replaced in each class file are determined. The interface information to be removed is information corresponding to the interface which is determined to not support JDK17 according to the current version of the JAR file; the interface information to be replaced is information corresponding to the determined interface supporting the JDK17 according to the upgrade specification of the preset version.
S402, deleting the interface information to be removed in each class file by adopting a preset byte code processing tool, and adding the interface information to be replaced into each class file to obtain each class file with modified version.
After determining the interface information to be removed and the interface information to be replaced in each class file through S401, a preset byte code processing tool (for example, ASM) is adopted to delete the interface information to be removed in each class file, and the interface information to be replaced is added into each class file, so that each class file with modified version can be obtained.
Optionally, deleting the interface information to be removed in each class file, and adding the interface information to be replaced to each class file, and modifying the name of the class file into the name of the class file of the interface information to be replaced.
Fig. 5 is a fifth flowchart of an automatic update method of a software functional package according to an embodiment of the present application, where, as shown in fig. 5, the automatic update method of a software functional package further includes:
s501, acquiring a project object model file of a preset software project corresponding to a preset software development tool.
Taking JDK17 as an example of the preset software development tool, the corresponding preset software item is a JDK17 item created in JDK17, and the item object model file is a POM file, i.e. the item construction file of JDK17 item.
S502, deleting the dependency relationship corresponding to the interface information to be removed in the project object model file, and adding the dependency relationship corresponding to the interface information to be replaced.
After a project object model file of a preset software project corresponding to a preset software development tool is obtained, deleting a dependency relationship corresponding to interface information to be removed in the project object model file, adding a dependency relationship corresponding to interface information to be replaced, and finishing modification of each class file.
Taking a target software functional package as a JAR file supporting JDK17 as an example, when a JDK17 item is created, the dependency relationship of the original low-version JAR file in the POM dependency list of the JDK17 item is replaced by the dependency relationship of the JAR file supporting JDK 17.
Fig. 6 is a sixth flowchart of an automatic update method of a software function package according to an embodiment of the present application, as shown in fig. 6, after determining interface information to be removed and interface information to be replaced in each class file in S401, the automatic update method of a software function package further includes:
s601, detecting whether the interface information to be replaced in each class file meets preset reflection conditions.
The JAVA reflection mechanism is a reflection mechanism which can know all the attributes and methods of any entity class and can call any method and attribute of any object in the running state, and the functions of dynamically acquiring information and dynamically calling the object method are called JAVA language.
In this embodiment, after determining the interface information to be removed and the interface information to be replaced in each class file, it is required to detect whether the interface information to be replaced in each class file meets a preset reflection condition.
S602, if the target interface information to be replaced in each class file does not meet the preset reflection condition, outputting alarm parameters aiming at the target interface information to be replaced to the basic attribute configuration file.
If the target interface information to be replaced in each class file does not meet the preset reflection condition, outputting alarm parameters aiming at the target interface information to be replaced to the basic attribute configuration file.
For example, for unsafe reflective use, VM parameters (- -add-ports or- -add-options) are output to a specified vmotion. Txt file, thereby improving security when modifying the content of class files.
The following further explains the device, the apparatus and the storage medium for executing the method for automatically updating a software function package according to any of the embodiments of the present application, where the specific implementation process and the technical effects of the device, the apparatus and the storage medium are the same as those of the corresponding method embodiments, and for brevity, no reference is made to the corresponding content in the method embodiments in the following embodiments.
On the basis of the method for automatically updating a software function package provided in the foregoing embodiment, an embodiment of the present application provides an apparatus for automatically updating a software function package, and fig. 7 is a schematic structural diagram of the apparatus for automatically updating a software function package provided in an embodiment of the present application, where, as shown in fig. 7, the apparatus for automatically updating a software function package includes:
and the decompression module 10 is used for decompressing the preset software function package to obtain the current version of each type of file in the preset software function package.
And the modification module 20 is configured to modify file contents corresponding to the current version in each class file into file contents corresponding to the preset version by using a preset byte code processing tool if the current version indicates that the version of the preset software function package is lower than the preset version of the preset software development tool, so as to obtain each class file after version modification.
The compression module 30 is configured to compress each class file after the version modification to generate a target software function package, so as to invoke the target software function package by using a preset software development tool.
In an embodiment, the decompression module 10 is further configured to, before decompressing a preset software function package to obtain a current version of each class file in the preset software function package, read the preset software function package according to a path parameter of the preset software function package.
In an embodiment, the decompression module 10 is further configured to decompress the preset software function package to obtain the respective class files and the basic attribute configuration file in the preset software function package; and reading the current version of each class file from each class file or the basic attribute configuration file.
In an embodiment, the modification module 20 is further configured to modify version configuration information of each class file in the basic attribute configuration file to information corresponding to the preset version before compressing each class file after the version modification to generate the target software function package, so as to obtain a modified basic attribute configuration file.
The compression module 30 is further configured to compress each class file after the version modification and the modified basic attribute configuration file, so as to generate the target software function package.
In an embodiment, the modification module 20 is further configured to determine interface information to be removed and interface information to be replaced in the respective class files according to the upgrade specification of the preset version and the current version; and deleting the interface information to be removed in each class file by adopting the preset byte code processing tool, and adding the interface information to be replaced into each class file to obtain each class file after the version modification.
In an embodiment, the modification module 20 is further configured to obtain a project object model file of a preset software project corresponding to the preset software development tool; and deleting the dependency relationship corresponding to the interface information to be removed in the project object model file, and adding the dependency relationship corresponding to the interface information to be replaced.
In an embodiment, the automatic updating device of the software functional package further includes a detection module, configured to detect whether the interface information to be replaced in each class file meets a preset reflection condition after determining the interface information to be removed and the interface information to be replaced in each class file; if the target interface information to be replaced in each class file does not meet the preset reflection condition, outputting alarm parameters aiming at the target interface information to be replaced to the basic attribute configuration file.
The foregoing apparatus is used for executing the method provided in the foregoing embodiment, and its implementation principle and technical effects are similar, and are not described herein again.
The above modules may be one or more integrated circuits configured to implement the above methods, for example: one or more application specific integrated circuits (Application Specific Integrated Circuit, abbreviated as ASICs), or one or more microprocessors, or one or more field programmable gate arrays (Field Programmable Gate Array, abbreviated as FPGAs), etc. For another example, when a module above is implemented in the form of a processing element scheduler code, the processing element may be a general-purpose processor, such as a central processing unit (Central Processing Unit, CPU) or other processor that may invoke the program code. For another example, the modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
An embodiment of the present application further provides an electronic device, and fig. 8 is a schematic structural diagram of the electronic device provided in an embodiment of the present application, as shown in fig. 8, where the electronic device includes: the processor 100, the storage medium 200 and the bus 300, wherein the storage medium stores program instructions executable by the processor, when the electronic device is running, the processor communicates with the storage medium through the bus, and the processor executes the program instructions to perform the automatic update method of the software functional package according to any one of the above embodiments.
An embodiment of the present application further provides a readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the automatic update method of the software functional package described in any one of the foregoing embodiments is performed.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in hardware plus software functional units.
The integrated units implemented in the form of software functional units described above may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium, and includes several instructions for causing an electronic device (which may be a personal computer, a server, or a network device, etc.) or a processor (english: processor) to perform part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: u disk, mobile hard disk, read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.
The foregoing is merely a specific embodiment of the present application, but the protection scope of the present application is not limited thereto, and any changes or substitutions easily conceivable by those skilled in the art within the technical scope of the present application should be covered in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims (10)
1. A method for automatically updating a software functional package, comprising:
decompressing a preset software function package to obtain the current version of each class file in the preset software function package;
if the current version indicates that the version of the preset software functional package is lower than the preset version of the preset software development tool, a preset byte code processing tool is adopted to modify the file content corresponding to the current version in each class file into the file content corresponding to the preset version, so that each class file with the modified version is obtained;
and compressing each class file after the version modification to generate a target software function package so as to call the target software function package by adopting the preset software development tool.
2. The method of claim 1, wherein the decompressing the preset software function package further comprises, before obtaining the current version of each class file in the preset software function package:
and reading the preset software function package according to the path parameters of the preset software function package.
3. The method of claim 1, wherein decompressing the preset software function package to obtain the current version of each class file in the preset software function package comprises:
decompressing the preset software function package to obtain each class file and basic attribute configuration file in the preset software function package;
and reading the current version of each class file from each class file or the basic attribute configuration file.
4. The method of claim 3, wherein the compressing the version-modified class files further comprises, prior to generating the target software package:
modifying version configuration information of each type of files in the basic attribute configuration file into information corresponding to the preset version to obtain a modified basic attribute configuration file;
compressing each class file after the version modification to generate a target software function package, wherein the method comprises the following steps:
and compressing each class file after the version modification and the modified basic attribute configuration file to generate the target software function package.
5. The method of claim 1, wherein the modifying, with a preset byte code processing tool, the file content corresponding to the current version in the class files to the file content corresponding to the preset version to obtain the class files with modified versions includes:
according to the upgrading specification of the preset version and the current version, determining interface information to be removed and interface information to be replaced in each class file;
and deleting the interface information to be removed in each class file by adopting the preset byte code processing tool, and adding the interface information to be replaced into each class file to obtain each class file after the version modification.
6. The method of claim 5, wherein the method further comprises:
acquiring a project object model file of a preset software project corresponding to the preset software development tool;
and deleting the dependency relationship corresponding to the interface information to be removed in the project object model file, and adding the dependency relationship corresponding to the interface information to be replaced.
7. The method of claim 5, wherein after determining the interface information to be removed and the interface information to be replaced in the respective class files, the method further comprises:
detecting whether the interface information to be replaced in each class file accords with a preset reflection condition;
and if the target interface information to be replaced in the various types of files does not meet the preset reflection condition, outputting alarm parameters aiming at the target interface information to be replaced to a basic attribute configuration file.
8. An automatic update apparatus for a software functional package, comprising:
the decompression module is used for decompressing the preset software function package to obtain the current version of each class of file in the preset software function package;
the modification module is used for modifying the file content corresponding to the current version in each type of file into the file content corresponding to the preset version by adopting a preset byte code processing tool if the current version indicates that the version of the preset software functional package is lower than the preset version of the preset software development tool, so as to obtain each type of file after version modification;
and the compression module is used for compressing each class file after the version modification to generate a target software function package so as to call the target software function package by adopting the preset software development tool.
9. An electronic device, comprising: a processor, a storage medium and a bus, the storage medium storing program instructions executable by the processor, the processor and the storage medium communicating via the bus when the electronic device is running, the processor executing the program instructions to perform the method of automatically updating a software functional package according to any one of claims 1 to 7.
10. A readable storage medium, characterized in that the storage medium has stored thereon a computer program which, when executed by a processor, performs the method of automatically updating a software package according to any of claims 1 to 7.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311750168.XA CN117762447A (en) | 2023-12-19 | 2023-12-19 | Automatic updating method, device and equipment of software function package and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311750168.XA CN117762447A (en) | 2023-12-19 | 2023-12-19 | Automatic updating method, device and equipment of software function package and storage medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN117762447A true CN117762447A (en) | 2024-03-26 |
Family
ID=90321506
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202311750168.XA Pending CN117762447A (en) | 2023-12-19 | 2023-12-19 | Automatic updating method, device and equipment of software function package and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN117762447A (en) |
-
2023
- 2023-12-19 CN CN202311750168.XA patent/CN117762447A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR101963912B1 (en) | Application compatibility with library operating systems | |
| US10114745B2 (en) | Assisted garbage collection in a virtual machine | |
| US9754242B2 (en) | Deployment mechanism for non-versioning business process artifacts | |
| EP3336690A1 (en) | Extensible data transformation authoring and validation system | |
| US20090254575A1 (en) | Apparatus and method for manipulating nested archive files and folders | |
| KR20150042297A (en) | Dynamically loading graph-based computations | |
| EP4268107B1 (en) | Detecting added functionality in open source package | |
| CN110737460A (en) | platform project management method and device | |
| CN111008034A (en) | Patch generation method and device | |
| WO2015195418A1 (en) | Software package management | |
| CN112883009B (en) | Method and device for processing data | |
| CN113138768B (en) | Application package generation method, device, electronic device and readable storage medium | |
| CN114253587A (en) | Application program updating method, apparatus, electronic device and readable storage medium | |
| CN113296854A (en) | Data loading method and system, electronic equipment and storage medium | |
| CN108647032A (en) | Using loading method and device, computer installation and computer readable storage medium | |
| WO2025020398A1 (en) | Smart-contract calling method and execution method, and computer device and storage medium | |
| CN115237631A (en) | Easily-extensible data sharing system and method based on data sharing plug-in | |
| CN118132203A (en) | Container management method, device, equipment and medium | |
| KR101117165B1 (en) | Web platform unit for mobile terminal connectioned web-application program in heterogeneous operating system | |
| CN117707543A (en) | Application installation package manufacturing and installation method, computing device and storage medium | |
| CN115543486A (en) | Cold start delay optimization method, device and equipment for serverless computing | |
| CN111290740A (en) | Application program development method and device, computer equipment and storage medium | |
| CN114860202A (en) | Project operation method, device, server and storage medium | |
| CN117762447A (en) | Automatic updating method, device and equipment of software function package and storage medium | |
| CN105610908B (en) | A kind of samba service implementing method and system based on Android device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |