CN116610345B - Application program upgrading method and device based on execution record table - Google Patents

Application program upgrading method and device based on execution record table Download PDF

Info

Publication number
CN116610345B
CN116610345B CN202310897578.0A CN202310897578A CN116610345B CN 116610345 B CN116610345 B CN 116610345B CN 202310897578 A CN202310897578 A CN 202310897578A CN 116610345 B CN116610345 B CN 116610345B
Authority
CN
China
Prior art keywords
application program
target
upgrade
database
target site
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
CN202310897578.0A
Other languages
Chinese (zh)
Other versions
CN116610345A (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.)
Shanghai Clinbrain Information Technology Co Ltd
Original Assignee
Shanghai Clinbrain Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Clinbrain Information Technology Co Ltd filed Critical Shanghai Clinbrain Information Technology Co Ltd
Priority to CN202310897578.0A priority Critical patent/CN116610345B/en
Publication of CN116610345A publication Critical patent/CN116610345A/en
Application granted granted Critical
Publication of CN116610345B publication Critical patent/CN116610345B/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/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides an application program upgrading method and device based on an execution record table, wherein the method comprises the following steps: acquiring upgrade data of at least one target application program corresponding to a target site; determining upgrade completion information of the at least one target application program; acquiring a script execution record list of a database corresponding to the target site; determining scripts to be upgraded of at least one database corresponding to the at least one target application program respectively according to a script execution record table of the database; and respectively upgrading at least one database corresponding to the at least one target application program according to the upgrading completion information and the scripts to be upgraded of the at least one database. The method can at least be used for solving the technical problems that in the related art, higher labor cost is consumed when the application program is updated in multiple fields, and the updating and updating efficiency is lower.

Description

