Method and device for upgrading low-code application
By automatically parsing and updating the upgrade methods and devices of low-code applications, the complex and high-risk problems of the upgrade process of low-code applications are solved, and the comprehensive automation upgrade of applications and databases is achieved, which simplifies the process and reduces costs.
Patent Information
- Application Number
- CN202411376548.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2024-12-20
AI Technical Summary
The upgrade process of existing low-code applications is complicated and requires manual operation by professional and technical personnel, which poses problems such as high error risk and high time cost.
Provides an upgrade method and device for low-code applications. By analyzing the application image package of the target version, backing up the original version of the application and database data, automatically updating the data and database structure, and generating version change records, realizing the full range of applications and databases. Automated upgrade.
It realizes automated upgrades of applications and databases, simplifies the process, and reduces the risk of errors and time costs.
Smart Images

Figure CN119166182A_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of computer technology, and in particular, to an upgrade method and device for low-code applications. Background Art
[0002] With the popularity of low-code platforms, more and more companies and developers choose to use low-code platforms to quickly develop and deploy applications. However, when an application needs to be upgraded after a period of time, a large amount of configuration information needs to be compared and modified, and a large number of scripts need to be executed. Existing solutions require professional technicians to perform manual operations, which is a complex process with high risk of errors and time costs. Summary of the invention
[0003] In order to overcome the problems existing in the related art, this specification provides a method and device for upgrading low-code applications.
[0004] According to the first aspect of the embodiments of this specification, a method for upgrading a low-code application is provided, the method comprising: parsing a target application image package of a target version to obtain target application data and target database structure data; for an original version of the low-code application, backing up the original application data of the low-code application and the original database structure data of the original database; updating the original application data according to the target application data, and updating the original database according to the target database structure data; generating a version change record according to the original version and the target version.
[0005] According to the second aspect of the embodiments of this specification, there is provided an upgrade device for a low-code application, including: a parsing module, used to parse a target application image package of a target version to obtain target application data and target database structure data; a backup module, used to back up the original application data of the low-code application and the original database structure data of the original database for the original version of the low-code application; an update module, used to update the original application data according to the target application data, and to update the original database according to the target database structure data; a recording module, used to generate a version change record according to the original version and the target version.
[0006] According to a third aspect of an embodiment of this specification, there is provided a low-code application upgrade device, including:
[0007] processor;
[0008] a memory for storing processor-executable instructions;
[0009] Among them, the processor is configured to: parse the target application image package of the target version to obtain the target application data and the target database structure data; for the original version of the low-code application, back up the original application data of the low-code application and the original database structure data of the original database; update the original application data according to the target application data, and update the original database according to the target database structure data; generate a version change record according to the original version and the target version.
[0010] The technical solutions provided by the embodiments of this specification may have the following beneficial effects:
[0011] In the embodiments of this specification, not only the application data can be automatically upgraded, but also the database can be automatically upgraded, thus achieving a full range of automatic upgrades from application to database. The process is relatively simple, and the risk of errors and time costs are low.
[0012] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present specification. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the specification and, together with the description, serve to explain the principles of the specification.
[0014] Figure 1 It is a flowchart of a method for upgrading a low-code application according to an exemplary embodiment of this specification.
[0015] Figure 2 The diagram is a schematic diagram showing another method of updating an application configuration file according to an exemplary embodiment.
[0016] Figure 3 The diagram is a schematic diagram showing another method of updating a database according to an exemplary embodiment.
[0017] Figure 4 It is a hardware structure diagram of a computer device where an upgrade device for a low-code application is located according to an exemplary embodiment shown in this specification.
[0018] Figure 5 It is a block diagram of an upgrade device for a low-code application shown in this specification according to an exemplary embodiment. DETAILED DESCRIPTION
[0019] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with this specification. Instead, they are merely examples of devices and methods consistent with some aspects of this specification as detailed in the appended claims.
[0020] The terms used in this specification are for the purpose of describing specific embodiments only and are not intended to limit this specification. The singular forms "a", "the" and "the" used in this specification and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0021] It should be understood that although the terms first, second, third, etc. may be used in this specification to describe various information, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0022] Next, the embodiments of this specification are described in detail.
[0023] The following is a detailed description of the upgrade method of the low-code application provided in the embodiment of this specification. Figure 1 As shown, Figure 1 This is a flowchart of a low-code application upgrade method shown in this specification according to an exemplary embodiment. The low-code application upgrade method provided in the embodiment of this specification may include the following steps.
[0024] In step 110, the target application image package of the target version is parsed to obtain target application data and target database structure data.
[0025] According to an embodiment of the present specification, the low-code application before upgrading may be the original version, and the target version may be the target version intended for upgrading. Application data may include data required for application operation. Database structure data may include, for example, the structure and data of a database.
[0026] In step 120, for the original version of the low-code application, the original application data of the low-code application and the original database structure data of the original database are backed up.
[0027] According to an embodiment of the present specification, the original application data may be application data corresponding to the original version of the low-code application. The original database may be a database corresponding to the original version of the low-code application. The original database structure data may represent the structure of the original database.
[0028] Optionally, for example, the original application data and the original database structure data may be packaged into an application image package, and then the application image package may be backed up.
[0029] In step 130, the original application data is updated according to the target application data, and the original database is updated according to the target database structure data.
[0030] According to an embodiment of the present specification, the low-code application is upgraded from the original version to the target version by updating the original application data and updating the original database.
[0031] In step 140, a version change record is generated according to the original version and the target version.
[0032] According to an embodiment of the present specification, the version change record can be used to record the version before the upgrade and the version after the upgrade each time the upgrade occurs. Exemplarily, in this embodiment, the version before the upgrade is the original version, and the version after the upgrade is the target version. By generating a version change record, it is easy to track and manage the upgrade process, providing traceability of the upgrade operation.
[0033] According to the embodiments of this specification, not only the application data can be automatically upgraded, but also the database can be automatically upgraded, thus achieving a full range of automatic upgrades from application to database. The process is relatively simple, and the risk of errors and time costs are low.
[0034] Optionally, the application data file may include, for example, an application code file, an application static resource, and an application configuration file. The application code file may include, for example, all source code files, library files, and dependencies, which may be used to ensure the integrity and executableness of the code. The application static resource may include, for example, static resources such as images, style files, and script files, which may be used to ensure that the appearance and functionality of the application are not affected. The application configuration file may include, for example, the configuration file, parameter settings, etc. of the application, which may be used to ensure that the operating environment and service settings of the application are correct.
[0035] Based on this, the target application data may include a target application code file, a target application static resource, and a target application configuration file, and the original application data may include an original application code file, an original application static resource, and an original application configuration file.
[0036] Based on this, when updating the original application data, for the original code file, the target application code file can be used to overwrite the original code file. For the original static resources, the target application static resources can be used to overwrite the original static resources. For the original application configuration file, the target application configuration file can be compared with the original application configuration file to determine the newly added configuration data and / or conflicting configuration data. Then, according to the newly added configuration data and / or conflicting configuration data, the original application configuration file is updated.
[0037] According to an embodiment of the present specification, if the target application configuration file contains configuration data that is not in the original application configuration file, the configuration data is determined to be newly added configuration data. During the update, the newly added configuration data can be added to the original application configuration file.
[0038] If there is configuration data in the target application configuration file that conflicts with the original application configuration file, the configuration data is determined to be conflicting configuration data. During the update, a prompt message for the conflicting configuration data can be output. The prompt message is used to prompt the user that there is configuration data in the target application configuration file that conflicts with the original application configuration file. The user can choose to continue the upgrade or abandon the upgrade based on the prompt message. The user can enter a confirmation instruction to indicate that he chooses to continue the upgrade. If a confirmation instruction corresponding to the prompt message is received, the conflicting configuration data will overwrite the configuration data corresponding to the conflicting configuration data in the original application configuration file.
[0039] According to the embodiments of this specification, by formulating the above-mentioned conflict resolution strategy, configuration data conflicts that may occur during the upgrade process can be handled.
[0040] Figure 2 The diagram is a schematic diagram showing an update of an application configuration file according to an exemplary embodiment.
[0041] like Figure 2 As shown, the target application configuration file may correspond to the application configuration data in the upgrade package, and the original application configuration file may correspond to the application configuration data on the production side. In this embodiment, the application configuration data may include, for example, a code, a key, a value, and a modification time.
[0042] The upgrade package may include application configuration data A, B, C, and D, and the application configuration data on the production side may include A, B, and E. By comparing the application configuration data of the upgrade package and the production side, it can be determined that C and D exist in the upgrade package, but not on the production side. Therefore, C and D can be added to the application configuration data on the production side as new configuration data. For A that exists in both the upgrade package and the production side, the update time is the same and they are the same data, and they can be directly merged into one piece of data. For B that exists in both the upgrade package and the production side, the update time is different, so B is determined to be conflicting configuration data, which can be displayed to the user for confirmation.
[0043] Optionally, when updating the original database, for example, the target database structure data can be compared with the original database structure data to obtain database difference data. Then, an incremental compensation script can be generated based on the database difference data, and the incremental compensation script can be used to operate the database so as to set the structure and data of the original database to be consistent with the target database structure data. Next, the incremental compensation script can be executed to set the structure and data of the original database to be consistent with the target database structure data. Exemplarily, the database can include, for example, an SQL database, and correspondingly, the incremental compensation script can include, for example, an SQL statement.
[0044] According to the embodiments of the present specification, the incremental compensation script is executed in an independently deployed operating environment, which ensures the isolation and security of the upgrade process and avoids the risk of operating directly in the production environment. In addition, the incremental compensation script field is generated, which reduces the workload of developers to manually write and check scripts and improves efficiency.
[0045] Figure 3 The diagram is a schematic diagram showing a method of updating a database according to an exemplary embodiment.
[0046] like Figure 3 As shown, the target application configuration file may correspond to the database structure data in the upgrade package, and the original application configuration file may correspond to the database structure data on the production side. In this embodiment, the difference between the two database structure data may be compared, an incremental compensation script may be generated based on the difference, and the incremental script may be executed to update the database. The contents of the comparison may include: data tables, fields, indexes, constraints, views, stored procedures, etc.
[0047] Optionally, after the low-code application completes the upgrade, the low-code application can also be rolled back. For example, the version to be rolled back can be determined based on the version change record. The application data to be rolled back and the database structure data to be rolled back corresponding to the rolled back version are obtained from the backup data. According to the application data to be rolled back, the application data of the low-code application is updated, and according to the database structure data to be rolled back, the database corresponding to the low-code application is updated. Among them, the method of updating the application data and the database can be referred to above, for example, and will not be repeated here.
[0048] According to the embodiments of the present specification, rolling back according to the version change record can improve the availability and stability of the application.
[0049] The following is an explanation of a method for upgrading a low-code application in conjunction with another exemplary embodiment. The method may include the following steps:
[0050] 1. Import the application image package for application upgrade in the test or production environment.
[0051] 2. The program parses the application image package, matches and verifies the application information. Automatically backs up the current application data, which may include application code, application static resources, application configuration data, and application database structure data.
[0052] 3. Read the application code file in the application image package and overwrite the application code file of the current application.
[0053] 4. Read the application static resources in the application image package and overwrite the application static resources of the current application.
[0054] 5. Read the application configuration data in the application image package, compare it with the application configuration data of the current application, take the union, and confirm the handling method for the conflicting data by the user.
[0055] 6. Read the database structure data in the application image package, compare the database structure and data of the current application, generate an incremental compensation script and execute it.
[0056] 7. Broadcast cache cleanup instructions to clean up the cache information of the application.
[0057] 8. After the upgrade is completed, record the version change information. For example, the version change information of each upgrade can be recorded in the version change record table.
[0058] When you need to roll back a low-code application, you can select a record in the version change record and call the rollback command to roll back to the state before the upgrade. The rollback process may include: finding the corresponding backup file, downloading the backup file, and executing the rollback logic. The rollback logic is similar to the upgrade logic and will not be repeated here.
[0059] Corresponding to the embodiments of the aforementioned method, this specification also provides embodiments of an upgrade device for a low-code application and a terminal to which it is applied.
[0060] The embodiments of the upgrade device for low-code applications in this specification can be applied to computer devices, such as servers or terminal devices. The device embodiments can be implemented through software, hardware, or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by the processor in which it is located reading the corresponding computer program instructions in the non-volatile memory into the memory and running them. From the hardware level, if Figure 4 As shown, it is a hardware structure diagram of the computer device where the low-code application upgrade device of the embodiment of this specification is located, except Figure 4 In addition to the processor 410, memory 430, network interface 420, and non-volatile memory 440 shown, the server or electronic device where the device 431 is located in the embodiment may also include other hardware according to the actual function of the computer device, which will not be described in detail.
[0061] like Figure 5 As shown, Figure 5 This is a block diagram of a low-code application upgrade device shown in this specification according to an exemplary embodiment, and the device includes:
[0062] Parsing module 510, used to parse the target application image package of the target version to obtain target application data and target database structure data;
[0063] A backup module 520 is used to back up original application data of the low-code application and original database structure data of the original database for the original version of the low-code application;
[0064] An updating module 530, used to update the original application data according to the target application data, and to update the original database according to the target database structure data;
[0065] The recording module 540 is used to generate a version change record according to the original version and the target version.
[0066] Optionally, the target application data includes a target application code file, a target application static resource, and a target application configuration file, and the original application data includes an original application code file, an original application static resource, and an original application configuration file; and the update module may include:
[0067] A code file overwriting submodule is used to overwrite the original code file with the target application code file;
[0068] The static resource overwriting submodule is used to overwrite the original static resources with the target application static resources;
[0069] A configuration comparison submodule is used to compare the target application configuration file with the original application configuration file to determine newly added configuration data and / or conflicting configuration data;
[0070] The configuration update submodule is used to update the original application configuration file according to the newly added configuration data and / or conflicting configuration data.
[0071] Optionally, the configuration update submodule may include:
[0072] The adding unit is used to add the newly added configuration data to the original application configuration file if the target application configuration file contains the newly added configuration data that is not in the original application configuration file.
[0073] a prompt unit, configured to output prompt information for the conflicting configuration data if the target application configuration file contains conflicting configuration data that conflicts with the original application configuration file;
[0074] The configuration overwriting unit is configured to overwrite the configuration data corresponding to the conflicting configuration data in the original application configuration file with the conflicting configuration data if a confirmation instruction corresponding to the prompt information is received.
[0075] Optionally, the update module may include:
[0076] The database comparison submodule is used to compare the target database structure data with the original database structure data to obtain database difference data;
[0077] The script generation submodule is used to generate an incremental compensation script based on database difference data;
[0078] A submodule is set up to execute an incremental compensation script to set the structure and data of the original database to be consistent with the structure and data of the target database.
[0079] Optionally, the above device may further include:
[0080] A version determination module is used to determine the version to be rolled back based on the version change record;
[0081] An acquisition module, used to acquire the application data to be rolled back and the database structure data to be rolled back corresponding to the rollback version from the backup data;
[0082] The rollback module is used to update the application data of the low-code application based on the application data to be rolled back, and to update the database corresponding to the low-code application based on the database structure data to be rolled back.
[0083] According to the embodiments of this specification, not only the application data can be automatically upgraded, but also the database can be automatically upgraded, thus achieving a full range of automatic upgrades from application to database. The process is relatively simple, and the risk of errors and time costs are low.
[0084] Correspondingly, the present specification also provides an upgrade device for a low-code application, which includes a processor; a memory for storing processor executable instructions; wherein the processor is configured to: parse the target application image package of the target version to obtain target application data and target database structure data; for the original version of the low-code application, back up the original application data of the low-code application and the original database structure data of the original database; update the original application data according to the target application data, and update the original database according to the target database structure data; generate a version change record according to the original version and the target version.
[0085] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, which will not be repeated here.
[0086] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this specification. A person of ordinary skill in the art can understand and implement it without paying creative labor.
[0087] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0088] Those skilled in the art will readily appreciate other embodiments of the specification after considering the specification and practicing the invention claimed herein. The specification is intended to cover any variations, uses or adaptations of the specification that follow the general principles of the specification and include common knowledge or customary techniques in the art that are not claimed in the specification. The specification and examples are to be considered exemplary only, and the true scope and spirit of the specification are indicated by the following claims.
[0089] It should be understood that the present description is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present description is limited only by the appended claims.
[0090] The above description is only a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of this specification should be included in the scope of protection of this specification.
Claims
1. A method for upgrading a low-code application, characterized in that: The method comprises: Parse the target application image package of the target version to obtain the target application data and target database structure data; For the original version of the low-code application, back up the original application data of the low-code application and the original database structure data of the original database; According to the target application data, the original application data is updated, and according to the target database structure data, the original database is updated; A version change record is generated according to the original version and the target version.
2. The method according to claim 1, characterized in that The target application data includes a target application code file, a target application static resource and a target application configuration file, and the original application data includes an original application code file, an original application static resource and an original application configuration file; The updating of the original application data according to the target application data includes: Overwriting the original code file with the target application code file; Overwriting the original static resource with the target application static resource; Comparing the target application configuration file with the original application configuration file to determine newly added configuration data and / or conflicting configuration data; The original application configuration file is updated according to the newly added configuration data and / or the conflicting configuration data.
3. The method according to claim 2, characterized in that The updating of the original application configuration file according to the newly added configuration data and / or the conflicting configuration data includes: If the target application configuration file contains newly added configuration data that is not in the original application configuration file, adding the newly added configuration data to the original application configuration file; If conflicting configuration data that conflicts with the original application configuration file exists in the target application configuration file, outputting prompt information for the conflicting configuration data; If a confirmation instruction corresponding to the prompt information is received, the configuration data corresponding to the conflicting configuration data in the original application configuration file is overwritten by the conflicting configuration data.
4. The method according to claim 1, characterized in that The updating of the original database according to the target database structure data comprises: Comparing the target database structure data with the original database structure data to obtain database difference data; generating an incremental compensation script according to the database difference data; The incremental compensation script is executed to set the structure and data of the original database to be consistent with the structure and data of the target database.
5. The method according to claim 1, characterized in that The method further comprises: Determine the version to be rolled back according to the version change record; Acquire the application data to be rolled back and the database structure data to be rolled back corresponding to the rollback version from the backup data; According to the application data to be rolled back, the application data of the low-code application is updated, and according to the database structure data to be rolled back, the database corresponding to the low-code application is updated.
6. A low-code application upgrade device, characterized in that: The device comprises: A parsing module is used to parse the target application image package of the target version to obtain the target application data and the target database structure data; A backup module, for backing up original application data of the low-code application and original database structure data of the original database for the original version of the low-code application; An updating module, used to update the original application data according to the target application data, and to update the original database according to the target database structure data; The recording module is used to generate a version change record according to the original version and the target version.
7. The device according to claim 6, characterized in that The target application data includes a target application code file, a target application static resource and a target application configuration file, and the original application data includes an original application code file, an original application static resource and an original application configuration file; The update module includes: A code file overwriting submodule, used to overwrite the original code file with the target application code file; A static resource overwriting submodule, used to overwrite the original static resource with the target application static resource; A configuration comparison submodule, used to compare the target application configuration file with the original application configuration file to determine newly added configuration data and / or conflicting configuration data; The configuration update submodule is used to update the original application configuration file according to the newly added configuration data and / or conflicting configuration data.
8. The device according to claim 6, characterized in that The update module includes: A database comparison submodule, used to compare the target database structure data with the original database structure data to obtain database difference data; A script generation submodule, used to generate an incremental compensation script according to the database difference data; A submodule is provided, which is used to execute the incremental compensation script to set the structure and data of the original database to be consistent with the structure and data of the target database.
9. The device according to claim 6, characterized in that The device also includes: A version determination module, used to determine the version to be rolled back according to the version change record; An acquisition module, used to acquire the application data to be rolled back and the database structure data to be rolled back corresponding to the rollback version from the backup data; The rollback module is used to update the application data of the low-code application according to the application data to be rolled back, and to update the database corresponding to the low-code application according to the database structure data to be rolled back.
10. A low-code application upgrade device, characterized in that: The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the following method is implemented: Parse the target application image package of the target version to obtain the target application data and target database structure data; For the original version of the low-code application, back up the original application data of the low-code application and the original database structure data of the original database; According to the target application data, the original application data is updated, and according to the target database structure data, the original database is updated; A version change record is generated according to the original version and the target version.
Citation Information
Cited By
Method and system for upgrading software generated based on low-code development tool and medium
CN120762712A
Method, system, and medium for upgrading software generated based on low-code development tools
CN120762712B
