CN109213476B - Installation package generation method, computer readable storage medium and terminal equipment - Google Patents

Installation package generation method, computer readable storage medium and terminal equipment Download PDF

Info

Publication number
CN109213476B
CN109213476B CN201810922178.XA CN201810922178A CN109213476B CN 109213476 B CN109213476 B CN 109213476B CN 201810922178 A CN201810922178 A CN 201810922178A CN 109213476 B CN109213476 B CN 109213476B
Authority
CN
China
Prior art keywords
code
module
monitored
changed
target
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
CN201810922178.XA
Other languages
Chinese (zh)
Other versions
CN109213476A (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.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China 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 Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN201810922178.XA priority Critical patent/CN109213476B/en
Publication of CN109213476A publication Critical patent/CN109213476A/en
Application granted granted Critical
Publication of CN109213476B publication Critical patent/CN109213476B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation

Abstract

The invention belongs to the technical field of computers, and particularly relates to a method for generating an installation package based on big data, a computer readable storage medium and terminal equipment. The method monitors whether codes of all functional modules in a target project are changed or not, wherein the target project is a code project of a designated application program; if the code of any one functional module in the target engineering is changed, acquiring the preset influence index of each functional module; calculating the code change amount of the target engineering according to the influence indexes of the functional modules and whether the codes of the functional modules are changed; and if the code change amount of the target project is larger than a preset threshold value, packaging the target project to generate an application program installation package, and replacing the original installation package in the appointed download address. By the method and the device, the operation efficiency is greatly improved, the update frequency of the application program installation package is reduced, the number of times of downloading and updating by a user is reduced, and better user experience is obtained.

Description

Installation package generation method, computer readable storage medium and terminal equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method for generating an installation package, a computer readable storage medium, and a terminal device.
Background
With the rapid development of mobile internet technology, various application programs are layered endlessly, and great convenience is provided for the work and life of users. Generally, the application program adopts a stepwise iterative development mode, that is, the code engineering of the application program needs to be continuously updated according to actual conditions, and an application program installation package (APK) is generated by packaging for downloading and installing by a user.
In the prior art, special personnel are generally required to monitor the changing condition of the code engineering of the application program, once a developer is found to change the code engineering, the code engineering is manually packed and uploaded to generate an installation package, the time and the labor are consumed in the mode, the efficiency is extremely low, the update frequency of the application program installation package is high, the user is required to frequently download and update, and the experience is poor.
Disclosure of Invention
In view of the above, the embodiments of the present invention provide a method for generating an installation package, a computer readable storage medium, and a terminal device, so as to solve the problems that the existing installation package generation depends on manual operation, and the installation package update frequency is high, and the user experience is affected.
A first aspect of an embodiment of the present invention provides a method for generating an installation package, which may include:
monitoring whether codes of all functional modules in a target project are changed or not, wherein the target project is a code project of a designated application program;
if the code of any one functional module in the target engineering is changed, acquiring the preset influence index of each functional module;
calculating the code change amount of the target engineering according to the influence indexes of the functional modules and whether the codes of the functional modules are changed;
and if the code change amount of the target project is greater than a preset threshold value, packaging the target project to generate an application program installation package, and replacing an original installation package in a designated download address, wherein the original installation package is the application program installation package generated by packaging the target project before the code is changed.
A second aspect of embodiments of the present invention provides a computer-readable storage medium storing computer-readable instructions that when executed by a processor perform the steps of:
monitoring whether codes of all functional modules in a target project are changed or not, wherein the target project is a code project of a designated application program;
if the code of any one functional module in the target engineering is changed, acquiring the preset influence index of each functional module;
calculating the code change amount of the target engineering according to the influence indexes of the functional modules and whether the codes of the functional modules are changed;
and if the code change amount of the target project is greater than a preset threshold value, packaging the target project to generate an application program installation package, and replacing an original installation package in a designated download address, wherein the original installation package is the application program installation package generated by packaging the target project before the code is changed.
A third aspect of an embodiment of the present invention provides a terminal device, including a memory, a processor, and computer readable instructions stored in the memory and executable on the processor, the processor implementing the following steps when executing the computer readable instructions:
monitoring whether codes of all functional modules in a target project are changed or not, wherein the target project is a code project of a designated application program;
if the code of any one functional module in the target engineering is changed, acquiring the preset influence index of each functional module;
calculating the code change amount of the target engineering according to the influence indexes of the functional modules and whether the codes of the functional modules are changed;
and if the code change amount of the target project is greater than a preset threshold value, packaging the target project to generate an application program installation package, and replacing an original installation package in a designated download address, wherein the original installation package is the application program installation package generated by packaging the target project before the code is changed.
Compared with the prior art, the embodiment of the invention has the beneficial effects that: the embodiment of the invention determines whether the codes of all the functional modules in the code engineering are changed or not in an automatic monitoring mode, automatically packages and generates the application program installation package when the changes reach a certain degree, replaces the original installation package in the appointed download address, does not need any manual intervention in the whole process, is realized in an automatic mode, and greatly improves the operation efficiency. In addition, the embodiment of the invention introduces the code change amount to measure the change condition of the code engineering, when the code change amount is smaller, the packing operation is not executed, and only when the code change amount is large enough, the packing operation is executed, thereby greatly reducing the update frequency of the application program installation package, reducing the times of downloading and updating by a user and obtaining better user experience.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of one embodiment of a method for generating an installation package according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of monitoring whether code changes have occurred for each functional module in a target project using a message digest collation approach;
FIG. 3 is a schematic flow chart of monitoring whether code changes have occurred to various functional modules in a target project using code change log records;
FIG. 4 is a schematic flow chart of a preset process of influencing an index;
FIG. 5 is a block diagram of one embodiment of an installation package generating apparatus according to an embodiment of the present invention;
fig. 6 is a schematic block diagram of a terminal device in an embodiment of the present invention.
Detailed Description
In order to make the objects, features and advantages of the present invention more comprehensible, the technical solutions in the embodiments of the present invention are described in detail below with reference to the accompanying drawings, and it is apparent that the embodiments described below are only some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, an embodiment of a method for generating an installation package according to an embodiment of the present invention may include:
and step S101, monitoring whether codes of all functional modules in the target engineering are changed.
The target project is a code project of a specified application program.
The target engineering in the present embodiment is divided by functional modules, for example, may be divided by a communication module, an image processing module, an audio processing module, a camera module, … …, and the like.
In a specific implementation of this embodiment, whether the codes of the functional modules in the target engineering are changed may be monitored through steps shown in fig. 2.
Step S201, reading the first message digest values of the codes of the respective functional modules from a preset database.
The first message digest value is a message digest value obtained by calculating the code of the functional module before the code is changed by using a preset message digest algorithm.
Specifically, the first message digest values of the codes of the respective functional modules may be calculated in advance, respectively, according to the following formulas:
MsgDigVal′ n =MsgDigFunc(ModCode′ n )
wherein N is the serial number of the functional modules, N is more than or equal to 1 and less than or equal to N, N is the total number of the functional modules in the target engineering, modCode' n The MsgDigFunc is the message digest algorithm, and MsgDigVal 'is the original code of the nth functional module in the target engineering, namely the code of the functional module before the current monitoring' n A first message digest value that is the code of the nth functional module in the target project.
The message digest algorithm in this embodiment includes, but is not limited to, the MD5 algorithm, the SHA-1 algorithm, and various variations thereof.
After the first message digest value of the code of each functional module is pre-calculated, it may be stored in a database for use in a subsequent comparison.
Step S202, calculating second message digest values of codes of the functional modules respectively.
Specifically, the second message digest values of the codes of the respective functional modules may be calculated according to the following formulas:
MsgDigVal n =MsgDigFunc(ModCode n )
wherein N is the serial number of the functional modules, N is more than or equal to 1 and less than or equal to N, N is the total number of the functional modules in the target engineering, modCode n For the code of the nth functional module in the target engineering, msgDigFunc is the message digest algorithm, and MsgDigVal n A second message digest value that is the code of the nth functional module in the target project.
Step S203, determining whether the first message digest value and the second message digest value of the code of the module to be monitored are consistent.
The module to be monitored is any one functional module in the target engineering.
Since the first message digest value is the message digest value of the code of the function module before the current monitoring, and the second message digest value is the message digest value of the code of the function module during the current monitoring, if the code is not changed, the two should be identical, if the code is changed, the two should be different, so that the first message digest value and the second message digest value of the code of the module to be monitored can be compared, if the first message digest value and the second message digest value of the code of the module to be monitored are identical, step S204 is executed, and if the first message digest value and the second message digest value of the code of the module to be monitored are not identical, step S205 is executed.
And step S204, judging that the code of the module to be monitored is not changed.
Step S205, the code of the module to be monitored is judged to be changed.
In a specific implementation of this embodiment, whether the codes of the functional modules in the target engineering are changed may be monitored through the steps shown in fig. 3.
Step 301, a code change record of the module to be monitored is read from a preset code change log.
The module to be monitored is any one functional module in the target engineering.
The code change log is used for recording each modification to the code, and the terminal equipment automatically records each modification as a code change record, wherein the code change log comprises a plurality of code change records. Each code change record may include the following three departments: modification time, modification object (i.e., which functional module is targeted), and specific modification content.
For example, the code change log may be represented in tabular form as follows:
and step S302, judging whether a newly added code change record exists after the reference time according to the code change time in the code change record of the module to be monitored.
And the reference time is the time when the original installation package is generated by packing the target engineering before the code is changed.
If the code change record of the module to be monitored does not have the code change record newly added after the reference time, step S303 is executed, and if the code change record of the module to be monitored has the code change record newly added after the reference time, step S304 is executed.
And step S303, judging that the code of the module to be monitored is not changed.
And step S304, judging that the code of the module to be monitored is changed.
It should be noted that, the method of message digest checking shown in fig. 2 and the method of code change log recording shown in fig. 3 are merely two specific ways of monitoring whether the codes of the functional modules in the target engineering are changed, and in practical application, other monitoring ways may be selected according to practical situations, which is not limited in this embodiment.
Step S102, if the code of any one of the functional modules in the target engineering is changed, the preset influence indexes of the functional modules are obtained.
In this embodiment, the impact index of each functional module is mainly evaluated by the number of abnormal times of each functional module in the actual use process of the application program, that is, if the number of abnormal times of a certain functional module in the actual use process of the application program is greater, the code in the functional module needs to be modified more urgently, and if the number of abnormal times of a certain functional module in the actual use process of the application program is less, the code in the functional module needs to be modified less urgently, and if the number of abnormal times of the certain functional module in the actual use process of the application program is less, the impact index of the functional module is also lower.
Further, the influence of time needs to be considered, since the code is continuously changed, some anomalies are repaired along with the change of the code, the anomalies are no longer generated later, and some anomalies are generated along with the change of the code, so that the longer the time period, the less the influence is on the current, and the closer the time period, the more the influence is on the current.
Specifically, as shown in fig. 4, the preset process of the impact index may include:
step S401, acquiring a history usage record of the application program in a preset statistical period from the database.
The statistical period can be set to 1 month, 2 months, 3 months, half year, one year or other values according to actual conditions, and the data which is too far is not significant in reference to the data, so that the data is generally set within one year.
Step S402, dividing the statistical period into T subperiods.
T is a positive integer, and the value of T can be set according to practical situations, for example, the value of T can be set to be 5, 10, 20 or other values. Note that the larger the value of T is, the larger the calculation amount is, but the higher the calculation accuracy is; the smaller the value of T, the larger the calculation amount, but the lower the calculation accuracy, the two needs to be weighted according to the actual situation.
And step S403, counting the abnormal times of each functional module in each sub-period according to the history use record.
And S404, respectively calculating the influence indexes of the functional modules.
Specifically, the impact index of each functional module may be calculated according to the following equation:
wherein T is the sequence number of the subperiod, T is more than or equal to 1 and less than or equal to T, and AbnNum n,t Impdieg is the number of times an abnormality occurs in the nth functional module within the nth subperiod n Is the impact index of the nth functional module.
And step S103, calculating the code change amount of the target project according to the influence indexes of the functional modules and whether the codes of the functional modules are changed.
Specifically, the code change amount of the target project may be calculated according to the following formula:
wherein StdScore is a preset standard score, modBool n Detecting a Boolean value for an nth functional module, an
ChangeScore is the code change amount of the target project.
And step S104, judging whether the code change amount of the target project is larger than a preset threshold value.
The threshold may be set according to the actual situation, for example, it may be set to 50, 100, 200 or other values.
If the code change amount of the target project is smaller than or equal to the threshold value, the code change amount of the target project is not large enough, and the process returns to the step S101 and the following steps until the code change amount of the target project is larger than the threshold value.
If the code change amount of the target project is greater than the threshold, it is indicated that the code change amount of the target project is already sufficiently large, and step S105 is performed.
And step 105, packaging the target engineering to generate an application program installation package, and replacing the original installation package in the appointed download address.
The original installation package is an application program installation package generated by packaging the target engineering before the code is changed.
The download address may be an address in each application mall for a user to download an installation package of the installation application.
In summary, the embodiment of the invention determines whether the codes of each functional module in the code engineering are changed in an automatic monitoring manner, automatically packages and generates the application program installation package when the changes reach a certain degree, replaces the original installation package in the designated download address, does not need any manual intervention in the whole process, and is realized in an automatic manner, so that the operation efficiency is greatly improved. In addition, the embodiment of the invention introduces the code change amount to measure the change condition of the code engineering, when the code change amount is smaller, the packing operation is not executed, and only when the code change amount is large enough, the packing operation is executed, thereby greatly reducing the update frequency of the application program installation package, reducing the times of downloading and updating by a user and obtaining better user experience.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present invention.
Corresponding to the method for generating an installation package described in the foregoing embodiments, fig. 5 shows a block diagram of an embodiment of an installation package generating device according to an embodiment of the present invention.
In this embodiment, a generating device of an installation package may include:
the code change monitoring module 501 is configured to monitor whether codes of each functional module in a target project are changed, where the target project is a code project of a specified application program;
the impact index obtaining module 502 is configured to obtain an impact index preset by each functional module if a code of any functional module in the target project is changed;
a code change amount calculation module 503, configured to calculate a code change amount of the target project according to the impact index of each functional module and whether the code of each functional module is changed;
and the installation package generating module 504 is configured to package the target project to generate an application installation package if the code change amount of the target project is greater than a preset threshold value, and replace an original installation package in a designated download address, where the original installation package is the application installation package generated by packaging the target project before the code is changed.
Optionally, the code change monitoring module may include:
a first message digest value obtaining unit, configured to respectively read, from a preset database, a first message digest value of a code of each functional module, where the first message digest value is a message digest value obtained by calculating, using a preset message digest algorithm, a code of the functional module before the code is changed;
a second message digest value calculation unit for calculating second message digest values of codes of the respective function modules, respectively, according to the following formulas:
MsgDigVal n =MsgDigFunc(ModCode n )
wherein N is the serial number of the functional modules, N is more than or equal to 1 and less than or equal to N, N is the total number of the functional modules in the target engineering, modCode n For the code of the nth functional module in the target engineering, msgDigFunc is the message digest algorithm, and MsgDigVal n A second message digest value that is the code of the nth functional module in the target project;
the message digest value comparison unit is used for comparing the first message digest value with the second message digest value of the code of the module to be monitored, wherein the module to be monitored is any functional module in the target engineering;
the first judging unit is used for judging that the code of the module to be monitored is not changed if the first message digest value of the code of the module to be monitored is consistent with the second message digest value;
and the second judging unit is used for judging that the code of the module to be monitored is changed if the first message digest value of the code of the module to be monitored is inconsistent with the second message digest value.
Optionally, the code change monitoring module may include:
the code change record reading unit is used for reading a code change record of a module to be monitored in a preset code change log, wherein the module to be monitored is any one functional module in the target engineering;
the new record judging unit is used for judging whether a code change record newly added after a reference time exists according to the code change time in the code change records of the module to be monitored, wherein the reference time is the time when the target engineering before the code change is packed to generate the original installation package;
the third judging unit is used for judging that the code of the module to be monitored is not changed if the code change record newly added after the reference moment does not exist in the code change record of the module to be monitored;
and the fourth judging unit is used for judging that the code of the module to be monitored is changed if the code change record newly added after the reference moment exists in the code change record of the module to be monitored.
Further, the installation package generating device may further include:
the historical usage record acquisition module is used for acquiring the historical usage record of the application program in a preset statistical period from the database;
the sub-period dividing module is used for dividing the statistical period into T sub-periods, wherein T is a positive integer;
the abnormal times counting module is used for counting the times of abnormal occurrence of each functional module in each sub-period according to the history use record;
the influence index calculation module is used for calculating the influence index of each functional module according to the following formula:
wherein T is the sequence number of the subperiod, T is more than or equal to 1 and less than or equal to T, and AbnNum n,t Impdieg is the number of times an abnormality occurs in the nth functional module within the nth subperiod n Is the impact index of the nth functional module.
Further, the code change amount calculation module may include:
a code change amount calculation unit configured to calculate a code change amount of the target project according to the following equation:
wherein StdScore is a preset standard score, modBool n Detecting a Boolean value for an nth functional module, an
ChangeScore is the code change amount of the target project.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described apparatus, modules and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Fig. 6 shows a schematic block diagram of a terminal device according to an embodiment of the present invention, and for convenience of explanation, only a portion related to the embodiment of the present invention is shown.
In this embodiment, the terminal device 6 may be a computing device such as a desktop computer, a notebook computer, a palm computer, and a cloud server. The terminal device 6 may comprise: a processor 60, a memory 61, and computer readable instructions 62 stored in the memory 61 and executable on the processor 60, such as computer readable instructions for performing the method of generating an installation package described above. The processor 60, when executing the computer readable instructions 62, implements the steps in the above-described embodiments of the method of generating installation packages, such as steps S101 to S105 shown in fig. 1. Alternatively, the processor 60, when executing the computer readable instructions 62, performs the functions of the modules/units of the apparatus embodiments described above, such as the functions of the modules 501-504 shown in fig. 5.
Illustratively, the computer readable instructions 62 may be partitioned into one or more modules/units that are stored in the memory 61 and executed by the processor 60 to complete the present invention. The one or more modules/units may be a series of computer readable instruction segments capable of performing specific functions describing the execution of the computer readable instructions 62 in the terminal device 6.
The processor 60 may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 61 may be an internal storage unit of the terminal device 6, such as a hard disk or a memory of the terminal device 6. The memory 61 may be an external storage device of the terminal device 6, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the terminal device 6. Further, the memory 61 may also include both an internal storage unit and an external storage device of the terminal device 6. The memory 61 is used for storing the computer readable instructions as well as other instructions and data required by the terminal device 6. The memory 61 may also be used for temporarily storing data that has been output or is to be output.
The functional units in the embodiments of the present invention 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 software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution contributing to the prior art or in the form of a software product stored in a storage medium, comprising a number of computer readable instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing computer readable instructions.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A method of generating an installation package, comprising:
monitoring whether codes of all functional modules in a target project are changed or not, wherein the target project is a code project of a designated application program;
if the code of any one functional module in the target engineering is changed, acquiring the preset influence index of each functional module; wherein, the influence index of any one functional module is positively correlated with the abnormal times of the functional module;
calculating the code change amount of the target engineering according to the influence indexes of the functional modules and whether the codes of the functional modules are changed;
and if the code change amount of the target project is greater than a preset threshold value, packaging the target project to generate an application program installation package, and replacing an original installation package in a designated download address, wherein the original installation package is the application program installation package generated by packaging the target project before the code is changed.
2. The method for generating an installation package according to claim 1, wherein the monitoring whether the codes of the respective functional modules in the target project are changed comprises:
reading first message digest values of codes of all the functional modules from a preset database respectively, wherein the first message digest values are obtained by calculating the codes of the functional modules before the codes are changed by using a preset message digest algorithm;
calculating a second message digest value of the codes of the respective functional modules according to the following formulas:
MsgDigVal n =MsgDigFunc(ModCode n )
wherein N is the serial number of the functional modules, N is more than or equal to 1 and less than or equal to N, N is the total number of the functional modules in the target engineering, modCode n For the code of the nth functional module in the target engineering, msgDigFunc is the message digest algorithm, and MsgDigVal n For the nth functional module in the target engineeringA second message digest value of the code;
comparing a first message digest value with a second message digest value of a code of a module to be monitored, wherein the module to be monitored is any one functional module in the target engineering;
if the first message digest value of the code of the module to be monitored is consistent with the second message digest value, judging that the code of the module to be monitored is not changed;
and if the first message digest value and the second message digest value of the code of the module to be monitored are inconsistent, judging that the code of the module to be monitored is changed.
3. The method for generating an installation package according to claim 1, wherein the monitoring whether the codes of the respective functional modules in the target project are changed comprises:
reading a code change record of a module to be monitored in a preset code change log, wherein the module to be monitored is any one functional module in the target engineering;
judging whether a code change record newly added after a reference time exists according to the code change time in the code change record of the module to be monitored, wherein the reference time is the time when the original installation package is generated by packing the target engineering before the code is changed;
if the code change record of the module to be monitored does not exist in the code change record of the module to be monitored, judging that the code of the module to be monitored is not changed;
and if the code change record of the module to be monitored has the code change record newly added after the reference moment, judging that the code of the module to be monitored is changed.
4. The method for generating an installation package according to claim 1, wherein the process of presetting the impact index comprises:
acquiring a history use record of the application program in a preset statistical period from a preset database;
dividing the statistical period into T subperiods, wherein T is a positive integer;
counting the abnormal times of each functional module in each sub-period according to the history use record;
and calculating the influence indexes of the functional modules according to the following formula:
wherein T is the sequence number of the subperiod, T is 1-1, N is the sequence number of the functional module, N is 1-1, N is the total number of the functional modules in the target engineering, and AbnNum n,t Impdieg is the number of times an abnormality occurs in the nth functional module within the nth subperiod n Is the impact index of the nth functional module.
5. The method according to any one of claims 1 to 4, wherein the calculating the code change amount of the target project based on the impact index of each functional module and whether or not the code of each functional module is changed comprises:
calculating the code change amount of the target project according to the following formula:
wherein StdScore is a preset standard score, N is the serial number of the functional module, N is more than or equal to 1 and less than or equal to N, N is the total number of the functional modules in the target engineering, and ImpDeg n ModBool, the influence index of the nth functional module n Detecting a Boolean value for an nth functional module, anChangeScore is the code change amount of the target project.
6. A computer readable storage medium storing computer readable instructions which, when executed by a processor, implement the steps of the installation package generation method of any one of claims 1 to 5.
7. A terminal device comprising a memory, a processor, and computer readable instructions stored in the memory and executable on the processor, wherein the processor, when executing the computer readable instructions, performs the steps of:
monitoring whether codes of all functional modules in a target project are changed or not, wherein the target project is a code project of a designated application program;
if the code of any one functional module in the target engineering is changed, acquiring the preset influence index of each functional module; wherein, the influence index of any one functional module is positively correlated with the abnormal times of the functional module;
calculating the code change amount of the target engineering according to the influence indexes of the functional modules and whether the codes of the functional modules are changed;
and if the code change amount of the target project is greater than a preset threshold value, packaging the target project to generate an application program installation package, and replacing an original installation package in a designated download address, wherein the original installation package is the application program installation package generated by packaging the target project before the code is changed.
8. The terminal device according to claim 7, wherein monitoring whether the codes of the respective functional modules in the target project are changed comprises:
reading first message digest values of codes of all the functional modules from a preset database respectively, wherein the first message digest values are obtained by calculating the codes of the functional modules before the codes are changed by using a preset message digest algorithm;
calculating a second message digest value of the codes of the respective functional modules according to the following formulas:
MsgDigVal n =MsgDigFunc(ModCode n )
wherein N is the serial number of the functional modules, N is more than or equal to 1 and less than or equal to N, N is the total number of the functional modules in the target engineering, modCode n For the code of the nth functional module in the target engineering, msgDigFunc is the message digest algorithm, and MsgDigVal n A second message digest value that is the code of the nth functional module in the target project;
comparing a first message digest value with a second message digest value of a code of a module to be monitored, wherein the module to be monitored is any one functional module in the target engineering;
if the first message digest value of the code of the module to be monitored is consistent with the second message digest value, judging that the code of the module to be monitored is not changed;
and if the first message digest value and the second message digest value of the code of the module to be monitored are inconsistent, judging that the code of the module to be monitored is changed.
9. The terminal device according to claim 7, wherein monitoring whether the codes of the respective functional modules in the target project are changed comprises:
reading a code change record of a module to be monitored in a preset code change log, wherein the module to be monitored is any one functional module in the target engineering;
judging whether a code change record newly added after a reference time exists according to the code change time in the code change record of the module to be monitored, wherein the reference time is the time when the original installation package is generated by packing the target engineering before the code is changed;
if the code change record of the module to be monitored does not exist in the code change record of the module to be monitored, judging that the code of the module to be monitored is not changed;
and if the code change record of the module to be monitored has the code change record newly added after the reference moment, judging that the code of the module to be monitored is changed.
10. The terminal device according to any of the claims 7 to 9, characterized in that the presetting procedure of the impact index comprises:
acquiring a history use record of the application program in a preset statistical period from a preset database;
dividing the statistical period into T subperiods, wherein T is a positive integer;
counting the abnormal times of each functional module in each sub-period according to the history use record;
and calculating the influence indexes of the functional modules according to the following formula:
wherein T is the sequence number of the subperiod, T is 1-1, N is the sequence number of the functional module, N is 1-1, N is the total number of the functional modules in the target engineering, and AbnNum n,t Impdieg is the number of times an abnormality occurs in the nth functional module within the nth subperiod n Is the impact index of the nth functional module.
CN201810922178.XA 2018-08-14 2018-08-14 Installation package generation method, computer readable storage medium and terminal equipment Active CN109213476B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810922178.XA CN109213476B (en) 2018-08-14 2018-08-14 Installation package generation method, computer readable storage medium and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810922178.XA CN109213476B (en) 2018-08-14 2018-08-14 Installation package generation method, computer readable storage medium and terminal equipment

Publications (2)

Publication Number Publication Date
CN109213476A CN109213476A (en) 2019-01-15
CN109213476B true CN109213476B (en) 2023-10-17

Family

ID=64987978

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810922178.XA Active CN109213476B (en) 2018-08-14 2018-08-14 Installation package generation method, computer readable storage medium and terminal equipment

Country Status (1)

Country Link
CN (1) CN109213476B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109947454B (en) * 2019-03-29 2022-07-15 北京经纬恒润科技股份有限公司 Data processing method and system
CN110795114B (en) * 2019-10-29 2023-08-01 北京五八信息技术有限公司 Method and device for monitoring application program installation package capacity, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104426947A (en) * 2013-08-27 2015-03-18 中兴通讯股份有限公司 Terminal intelligent updating method and system, terminal and data updating server
CN106528079A (en) * 2016-09-23 2017-03-22 北京五八信息技术有限公司 Method and device for monitoring running state of React Native code
CN107832222A (en) * 2017-11-17 2018-03-23 广东小天才科技有限公司 The undercarriage control method and service equipment of a kind of application program
CN107885521A (en) * 2017-12-11 2018-04-06 凌云天博光电科技股份有限公司 Software engineering project automatically generates/update method, apparatus and system
CN108196878A (en) * 2018-01-22 2018-06-22 广东小天才科技有限公司 Generation method, device, electronic equipment and the storage medium of application program installation kit

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103677876A (en) * 2012-09-12 2014-03-26 中兴通讯股份有限公司 Manufacturing and installing method, device and system of software installation package
US10175978B2 (en) * 2016-11-04 2019-01-08 International Business Machines Corporation Monitoring code sensitivity to cause software build breaks during software project development

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104426947A (en) * 2013-08-27 2015-03-18 中兴通讯股份有限公司 Terminal intelligent updating method and system, terminal and data updating server
CN106528079A (en) * 2016-09-23 2017-03-22 北京五八信息技术有限公司 Method and device for monitoring running state of React Native code
CN107832222A (en) * 2017-11-17 2018-03-23 广东小天才科技有限公司 The undercarriage control method and service equipment of a kind of application program
CN107885521A (en) * 2017-12-11 2018-04-06 凌云天博光电科技股份有限公司 Software engineering project automatically generates/update method, apparatus and system
CN108196878A (en) * 2018-01-22 2018-06-22 广东小天才科技有限公司 Generation method, device, electronic equipment and the storage medium of application program installation kit

Also Published As

Publication number Publication date
CN109213476A (en) 2019-01-15

Similar Documents

Publication Publication Date Title
CN111026570B (en) Method and device for determining abnormal reason of business system
CN107832062B (en) Program updating method and terminal equipment
CN108388509B (en) Software testing method, computer readable storage medium and terminal equipment
CN108228722B (en) Method for detecting geographic space distribution uniformity of sampling points in crushing area
CN109583758B (en) Early warning rule correction method and device of monitoring system and computer equipment
CN109213476B (en) Installation package generation method, computer readable storage medium and terminal equipment
US20130041710A1 (en) Advanced Statistical Detection of Emerging Trends
JP2019512126A (en) Method and system for training a machine learning system
CN104426696A (en) Fault processing method and device
CN108108490B (en) Hive table scan method, apparatus, computer equipment and storage medium
CN116502166A (en) Prediction method, device, equipment and medium based on other equipment data
CN115689534A (en) Method, device, equipment and medium for managing equipment service life based on big data
US8930773B2 (en) Determining root cause
CN113609088A (en) File processing method, device and equipment
CN115270013B (en) Method and device for evaluating emission reduction measures during activity and electronic equipment
CN110458713B (en) Model monitoring method, device, computer equipment and storage medium
CN109783646B (en) Data processing method and device
CN110351330B (en) Data uploading method and device, computer equipment and storage medium
CN114801868A (en) Method, device, equipment and medium for dynamically correcting available power of battery
CN112463523A (en) Memory bank health state monitoring method, device, equipment and storage medium
US20130254894A1 (en) Information processing device, non-transitory computer readable medium, and information processing method
CN116069724A (en) Database performance snapshot using method, storage medium and equipment
JP7352107B2 (en) Arithmetic error warning device and arithmetic error warning program
CN111831677B (en) Data processing method and device
CN117314683B (en) Power operation and maintenance method, device, equipment and medium

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