Application program upgrading method and device based on execution record table
Technical Field
The present application relates to the field of information technologies, and in particular, to an application program upgrading method and apparatus based on an execution record table.
Background
A TABLE (TABLE) is a database object that includes all the data in the database, is a collection of structured data, and is the basis for the entire database system. Similar to spreadsheets, data is organized in a table in a row and column format. Each column in the table is designed to store some type of information (e.g., date, name, dollar amount, or number). There are several controls on the table (constraints, rules, default values and custom user data types) to ensure the validity of the data.
In the related art, when an application program including the table needs to be updated and upgraded, the step of updating and upgrading generally includes two steps, namely, running an upgrade package of the application program and performing an upgrade operation on the application program; secondly, after the application program is upgraded, running an upgrade script for the databases through an installed script running tool, such as navicat, sqldeveloper, DBeaver, mysqlAdmin, and performing operations of adding, deleting and the like on the structure and/or attribute values of the tables of the corresponding databases, wherein the upgrade of the tables of each database corresponds to an upgrade script.
However, the inventors found that there are at least the following technical problems in the related art:
Since the network is generally a local area network for internal use only in a multi-site scenario, the updated versions of applications including the table are different for different target sites in the multi-site scenario, where the multi-site scenario may be a site where medical branches, educational branches, etc. are distributed in different places, for example. Also, because of the large number of tables, the scripting tools used in different sites are different, and thus, it is generally necessary for an implementer to perform a separate update upgrade operation on each of the multiple sites. For example, an implementation personnel is required to accurately correspond to each field, each application program upgrade package and each corresponding database upgrade script, and accurately execute the upgrade steps by using various tools.
In general, in a multi-site scenario, on one hand, since the implementation sites corresponding to the multi-site are more and each time it is required to manually execute update and upgrade on one or more scripts of the application programs of different implementation sites, the cost of labor is high, and the update and upgrade efficiency is low; on the other hand, since the upgrade versions of the application programs including the table are different from one site to another, when related staff needs to update and prepare to execute the scripts, it is required to clearly know which scripts need to be executed, so that errors of executing more or less scripts easily occur, resulting in higher error rate and finally lower update and upgrade efficiency.
Disclosure of Invention
An object of the present application is to provide an application program upgrading method and device based on an execution record table, which are at least used for solving the technical problems of high labor cost and low upgrading efficiency when upgrading an application program in multiple sites in the related art.
In a first aspect, some embodiments of the present application provide an application program upgrading method based on an execution record table, the method including: acquiring upgrade data of at least one target application program corresponding to a target site; determining upgrade completion information of the at least one target application program; acquiring a script execution record list of a database corresponding to the target site; determining scripts to be upgraded of at least one database corresponding to the at least one target application program respectively according to a script execution record table of the database; and respectively upgrading at least one database corresponding to the at least one target application program according to the upgrading completion information and the scripts to be upgraded of the at least one database.
In a second aspect, some embodiments of the present application further provide an application upgrade apparatus based on an execution record table, the apparatus including: the first acquisition module is used for acquiring upgrading data of at least one target application program corresponding to the target site; a first determining module, configured to determine upgrade completion information of the at least one target application program; the second acquisition module is used for acquiring a script execution record list of the database corresponding to the target site; the second determining module is used for determining scripts to be upgraded of at least one database corresponding to the at least one target application program respectively according to the script execution record table of the database; and the upgrading module is used for respectively upgrading at least one database corresponding to the at least one target application program according to the upgrading completion information and at least one script to be upgraded of the database.
Optionally, the upgrade data of the target application program includes a target application program upgrade package and a listener configuration file, and the determining upgrade completion information of the at least one target application program includes: setting a listener of the target application program upgrading process based on the listener configuration file; and determining upgrading completion information of the at least one target application program based on monitoring of the upgrading process of the target application program upgrading packet by the monitor. The embodiment of the application provides a specific implementation way for determining the upgrade completion information of the at least one target application program, which is favorable for realizing flexible and changeable schemes.
Optionally, the obtaining a script execution record table of a database corresponding to the target site includes: before or after determining the upgrade completion information of the at least one target application program, a script execution record table of a database corresponding to the target site is acquired from a local storage of the target site. Therefore, the relevant staff can conveniently and efficiently know the upgrading change condition of the database corresponding to the current target site before or after the upgrading completion information of the at least one target application program, and particularly, if the execution condition of the script is to be checked, the relevant staff can directly inquire the corresponding database in the later stage, and the relevant staff can conveniently carry out comparison analysis on the relevant database, so that the relevant data can be conveniently maintained and the problems can be conveniently checked in the later stage.
Optionally, the upgrade data of the target application program includes a target application program upgrade package and an upgrade script of at least one database corresponding to the target application program; the determining, according to the script execution record table of the database, the script to be upgraded of the at least one database corresponding to the at least one target application program respectively includes: inquiring the script execution record table to acquire script execution information of at least one database corresponding to the target application program; and determining a script to be upgraded of at least one database corresponding to the at least one target application program based on the execution information of the script. In this way, a specific implementation manner of determining the script to be upgraded of at least one database corresponding to the at least one target application program respectively according to the script execution record table of the database is provided, which is favorable for realizing flexibility and variability of the scheme provided by the embodiment of the application.
Optionally, after determining the upgrade completion information of the at least one target application program, the method further includes: invoking a target interface corresponding to the at least one target application program sending the upgrade completion information, and acquiring a script execution record list of the database corresponding to the target site; after determining the scripts to be upgraded of the at least one database corresponding to the at least one target application program respectively according to the script execution record table of the database, the method further comprises: and calling the target class of the target site, and respectively upgrading at least one database corresponding to the at least one target application program according to the script to be upgraded of the at least one database. Thus, according to the script to be upgraded of at least one database, the at least one database corresponding to the at least one target application program can be automatically upgraded respectively.
Optionally, after the upgrading is completed on the at least one database corresponding to the at least one target application according to the upgrading completion information and the script to be upgraded of the at least one database, the method further includes: and updating the script execution record table according to the upgrade script information of at least one database of which the upgrade is completed. By the updating operation, errors such as manual operation, repeated execution, missing execution of the database upgrading script and the like can be avoided.
Optionally, before the step of obtaining the upgrade data of at least one target application program corresponding to the target site, the method further includes: acquiring application identification and application version information of at least one target application program corresponding to the target site, or acquiring application identification and application version information of at least one target application program corresponding to the target site, and database identification and database version information corresponding to each target application program; generating an upgrade plan of the target site based on the application identifier and the application version information corresponding to the target site or the application identifier and the application version information corresponding to the target site and the corresponding database identifier and database version information; and acquiring upgrade data of at least one target application program corresponding to the target site based on the upgrade plan of the target site. Therefore, after the application identifier and the application version information of at least one target application program corresponding to the target site or the application identifier and the application version information of at least one target application program corresponding to the target site and the database identifier and the database version information corresponding to each target application program are obtained, the upgrade plan of the target site is directly determined according to the information, so that the upgrade requirements of different application scenes can be met, a specific implementation mode for determining the upgrade plan of the target site is provided, and the scheme provided by the embodiment of the application is flexible and changeable.
Optionally, before the step of obtaining the upgrade data of at least one target application program corresponding to the target site, the method further includes: acquiring a field identifier of the target field; acquiring an upgrade plan of the target site based on the site identification; and acquiring upgrade data of at least one target application program corresponding to the target site based on the upgrade plan of the target site.
Optionally, the obtaining, based on the upgrade plan of the target site, upgrade data of at least one target application program corresponding to the target site includes: acquiring an upgrade data decryption password based on the field identifier; and decrypting the encrypted upgrade data of at least one target application program corresponding to the target site based on the upgrade data decryption password and the upgrade plan of the target site, and obtaining the upgrade data of the at least one target application program corresponding to the target site. Therefore, under the condition that the input/obtained field mark has errors, the corresponding upgrade data cannot be decrypted, and thus the upgrade of the target application program cannot be completed, the security of the upgrade data such as the upgrade package of the target application program and the execution script of the database can be ensured, the illegal leakage of related data is avoided, and the problem of upgrade errors can be further avoided.
Compared with the prior art, in the scheme provided by the embodiment of the application, the upgrade completion information of at least one target application program corresponding to a target site is determined by acquiring the upgrade data of the at least one target application program, the script execution record table of the database corresponding to the target site is acquired, the script to-be-upgraded of at least one database corresponding to the at least one target application program is further determined according to the script execution record table of the database, and then the at least one database corresponding to the at least one target application program is upgraded according to the upgrade completion information and the to-be-upgraded script of the at least one database, so that the automatic upgrade of the target application program of the target site is completed. Because the database corresponding to the target application program can be automatically updated according to the updating completion information and at least one script to be updated of the database, manual operation can be avoided, and thus, the situation that related staff need to manually execute updating and updating of one or more scripts of the target application program each time in different target sites is avoided, the labor cost can be reduced, and the updating efficiency is improved; meanwhile, in the embodiment of the application, different scripts to be updated in different target sites can be determined according to the script execution record table of the database, so that the technical problems that when related staff need to update and prepare to execute the scripts, the scripts need to be clearly known because the versions of the same application program in different target sites are not synchronous, and therefore, errors of executing more or less scripts easily occur, the error rate is higher, and finally, the updating and upgrading efficiency is lower are avoided in the process of realizing automatic updating.
Drawings
FIG. 1 is a flowchart illustrating an exemplary method for upgrading an application program based on an execution record table according to a first embodiment of the present application;
fig. 2 is a schematic flowchart of an exemplary process of step S102 in an application program upgrading method based on an execution record table according to a second embodiment of the present application;
fig. 3 is a schematic flowchart of an exemplary procedure of step S104 in an application program upgrading method based on an execution record table according to a third embodiment of the present application;
fig. 4 is a schematic flowchart illustrating an exemplary procedure of a step before step S101 in an application program upgrading method based on an execution record table according to a fourth embodiment of the present application;
fig. 5 is a schematic flowchart of another step before step S101 in an application program upgrading method based on an execution record table according to a fifth embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying 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 of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The following terms are used herein.
JDBC, english full name Java DataBase Connectivity, known as Java database connection, is an application API for database access.
Example 1
An embodiment of the present application provides an application program upgrading method based on an execution record table, as shown in fig. 1, the method may include the following steps:
step S101, upgrade data of at least one target application program corresponding to a target site is obtained;
step S102, determining upgrade completion information of the at least one target application program;
step S103, acquiring a script execution record list of a database corresponding to the target site;
step S104, determining scripts to be upgraded of at least one database corresponding to the at least one target application program respectively according to a script execution record table of the database;
step S105, respectively upgrading at least one database corresponding to the at least one target application according to the upgrade completion information and the script to be upgraded of the at least one database.
The above steps are described below.
Specifically, for step S101, in some examples, the target site is a site where communication with the outside is impossible through the internet, and communication is only possible inside the target site through a local area network, so that it is necessary to obtain the upgrade data corresponding to each of the different target sites through offline copying, for example, the target site may be a site where medical branches, educational branches, etc. are distributed in different places. The upgrade data may include an upgrade package of the target application program and an upgrade script of at least one database corresponding to the target application program.
It will be appreciated by those skilled in the art that in some examples, different target sites may correspond to upgrade data of different target applications, but in the related art, since network connection cannot be performed between different target sites, upgrade data corresponding to different target sites respectively needs to be acquired by offline copying. For example, the different target sites may include a target site A1, a target site A2, and a target site A3, where the target application may be the application 1 and/or the application 2 and/or the application 3, and then the upgrade data of the application 1 of the target site A1 may be obtained at the target site A1, the upgrade data of the application 1 and the application 2 of the target site A2 may be obtained at the target site A2, and the upgrade data of the application 1 and the application 3 of the target site A3 may be obtained at the target site A3. However, the target sites A1, A2 and A3 are independent and cannot interact with each other. Thus, the upgrade data of the application programs corresponding to the target site A1, the target site A2 and the target site A3 need to be obtained by offline copying. Moreover, the upgrade data of the application program 1 of the target site A1, the upgrade data of the application program 1 of the target site A2, and the upgrade data of the application program 1 of the target site A3 are often different, for example, the upgrade version of the application program 1 of the target site A1 is V1.1; the updated version of the application 1 of the target site A2 is V2.0; the upgrade version of the application program 1 of the target site A3 is V3.0, which results in higher labor cost when the upgrade of the application program is performed in multiple sites, lower upgrade efficiency and higher error rate.
Specifically, with respect to step S102, in some examples, the upgrade completion information of the at least one target application program may be upgrade completion information that the V1.1 version of the application program 1 of the target site A1 has been upgraded, or the like.
Specifically, with respect to step S103, in some examples, there may be one script execution record table corresponding to the target site, one script execution record table corresponding to the target application, or one script execution record table corresponding to the database, which is not limited in particular in the embodiment of the present application.
Optionally, in some embodiments of the present application, the obtaining a script execution record table of a database corresponding to the target site may further include: before or after determining the upgrade completion information of the at least one target application program, a script execution record table of a database corresponding to the target site is acquired from a local storage of the target site. Therefore, the relevant staff can conveniently and efficiently know the upgrading change condition of the database corresponding to the current target site before or after the upgrading completion information of the at least one target application program, and particularly, if the execution condition of the script is to be checked, the relevant staff can directly inquire the corresponding database in the later stage, and the relevant staff can conveniently carry out comparison analysis on the relevant database, so that the relevant data can be conveniently maintained and the problems can be conveniently checked in the later stage.
Specifically, with respect to step S104, in some examples, a script to be upgraded of at least one database corresponding to the at least one target application program respectively may be determined according to a script execution record table of the database. Such as database 1, database 2, and database 3, corresponding to application 1 of target site A1. According to the script execution record table of the database, a script to be upgraded for the database 1, a script to be upgraded for the database 2, and a script to be upgraded for the database 3 can be determined.
Specifically, with respect to step S105, in some examples, at least one database corresponding to the at least one target application program is further upgraded according to the upgrade completion information and the script to be upgraded of at least one database, respectively. If the version V1.1 of the application program 1 of the target site A1 has been upgraded, if at least one of the scripts to be upgraded of the database includes the script V1.1 to be upgraded of the database 1, the script V2.0 to be upgraded of the database 2, and the script V2.0 to be upgraded of the database 3, the upgrade is performed on the basis of the database 1 of the V1.0, the database 2 of the V1.0, and the database 3 of the V1.0, so as to obtain the database 1 of the version V1.1, the database 2 of the version V2.0, and the database 3 of the version V2.0, which correspond to the version V1.1 of the upgraded application program 1.
Optionally, in some embodiments of the present application, after the upgrading of the at least one database corresponding to the at least one target application is completed according to the upgrading completion information and the script to be upgraded of the at least one database, the method may further include: and updating the script execution record table according to the upgrade script information of at least one database of which the upgrade is completed. The script execution record table may be updated, for example, by inserting an upgrade script of at least one of the databases, which has been upgraded, into the script execution record table. By the updating operation, errors such as manual operation, repeated execution, missing execution of the database upgrading script and the like can be avoided.
Further, in some examples, the executed script may be marked, so that when traversing to the marked script again, the script is directly ignored without executing the script. Therefore, the technical problems that repeated execution is possibly caused by unfamiliar scripts of related staff, or error scripts of some scripts are rarely executed, the error rate is high, and the updating and upgrading efficiency is low are avoided.
It is easy to find that, according to the application program upgrading method based on the execution record table provided by the embodiment of the application, upgrading data of at least one target application program corresponding to a target site is obtained, upgrading completion information of the at least one target application program is determined, script execution record tables of databases corresponding to the target site are obtained, further, according to the script execution record tables of the databases, scripts to be upgraded of at least one database corresponding to the at least one target application program are determined, then, according to the upgrading completion information and the scripts to be upgraded of the at least one database, at least one database corresponding to the at least one target application program is upgraded respectively, and automatic upgrading of the target application program of the target site is completed. Because the database corresponding to the target application program can be automatically updated according to the updating completion information and at least one script to be updated of the database, manual operation can be avoided, and thus, the situation that related staff need to manually execute updating and updating of one or more scripts of the target application program each time in different target sites is avoided, the labor cost can be reduced, and the updating efficiency is improved; meanwhile, in the embodiment of the application, different scripts to be updated in different target sites can be determined according to the script execution record table of the database, so that the technical problems that when related staff need to update and prepare to execute the scripts, the scripts need to be clearly known because the versions of the same application program in different target sites are not synchronous, and therefore, errors of executing more or less scripts easily occur, the error rate is higher, and finally, the updating and upgrading efficiency is lower are avoided in the process of realizing automatic updating.
Example two
In the second embodiment of the present application, the upgrade data of the target application program includes a target application program upgrade package and a listener configuration file, and the determining the upgrade completion information of the at least one target application program, that is, step S102 may further include the following steps, as shown in fig. 2:
step S1021, setting a listener of the target application program upgrading process based on the listener configuration file;
step S1022, determining upgrade completion information of the at least one target application program based on the monitor monitoring of the upgrade process of the target application program upgrade package.
Specifically, in some examples, the upgrade data of the target application program may include a target application program upgrade package and a listener profile, so that a listener of the target application program upgrade process may be set according to the listener profile, and the listener listens to the upgrade process of the target application program upgrade package to determine upgrade completion information of whether the target application program is upgraded.
Specifically, in some examples, a fixed folder may be provided based on the target application upgrade package, and the fixed folder may further include an upgrade script corresponding to the database. In some other examples, the target application upgrade package and the upgrade script corresponding to the database may also be stored separately. The embodiment of the present application is not particularly limited thereto.
Specifically, in some examples, the relevant staff may import the target application upgrade package, or the target application upgrade package and an upgrade script corresponding to the database, through a front-end page of the electronic device. In some other examples, the target application upgrade package may also be obtained by the name of the target site, and/or the server address of the target site. Further, the program upgrading package and script information required to be executed by the field database can be uploaded, and after the program upgrading package is uploaded, the upgrading program is triggered to upgrade the program.
In some embodiments of the present application, after determining the upgrade completion information of the at least one target application program, the method may further include: invoking a target interface corresponding to the at least one target application program sending the upgrade completion information, and acquiring a script execution record list of the database corresponding to the target site; after determining the scripts to be upgraded of the at least one database corresponding to the at least one target application program respectively according to the script execution record table of the database, the method further comprises: and calling the target class of the target site, and respectively upgrading at least one database corresponding to the at least one target application program according to the script to be upgraded of the at least one database.
Specifically, in some examples, the extended application runner interface may be implemented in a Spring Boot framework. Thus, after the at least one target application program is installed and started, an installation start completion event may be issued and the application runner interface may be invoked. Wherein, the encapsulation logic of the application runner interface may include: inquiring a script execution record table of the database corresponding to the target site, inquiring whether the script is executed or not according to a script file index, and calling a target class of the target site if the script is not executed, wherein the target class can be a target class which is executed by a JDBC template, and after the execution of the JDBC template execution script is completed, inserting records into the script execution record table so as to respectively upgrade at least one database corresponding to at least one target application program according to a script to be upgraded of at least one database.
Example III
In the third embodiment of the present application, the upgrade data of the target application program includes a target application program upgrade package and an upgrade script of at least one database corresponding to the target application program; the determining, according to the script execution record table of the database, the script to be upgraded of the at least one database corresponding to the at least one target application program respectively, that is, step S104 may further include the following steps, as shown in fig. 3:
Step S1041, inquiring the script execution record table, and obtaining script execution information of at least one database corresponding to the target application program;
step S1042, determining a script to be upgraded of at least one database corresponding to the at least one target application program based on the execution information of the script.
Specifically, in some examples, only the script information of the executed database may be recorded in the script execution record table, and the script information of the unexecuted database may not be recorded. Therefore, by inquiring the script execution record table, the execution information of the script of at least one database corresponding to the target application program can be obtained, the executed script of the database is determined according to the execution information, and then the executed script of the database recorded in the script execution record table is compared with the upgrading script in the upgrading package of the target application program; if the executed script of the database includes the upgrade script in the upgrade package of the target application program, the current version of the database may be indicated to be the latest version to a certain extent, and the upgrade operation may not be executed on the database any more; otherwise, the script which is not included in the executed database in the upgrade script of the target application program upgrade package may be determined as a script to be upgraded of at least one database corresponding to the at least one target application program, and the script to be upgraded may be executed, so as to execute an upgrade operation on the database.
It should be noted that, the embodiment of the present application may be an improvement based on the second embodiment.
Example IV
In the fourth embodiment of the present application, before the step S101, which is performed before the step of obtaining the upgrade data of the at least one target application program corresponding to the target site, the method may further include the following steps, as shown in fig. 4:
step S201, acquiring an application identifier and application version information of at least one target application program corresponding to the target site, or an application identifier and application version information of at least one target application program corresponding to the target site, and a database identifier and database version information corresponding to each target application program;
step S202, generating an upgrade plan of the target site based on the application identifier and the application version information corresponding to the target site or the application identifier and the application version information corresponding to the target site and the corresponding database identifier and database version information;
step S203, obtaining upgrade data of at least one target application program corresponding to the target site based on the upgrade plan of the target site.
Specifically, in some examples, the application identifier and the application version information of at least one target application program corresponding to the target site may be acquired first; the application identifier is abbreviated as AID, the english full name Application Identifier, and the application version information may include information such as a product abbreviation of the target application program, a version number of the target application program, and the like. Or, in addition to obtaining the application identifier and the application version information of at least one target application program corresponding to the target site, the database identifier and the database version information corresponding to each target application program can also be obtained; the database identifier may be a symbol for distinguishing different databases, and the database version information may include information such as a product abbreviation of the database, a version number of the database, and the like.
Further, in some examples, the relevant staff may set an upgrade plan of the target site in advance according to the application identifier and the application version information corresponding to the target site, or the relevant staff may set an upgrade plan of the target site according to the application identifier and the application version information corresponding to the target site, and the corresponding database identifier and database version information. Therefore, the application identifier and the application version information corresponding to the target site and the upgrade plan of the target site have corresponding association relations, or the application identifier and the application version information corresponding to the target site, and the corresponding database identifier and database version information and the upgrade plan of the target site have corresponding association relations. Thus, the upgrade plan of the target site can be obtained according to the application identifier, the application version information and the corresponding association relation corresponding to the target site, or the upgrade plan of the target site can be obtained according to the application identifier, the application version information, the corresponding database identifier, the database version information and the corresponding association relation corresponding to the target site. Thus, further, upgrade data of at least one target application program corresponding to the target site can be obtained based on the upgrade plan of the target site.
It should be noted that the embodiments of the present application may be modified based on the second embodiment and/or the third embodiment.
It is not difficult to find that in the embodiment of the present application, in the process of upgrading the target application program, according to the application identifier and the application version information of at least one target application program corresponding to the target site, or after the application identifier and the application version information of at least one target application program corresponding to the target site and the database identifier and the database version information corresponding to each target application program, the upgrade plan of the target site is directly determined, so that not only the upgrade requirements of different application scenarios can be satisfied, but also a specific implementation manner for determining the upgrade plan of the target site is provided, which is favorable for the flexible and changeable implementation of the scheme provided by the embodiment of the present application.
Example five
In the fifth embodiment of the present application, before the step of obtaining the upgrade data of at least one target application program corresponding to the target site, that is, before the step S101, the method may further include the following steps, as shown in fig. 5:
Step S301, obtaining a site identifier of the target site;
step S302, acquiring an upgrade plan of the target site based on the site identification;
step S303, obtaining upgrade data of at least one target application program corresponding to the target site based on the upgrade plan of the target site.
Specifically, in some examples, the site identifier of the target site may be obtained first, where the site identifier of the target site may include, but is not limited to, a name of the target site, a server address of the target site, or other unique identifier of the target site, where the site identifier may be manually input, or may be obtained automatically, and is not specifically limited herein.
Further, in some examples, an upgrade plan for the target site may be obtained based on the site identification. Specifically, the upgrade plan may be obtained by querying a mapping relation table storing the field identifier and the upgrade plan. The upgrade plan may be automatically obtained according to the field identifier, or may be obtained by manually selecting or other confirmation operation after the field identifier is obtained, which is not limited herein. Furthermore, based on the upgrade plan of the target site, upgrade data of at least one target application program corresponding to the target site is obtained.
Further, in some embodiments of the present application, the obtaining, based on the upgrade plan of the target site, upgrade data of at least one target application program corresponding to the target site may further include: acquiring an upgrade data decryption password based on the field identifier; and decrypting the encrypted upgrade data of at least one target application program corresponding to the target site based on the upgrade data decryption password and the upgrade plan of the target site, and obtaining the upgrade data of the at least one target application program corresponding to the target site. Therefore, under the condition that the input/obtained field mark has errors, the corresponding upgrade data cannot be decrypted, and thus the upgrade of the target application program cannot be completed, the security of the upgrade data such as the upgrade package of the target application program and the execution script of the database can be ensured, the illegal leakage of related data is avoided, and the problem of upgrade errors can be further avoided.
It should be noted that the embodiments of the present application may be modified based on the second embodiment and/or the third embodiment.
It is not difficult to find that in the embodiment of the application, before the target application program is upgraded, the upgrade plan of the target site is obtained according to the site identifier of the target site, and then upgrade data of at least one target application program corresponding to the target site is obtained based on the upgrade plan of the target site, so that not only can upgrade requirements of different application scenes be met, but also a specific implementation mode for determining the upgrade plan of the target site is provided, and the scheme provided by the embodiment of the application is beneficial to being flexibly and variably realized.
Example six
The sixth embodiment of the application provides an application program upgrading device based on an execution record table, which comprises a first acquisition module, a first determination module, a second acquisition module, a second determination module and an upgrading module.
Specifically, the first acquisition module is used for acquiring upgrade data of at least one target application program corresponding to a target site; a first determining module, configured to determine upgrade completion information of the at least one target application program; the second acquisition module is used for acquiring a script execution record list of the database corresponding to the target site; the second determining module is used for determining scripts to be upgraded of at least one database corresponding to the at least one target application program respectively according to the script execution record table of the database; and the upgrading module is used for respectively upgrading at least one database corresponding to the at least one target application program according to the upgrading completion information and at least one script to be upgraded of the database.
In some examples, the upgrade data of the target application program includes a target application program upgrade package and a listener profile, and the first determining module may further include a setting submodule and a listening submodule, where the setting submodule is configured to set a listener of the target application program upgrade process based on the listener profile; the monitoring submodule is used for determining upgrading completion information of the at least one target application program based on monitoring of the upgrading process of the target application program upgrading packet by the monitor.
In some examples, the second obtaining module may further include a second obtaining sub-module, configured to obtain, from a local storage of the target site, a script execution record table of a database corresponding to the target site before or after determining upgrade completion information of the at least one target application program.
In some examples, the upgrade data of the target application program includes a target application program upgrade package and an upgrade script of at least one database corresponding to the target application program. The second determination module may further include a query sub-module and a second determination sub-module; the inquiring submodule is used for inquiring the script execution record table and acquiring script execution information of at least one database corresponding to the target application program; the second determining submodule is used for determining a script to be upgraded of at least one database corresponding to the at least one target application program based on the execution information of the script.
In some examples, the apparatus may further include a first invocation module; the first calling module is used for calling a target interface corresponding to the at least one target application program sending the upgrade completion information after the first determining module determines the upgrade completion information of the at least one target application program, and acquiring a script execution record table of the database corresponding to the target site; the device further comprises a second calling module, wherein the second calling module is used for calling the target class of the target site after the second determining module determines the scripts to be upgraded of at least one database corresponding to the at least one target application program respectively according to the script execution record table of the database, and upgrading the at least one database corresponding to the at least one target application program respectively according to the scripts to be upgraded of the at least one database.
In some examples, the apparatus may further include an updating module, configured to update, after the updating module determines a script to be updated of at least one database corresponding to the at least one target application according to a script execution record table of the database, the script execution record table according to upgrade script information of at least one database for which the upgrade is completed.
In some examples, the apparatus may further include a third acquiring module, a generating module, and a fourth acquiring module, where the third acquiring module is configured to acquire, before the first acquiring module acquires upgrade data of at least one target application corresponding to a target site, application identification and application version information of at least one target application corresponding to the target site, or application identification and application version information of at least one target application corresponding to the target site, and database identification and database version information corresponding to each target application; the generation module is used for generating an upgrade plan of the target site based on the application identifier and the application version information corresponding to the target site or the application identifier and the application version information corresponding to the target site and the corresponding database identifier and database version information; the fourth obtaining module is configured to obtain upgrade data of at least one target application program corresponding to the target site based on the upgrade plan of the target site.
In some examples, the apparatus may further include a fifth acquiring module, a sixth acquiring module, and a seventh acquiring module, where the fifth acquiring module is configured to acquire a field identifier of a target field before the first acquiring module acquires upgrade data of at least one target application corresponding to the target field; the sixth acquisition module is used for acquiring an upgrade plan of the target site based on the site identification; the seventh obtaining module is configured to obtain upgrade data of at least one target application program corresponding to the target site based on the upgrade plan of the target site.
In some examples, the seventh obtaining module may further include a seventh obtaining sub-module for obtaining an upgrade data decryption password based on the field identification; and decrypting the encrypted upgrade data of at least one target application program corresponding to the target site based on the upgrade data decryption password and the upgrade plan of the target site, and obtaining the upgrade data of the at least one target application program corresponding to the target site.
It is to be noted that, in the embodiments of the present application, the apparatus embodiment corresponds to any one or more of the method embodiments of the first to fifth embodiments, and technical details provided in the foregoing method embodiments are also applicable to the apparatus embodiment, so that repetition is avoided and redundant description is omitted herein.
The flowchart or block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of devices, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
It should be noted that the present application may be implemented in software and/or a combination of software and hardware, e.g., using Application Specific Integrated Circuits (ASIC), a general purpose computer or any other similar hardware device. In some embodiments, the software program of the present application may be executed by a processor to implement the above steps or functions. Likewise, the software programs of the present application (including associated data structures) may be stored on a computer readable recording medium, such as RAM memory, magnetic or optical drive or diskette and the like. In addition, some steps or functions of the present application may be implemented in hardware, for example, as circuitry that cooperates with the processor to perform various steps or functions.
It will be evident to those skilled in the art that the application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. A plurality of units or means recited in the apparatus claims can also be implemented by means of one unit or means in software or hardware. The terms first, second, etc. are used to denote a name, but not any particular order.

Claims (8)

1. An application program upgrading method based on an execution record table, the method comprising:
acquiring upgrade data of at least one target application program corresponding to a target site; the target site is one site of multiple sites which can not communicate with the outside through the Internet and can communicate with the inside of the target site only through a local area network;
Determining upgrade completion information of the at least one target application program;
acquiring a script execution record list of a database corresponding to the target site;
determining scripts to be upgraded of at least one database corresponding to the at least one target application program respectively according to a script execution record table of the database;
according to the upgrade completion information and at least one script to be upgraded of the databases, upgrading at least one database corresponding to the at least one target application program respectively;
the determining the upgrade completion information of the at least one target application program includes:
setting a listener of the target application program upgrading process based on the listener configuration file; determining upgrade completion information of the at least one target application program based on monitoring of an upgrade process of the target application program upgrade package by the monitor;
before the upgrade data of at least one target application program corresponding to the target site is obtained, the method further comprises: acquiring a field identifier of the target field; acquiring an upgrade plan of the target site based on the site identification; and acquiring upgrade data of at least one target application program corresponding to the target site based on the upgrade plan of the target site.
2. The method of claim 1, wherein the obtaining a script execution record table of a database corresponding to the target site comprises:
before or after determining the upgrade completion information of the at least one target application program, a script execution record table of a database corresponding to the target site is acquired from a local storage of the target site.
3. The method of claim 1, wherein the upgrade data of the target application program comprises a target application program upgrade package and an upgrade script of at least one database corresponding to the target application program; the determining, according to the script execution record table of the database, the script to be upgraded of the at least one database corresponding to the at least one target application program respectively includes:
inquiring the script execution record table to acquire script execution information of at least one database corresponding to the target application program;
and determining a script to be upgraded of at least one database corresponding to the at least one target application program based on the execution information of the script.
4. The method of claim 1, wherein after determining the upgrade completion information for the at least one target application program, the method further comprises:
Invoking a target interface corresponding to the at least one target application program sending the upgrade completion information, and acquiring a script execution record list of the database corresponding to the target site;
after determining the scripts to be upgraded of the at least one database corresponding to the at least one target application program respectively according to the script execution record table of the database, the method further comprises:
and calling the target class of the target site, and respectively upgrading at least one database corresponding to the at least one target application program according to the script to be upgraded of the at least one database.
5. The method according to claim 1, wherein after the upgrading of the at least one database corresponding to the at least one target application is completed according to the upgrading completion information and the script to be upgraded of the at least one database, the method further comprises:
and updating the script execution record table according to the upgrade script information of at least one database of which the upgrade is completed.
6. The method of any one of claims 1 to 5, wherein prior to the obtaining upgrade data for at least one target application corresponding to a target site, the method further comprises:
Acquiring application identification and application version information of at least one target application program corresponding to the target site, or acquiring application identification and application version information of at least one target application program corresponding to the target site, and database identification and database version information corresponding to each target application program;
generating an upgrade plan of the target site based on the application identifier and the application version information corresponding to the target site or the application identifier and the application version information corresponding to the target site and the corresponding database identifier and database version information;
and acquiring upgrade data of at least one target application program corresponding to the target site based on the upgrade plan of the target site.
7. The method of claim 1, wherein the obtaining upgrade data of at least one target application corresponding to the target site based on the upgrade plan of the target site comprises:
acquiring an upgrade data decryption password based on the field identifier;
and decrypting the encrypted upgrade data of at least one target application program corresponding to the target site based on the upgrade data decryption password and the upgrade plan of the target site, and obtaining the upgrade data of the at least one target application program corresponding to the target site.
8. An application upgrade apparatus based on an execution record table, the apparatus comprising:
the first acquisition module is used for acquiring upgrading data of at least one target application program corresponding to the target site; the target site is one site of multiple sites which can not communicate with the outside through the Internet and can communicate with the inside of the target site only through a local area network;
a first determining module, configured to determine upgrade completion information of the at least one target application program;
the second acquisition module is used for acquiring a script execution record list of the database corresponding to the target site;
the second determining module is used for determining scripts to be upgraded of at least one database corresponding to the at least one target application program respectively according to the script execution record table of the database;
the upgrading module is used for respectively upgrading at least one database corresponding to the at least one target application program according to the upgrading completion information and at least one script to be upgraded of the database;
the first determining module comprises a setting submodule and a monitoring submodule, and the setting submodule is used for setting a listener of the target application program upgrading process based on the listener configuration file; the monitoring submodule is used for determining upgrading completion information of the at least one target application program based on monitoring of the upgrading process of the target application program upgrading packet by the monitor;
The device may further include a fifth acquiring module, a sixth acquiring module and a seventh acquiring module, where the fifth acquiring module is configured to acquire a field identifier of a target field before the first acquiring module acquires upgrade data of at least one target application corresponding to the target field; the sixth acquisition module is used for acquiring an upgrade plan of the target site based on the site identification; the seventh obtaining module is configured to obtain upgrade data of at least one target application program corresponding to the target site based on the upgrade plan of the target site.
CN202310897578.0A 2023-07-21 2023-07-21 Application program upgrading method and device based on execution record table Active CN116610345B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310897578.0A CN116610345B (en) 2023-07-21 2023-07-21 Application program upgrading method and device based on execution record table

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310897578.0A CN116610345B (en) 2023-07-21 2023-07-21 Application program upgrading method and device based on execution record table

Publications (2)

Publication Number Publication Date
CN116610345A CN116610345A (en) 2023-08-18
CN116610345B true CN116610345B (en) 2023-10-20

Family

ID=87675067

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310897578.0A Active CN116610345B (en) 2023-07-21 2023-07-21 Application program upgrading method and device based on execution record table

Country Status (1)

Country Link
CN (1) CN116610345B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107357907A (en) * 2017-07-17 2017-11-17 郑州云海信息技术有限公司 A kind of database upgrade method and device for supporting cross-version
CN112199623A (en) * 2020-09-29 2021-01-08 上海博泰悦臻电子设备制造有限公司 Script execution method and device, electronic equipment and storage medium
CN112486547A (en) * 2021-02-03 2021-03-12 苏州达家迎信息技术有限公司 Application program updating method and device under multi-tenant scene and electronic equipment
CN112532664A (en) * 2019-09-18 2021-03-19 北京国双科技有限公司 Data upgrading method and device
CN113127039A (en) * 2021-04-22 2021-07-16 北京优奥创思科技发展有限公司 Automatic upgrading system for micro-service architecture product
US11360965B1 (en) * 2020-01-13 2022-06-14 HealthStream, Inc. Method, apparatus, and computer program product for dynamically updating database tables
CN115309831A (en) * 2022-10-11 2022-11-08 苏州青颖飞帆软件科技有限公司 Local database state synchronization method, electronic equipment and storage medium
CN116049207A (en) * 2023-01-12 2023-05-02 山石网科通信技术股份有限公司 Application SQL script processing method and device, processor and electronic equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9483245B2 (en) * 2013-01-23 2016-11-01 Red Hat Israel, Ltd. Matching database schema with application code using dependency management

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107357907A (en) * 2017-07-17 2017-11-17 郑州云海信息技术有限公司 A kind of database upgrade method and device for supporting cross-version
CN112532664A (en) * 2019-09-18 2021-03-19 北京国双科技有限公司 Data upgrading method and device
US11360965B1 (en) * 2020-01-13 2022-06-14 HealthStream, Inc. Method, apparatus, and computer program product for dynamically updating database tables
CN112199623A (en) * 2020-09-29 2021-01-08 上海博泰悦臻电子设备制造有限公司 Script execution method and device, electronic equipment and storage medium
CN112486547A (en) * 2021-02-03 2021-03-12 苏州达家迎信息技术有限公司 Application program updating method and device under multi-tenant scene and electronic equipment
CN113127039A (en) * 2021-04-22 2021-07-16 北京优奥创思科技发展有限公司 Automatic upgrading system for micro-service architecture product
CN115309831A (en) * 2022-10-11 2022-11-08 苏州青颖飞帆软件科技有限公司 Local database state synchronization method, electronic equipment and storage medium
CN116049207A (en) * 2023-01-12 2023-05-02 山石网科通信技术股份有限公司 Application SQL script processing method and device, processor and electronic equipment

Also Published As

Publication number Publication date
CN116610345A (en) 2023-08-18

Similar Documents

Publication Publication Date Title
US8151248B1 (en) Method and system for software defect management
US9390395B2 (en) Methods and apparatus for defining a collaborative workspace
CN109634679B (en) Block chain configuration updating method, device, equipment and storage medium
CN107729031B (en) Code administration method, apparatus, computer equipment and computer readable storage medium
US7634766B2 (en) Method and apparatus for pattern-based system design analysis using a meta model
CN105205053A (en) Method and system for analyzing database incremental logs
CN113360519B (en) Data processing method, device, equipment and storage medium
CN117238433B (en) Method for automatically isolating document data based on Libreoffice
CN111460232A (en) Functional module searching method, device, terminal and computer readable storage medium
CN111737227A (en) Data modification method and system
WO2006126992A1 (en) Method and apparatus for tracking changes in a system
US8266589B2 (en) Optimizing the handling of source code requests between a software configuration management (SCM) system and a software integrated development environment (IDE) using projected ancillary data
US20040204778A1 (en) Method for persisting SNMP MIB data in files
WO2011131101A1 (en) Data cut-over method and apparatus
CN116610345B (en) Application program upgrading method and device based on execution record table
CN106990974A (en) A kind of APP applications update method, device and electronic equipment
CN113761016A (en) Data query method, device, equipment and storage medium
US9588998B2 (en) Protecting storage data during system migration
CN115809290A (en) Method, device, equipment and medium for generating data persistence layer entry
CN110795259A (en) Method and device for analyzing application collapse
CN113010230B (en) Configuration information processing method, device, equipment and storage medium
CN116739397B (en) Dynamic management method for new energy indexes
CN116662018B (en) Management method, device and system of server, electronic equipment and storage medium
CN115964075B (en) Application export import method and device, computer equipment and storage medium
CN113220633B (en) Unified file coding management method and system

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