Program zero code updating method and device, equipment and medium

By identifying and constructing initial entities and instance containers, the problem of inefficient program updates caused by developers' careless coding is solved, achieving zero-code updates and improving the efficiency and accuracy of program updates.

CN120406990AActive Publication Date: 2025-08-01HANGZHOU NEWGRAND TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510886168.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2025-08-01
Estimated Expiration
2045-06-30

AI Technical Summary

Technical Problem

In the development of business systems using common programming software, developers' careless coding leads to inefficient program updates and numerous functional defects.

Method used

By obtaining the program update data and candidate code framework files of the program to be updated, determining whether they are target code framework files, constructing initial entities and instance containers, identifying associated data tables, and constructing proxy instances, zero-code updates are achieved.

Benefits of technology

It improved the efficiency of program updates, reduced resource waste, and enhanced the accuracy and applicability of program updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120406990A_ABST
    Figure CN120406990A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a program zero code updating method and device, equipment and a medium. The method comprises the steps of obtaining program updating data of a to-be-updated program and a candidate code framework file, and determining whether the candidate code framework file is a target code framework file or not; if yes, obtaining a target entity container according to the program updating data, the data table attribute data, a pre-constructed initial entity container and an initial instance container corresponding to the to-be-updated program; according to data table metadata in the target entity container, whether the corresponding update data table is an associated data table is determined, and if yes, a candidate processing method is determined; constructing an initial agent instance, and updating the initial instance container according to the program updating data, the candidate processing method and the initial agent instance to obtain a target instance container; and updating the to-be-updated program according to the target instance container, the target entity container and the program updating data. The zero-code updating of the program is realized, and the program updating efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the technical field of software development, and in particular, to a method, device, equipment and medium for zero-code updating of a program. Background Art

[0002] In the development of business systems of common programming software, most of the workload is database-oriented programming. By integrating various open-source frameworks and according to the writing syntax stipulated by the open-source frameworks, different business functions are constructed. In the actual construction process, for very simple business functions, due to the carelessness of developers in writing code, a large number of functional defects will occur, resulting in a slow efficiency of program updating. Therefore, how to achieve zero-code updating of a program and improve the efficiency of program updating is crucial. Summary of the Invention

[0003] The present invention provides a method, device, equipment and medium for zero-code updating of a program to achieve zero-code updating of a program and improve the efficiency of program updating.

[0004] According to one aspect of the present invention, a method for zero-code updating of a program is provided, including:

[0005] Obtaining program update data and candidate code framework files of the program to be updated, and determining whether the candidate code framework files are target code framework files according to preset framework judgment data;

[0006] If so, determining data table attribute data of the data table corresponding to the program to be updated, and updating the initial entity container according to the program update data, the data table attribute data, a pre-constructed initial entity container, and an initial instance container corresponding to the program to be updated to obtain a target entity container;

[0007] Determining whether the corresponding updated data table is an associated data table according to the data table metadata of the updated data table in the target entity container. If so, determining candidate processing methods under candidate processing instances in the initial instance container;

[0008] Constructing an initial proxy instance, and updating the initial instance container according to the program update data, the candidate processing methods and the initial proxy instance to obtain a target instance container;

[0009] Updating the program to be updated according to the target instance container, the target entity container and the program update data.

[0010] According to another aspect of the present invention, a device for zero-code updating of a program is provided, including:

[0011] A target framework file determination module, configured to obtain program update data and candidate code framework files of a program to be updated, and determine whether the candidate code framework file is a target code framework file according to preset framework judgment data;

[0012] A target entity container determination module, configured to, if so, determine data table attribute data of a data table corresponding to the program to be updated, and update the initial entity container according to the program update data, the data table attribute data, a pre-constructed initial entity container, and an initial instance container corresponding to the program to be updated, to obtain a target entity container;

[0013] A candidate processing method determination module, configured to determine whether a corresponding updated data table is an associated data table according to data table metadata of the updated data table in the target entity container, and if so, determine a candidate processing method under a candidate processing instance in the initial instance container;

[0014] A target instance container determination module, configured to construct an initial proxy instance, and update the initial instance container according to the program update data, the candidate processing method, and the initial proxy instance, to obtain a target instance container;

[0015] A program update module, configured to update the program to be updated according to the target instance container, the target entity container, and the program update data.

[0016] According to another aspect of the present invention, there is provided an electronic device, including:

[0017] One or more processors;

[0018] A memory, configured to store one or more programs;

[0019] When the one or more programs are executed by the one or more processors, the one or more processors are enabled to execute any one of the program zero-code update methods provided by the embodiments of the present invention.

[0020] According to another aspect of the present invention, there is provided a computer-readable storage medium, where computer instructions are stored, and the computer instructions are used to implement any one of the program zero-code update methods provided by the embodiments of the present invention when executed by a processor.

[0021] An embodiment of the present invention provides a program zero-code update solution. By obtaining program update data and a candidate code framework file of a program to be updated, and determining whether the candidate code framework file is a target code framework file according to preset framework judgment data; if so, determining data table attribute data of the data table corresponding to the program to be updated, and updating the initial entity container according to the program update data, the data table attribute data, the pre-constructed initial entity container, and the initial instance container corresponding to the program to be updated to obtain a target entity container; determining whether the corresponding updated data table is an associated data table according to the data table metadata of the updated data table in the target entity container, if so, determining a candidate processing method under the candidate processing instance in the initial instance container; constructing an initial proxy instance, and updating the initial instance container according to the program update data, the candidate processing method, and the initial proxy instance to obtain a target instance container; updating the program to be updated according to the target instance container, the target entity container, and the program update data. In the above solution, the target entity container is obtained by updating the initial entity container, and it is determined whether the updated data table is an associated data table according to the data table metadata in the target entity container. If so, based on the candidate processing method under the candidate processing instance in the initial instance container, the initial proxy instance, and the program update data, the target instance container is obtained. Finally, based on the target instance container, the target entity container, and the program update data, the program to be updated is updated, realizing zero-code update of the program and improving the efficiency of program update.

[0022] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0024] Figure 1 is a flowchart of a program zero-code update method provided in Embodiment 1 of the present invention;

[0025] Figure 2 is a flowchart of a program zero-code update method provided in Embodiment 2 of the present invention;

[0026] Figure 3 is a schematic structural diagram of a program zero-code update device provided in Embodiment 4 of the present invention;

[0027] Figure 4It is a schematic structural diagram of an electronic device for implementing a program zero-code update method provided in Embodiment 5 of the present invention. Detailed implementation manners

[0028] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the present invention, rather than limiting the present invention. In addition, it should be noted that, for the convenience of description, only the parts related to the present invention rather than all the structures are shown in the drawings.

[0029] Embodiment 1

[0030] Figure 1 It is a flowchart of a program zero-code update method provided in Embodiment 1 of the present invention. This embodiment is applicable to the situation of zero-code update of a program. This method can be executed by a program zero-code update device, and the device can be implemented in a software and / or hardware manner and can be configured in an electronic device carrying the program zero-code update function.

[0031] See Figure 1 The program zero-code update method shown in the figure includes:

[0032] S110. Obtain program update data and a candidate code framework file of the program to be updated, and determine whether the candidate code framework file is a target code framework file according to preset framework judgment data.

[0033] Among them, the program to be updated refers to the program that needs to be updated. The program update data can be understood as the update requirement data of the program to be updated. Exemplarily, the program update data may include program processing requirements and program update parameters. The program processing requirement refers to the update requirement of the program to be updated. The program update parameter refers to the update parameter corresponding to the program processing requirement.

[0034] Among them, the candidate code framework file refers to the open-source framework file of the program to be updated. The preset framework judgment data can be used to judge whether the candidate code framework file is a zero-code framework file. The preset framework judgment data may include a zero-code sub-framework, zero-code classes, and a zero-code running environment. The zero-code sub-framework refers to the code sub-framework that needs to be included in the zero-code framework file. Exemplarily, the zero-code sub-framework may include springboot (a rapid development tool based on the Spring framework) and mybatis (MyBatis SQL Mapper, an open-source persistence layer framework). The zero-code classes refer to the classes included in the zero-code framework file. Exemplarily, the zero-code classes may include the SpringApplication class (the entry class of a Spring Boot application, used to start an embedded container (such as Tomcat) and initialize the Spring context) and the SqlSessionFactory class (the core factory class of MyBatis, used to create SqlSession objects, manage database connections, and mapping files). The zero-code running environment refers to the running environment of a program that can perform zero-code updates. Exemplarily, the zero-code running environment may be a springboot webserver running environment. Specifically, it is judged whether there is a Tomcat class in the candidate code framework file. If so, the running environment of the program to be updated is a zero-code running environment; if not, it is not.

[0035] Among them, the target code framework file refers to the candidate code framework file that meets the zero-code update.

[0036] Specifically, obtain the program update data and the candidate code framework file of the program to be updated; first, judge whether there is a zero-code sub-framework in the candidate code framework file. If so, judge whether there are zero-code classes in the candidate code framework file; if so, judge whether the running environment of the program to be updated corresponding to the candidate code framework file is a zero-code running environment; if so, determine that the candidate code framework file is the target code framework file.

[0037] In the embodiment of the present invention, introducing the preset framework judgment data can judge whether the candidate code framework is the target code framework file, that is, determine whether zero-code updates can be performed on the program to be updated, avoid performing zero-code updates on programs that cannot perform zero-code updates, reduce resource waste, and improve the efficiency of program updates.

[0038] S120. If so, determine the data table attribute data of the data table corresponding to the program to be updated, and update the initial entity container according to the program update data, the data table attribute data, the pre-constructed initial entity container, and the initial instance container corresponding to the program to be updated to obtain the target entity container.

[0039] Among them, the updated data table refers to the candidate data tables participating in the update in the program to be updated. The candidate data table refers to the data table in the database connected to the program to be updated. The data table attribute data refers to the basic attribute data of the updated data table. Exemplarily, the data table attribute data may include the updated field name, updated field type, updated field length, updated field description, and updated table name.

[0040] Among them, the updated field name refers to the field name of each field in the updated data table, which can be used to represent the identity of the field in the updated data table. The updated field type refers to the field type of each field in the updated data table. The updated field length refers to the field length of each field in the updated data table. The updated field description refers to the field description of each field in the updated data table. The updated table name refers to the name of the updated data table, which can be used to represent the identity of the updated data table.

[0041] Among them, the initial entity container can be used to store the data table attribute data of the updated data table. The initial instance container, i.e., the spring container, can be used to store the original running instances of the program to be updated. The target entity container can be used to store the association relationship between the updated data table and the original running instances of the program to be updated.

[0042] Specifically, if the candidate code framework file is the target code framework file, it is determined that the program to be updated can be updated with zero code; obtain the data table attribute data of the updated data table corresponding to the program to be updated from the database; store the data table attribute data in the initial entity container; and obtain the target entity container according to the program update parameters in the program update data, the data table attribute data in the initial entity container, and the initial instance container.

[0043] S130. Determine whether the corresponding updated data table is an associated data table according to the data table metadata of the updated data table in the target entity container. If so, determine the candidate processing method under the candidate processing instance in the initial instance container.

[0044] Among them, the data table metadata refers to the data corresponding to the updated data table in the target entity container. Exemplarily, the data table metadata may include the data table entity name, instance association data of the data table entity name, interaction instance name, instance association data corresponding to the interaction instance name, logic instance name, instance association data corresponding to the logic instance name, control instance name, instance association data corresponding to the control instance name, program attribute name, program field type, and escape type. The data table entity name refers to the entity name of the updated data table. The program attribute name refers to the attribute name obtained by performing camel case escape on the updated field name. The program field type refers to the field type obtained by performing escape on the updated field type. The escape type refers to the type of escape performed on the updated field type.

[0045] Among them, the associated data table refers to an updated data table in the target entity container where there is instance-associated data for both the data table entity name and the interaction instance name, and there is no instance-associated data for the corresponding logical instance name and control instance name. The candidate processing instance refers to the candidate logical instance and candidate control instance in the initial instance container, that is, the candidate processing instance can include the candidate logical instance and the candidate control instance. The candidate logical instance, namely the Service instance object, refers to the original business logic instance in the initial instance container. The candidate control instance, namely the Control instance object, refers to the original control instance in the initial instance container. The candidate processing method refers to the method in the candidate processing instance.

[0046] S140. Construct an initial proxy instance, and update the initial instance container according to the program update data, the candidate processing method, and the initial proxy instance to obtain the target instance container.

[0047] Among them, the initial proxy instance refers to an instance pre-constructed for proxying the candidate processing instance. Exemplarily, the initial proxy instance can include an initial logical proxy instance and an initial control proxy instance. The initial logical proxy instance, namely the Service proxy, is an initial instance for proxying the candidate logical instance in the initial instance container. The initial control proxy instance, namely the Control proxy, is an initial instance for proxying the candidate control instance in the initial instance container. The target instance container refers to the instance container obtained after updating the initial instance container.

[0048] In an optional embodiment, updating the initial instance container according to the program update data, the candidate processing method, and the initial proxy instance to obtain the target instance container includes: determining the candidate processing function of the candidate processing method, and determining a reference processing method from the candidate processing method according to the candidate processing function and the program processing requirements in the program update data; updating the initial proxy instance according to the reference processing parameters in the reference processing method to obtain a candidate proxy instance, and determining a target processing method from the reference processing method according to the candidate proxy instance and the program update parameters in the program update data; updating the candidate proxy instance according to the target processing method to obtain a target proxy instance, and proxying the candidate processing instance according to the target proxy instance to obtain the target instance container.

[0049] Among them, the candidate processing function refers to the function of the candidate processing method. Exemplarily, the candidate processing function can include a candidate logical function and a candidate control function. The candidate logical function refers to the function corresponding to the candidate logical method in the candidate logical instance. The candidate control function refers to the function corresponding to the candidate control method in the candidate control instance.

[0050] Among them, the reference processing method refers to the candidate processing method corresponding to the candidate processing function that matches the program processing requirements. Exemplarily, the program processing requirements may include program interaction requirements, program logic requirements, and program control requirements. The program interaction requirement refers to the requirement for the interaction update of the program to be updated. The program logic requirement refers to the requirement for the logic update of the program to be updated. The program control requirement refers to the requirement for the control update of the program to be updated. Exemplarily, the reference processing method may include a reference logic method and a reference control method. The reference logic method refers to the candidate logic method corresponding to the candidate logic function that matches the program logic requirements. The reference control method refers to the candidate control method corresponding to the candidate control function that matches the program control requirements.

[0051] Among them, the reference processing parameter refers to the parameter in the reference processing method. Exemplarily, the reference processing parameter may include a reference logic parameter and a reference control parameter. The reference logic parameter refers to the parameter in the reference logic method. The reference control parameter refers to the parameter in the reference control method.

[0052] Among them, the candidate proxy instance refers to the initial proxy instance that includes all the reference processing parameters in the reference processing methods. Exemplarily, the candidate proxy instance may include a candidate logic proxy instance and a candidate control proxy instance.

[0053] Among them, the program update parameter refers to the requirement parameter corresponding to the program processing requirements. Exemplarily, the program update parameter may include a program interaction parameter, a program logic parameter, and a program control parameter. The program interaction parameter refers to the interaction parameter corresponding to the program interaction requirements. The program logic parameter refers to the logic parameter corresponding to the program logic requirements. The program control parameter refers to the control parameter corresponding to the program control requirements.

[0054] Among them, the target processing method refers to the reference processing method corresponding to the reference processing parameter that matches the program update parameter. Exemplarily, the target processing method may include a target logic method and a target control method. The target logic method refers to the reference logic method corresponding to the reference logic parameter that matches the program logic parameter. The target control method refers to the reference control method corresponding to the reference control parameter that matches the program control parameter.

[0055] Exemplarily, determine the candidate logic function of the candidate logic method, and determine the reference logic method from the candidate logic methods according to the candidate logic function and the program logic requirements in the program update data; update the initial logic agent instance according to the reference logic parameters in the reference logic method to obtain a candidate logic agent instance, and determine the target logic method from the reference logic methods according to the candidate logic agent instance and the program logic parameters in the program update data; update the candidate logic agent instance according to the target logic method to obtain a target logic agent instance, and proxy the candidate logic instance according to the target logic agent instance.

[0056] Exemplarily, determine the candidate control function of the candidate control method, and determine the reference control method from the candidate control methods according to the candidate control function and the program control requirements in the program update data; update the initial control agent instance according to the reference control parameters in the reference control method to obtain a candidate control agent instance, and determine the target control method from the reference control methods according to the candidate control agent instance and the program control parameters in the program update data; update the candidate control agent instance according to the target control method to obtain a target control agent instance, and proxy the candidate control instance according to the target control agent instance.

[0057] Exemplarily, after the candidate logic instance and the candidate control instance in the initial instance container are respectively proxied by the target logic agent instance and the target control agent instance, a target instance container is obtained.

[0058] It can be understood that by determining the target processing method from the candidate processing methods according to the program processing requirements, candidate processing functions, program update parameters, and reference processing parameters, the accuracy of the determined target processing method is improved; at the same time, based on the target processing method and the candidate agent instance, the target agent instance is determined, improving the accuracy of the determined target agent instance; and by introducing the agent instance, the functional scalability of the instance container is improved; and in the embodiments of the present invention, by determining the target agent instance, it is convenient to search for the code required for the program to be updated subsequently to achieve zero-code update.

[0059] S150. Update the program to be updated according to the target instance container, the target entity container, and the program update data.

[0060] Specifically, according to the program update data, the instance association data in the target entity container, and the target agent instance and the target interaction instance in the target instance container, the target code for update is found, and based on the target code, zero-code update is performed on the program to be updated. The target code refers to the code used to update the program to be updated. The target code is the code already stored in the target instance container and does not require manual background coding.

[0061] An embodiment of the present invention provides a program zero-code update solution. By obtaining program update data and a candidate code framework file of the program to be updated, and determining whether the candidate code framework file is a target code framework file according to preset framework judgment data; if so, determining data table attribute data of the data table corresponding to the program to be updated, and updating the initial entity container according to the program update data, the data table attribute data, the pre-constructed initial entity container, and the initial instance container corresponding to the program to be updated to obtain a target entity container; determining whether the corresponding updated data table is an associated data table according to the data table metadata of the updated data table in the target entity container, if so, determining a candidate processing method under the candidate processing instance in the initial instance container; constructing an initial proxy instance, and updating the initial instance container according to the program update data, the candidate processing method, and the initial proxy instance to obtain a target instance container; updating the program to be updated according to the target instance container, the target entity container, and the program update data. In the above solution, the target entity container is obtained by updating the initial entity container, and it is determined whether the updated data table is an associated data table according to the data table metadata in the target entity container. If so, based on the candidate processing method under the candidate processing instance in the initial instance container, the initial proxy instance, and the program update data, the target instance container is obtained. Finally, based on the target instance container, the target entity container, and the program update data, the program to be updated is updated, realizing zero-code update of the program and improving the efficiency of program update.

[0062] Based on the above technical solution, after determining whether the corresponding updated data table is an associated data table according to the data table metadata of the updated data table in the target entity container, the method further includes: if not, constructing a virtual interface class of the corresponding updated data table, and determining a corresponding virtual interaction instance according to the virtual interface class and the interface metadata in the interface configurator; constructing a corresponding virtual logic instance and a virtual control instance according to the virtual interaction instance, and storing the virtual interaction instance, the virtual logic instance, and the virtual control instance in the initial instance container to obtain a target instance container.

[0063] Among them, the virtual interface class refers to a virtual Mapper class. The interface configurator is the mybatis configuration manager, which can be used to provide interface metadata. The interface metadata is the metadata of Mapper, which can be used to determine the virtual interaction instance corresponding to the virtual interface class. The virtual interaction instance refers to an interaction instance constructed based on the virtual interface class and the interface metadata, that is, an interaction instance that originally does not exist in the initial instance container. The virtual logic instance refers to a constructed virtual logic instance, that is, a logic instance that originally does not exist in the initial instance container. The virtual control instance refers to a constructed virtual control instance, that is, a control instance that originally does not exist in the initial instance container.

[0064] Exemplarily, if there is no instance association data for both the data table entity name and the interaction instance name in the target entity container, and there is also no instance association data for the corresponding logic instance name and control instance name, then the corresponding updated data table is not an associated data table, that is, it is prohibited to use the corresponding updated data table as an associated data table.

[0065] It can be understood that if the updated data table is not an associated data table, then by constructing a virtual interface class and interface metadata, a virtual interaction instance is determined. Based on the virtual interaction instance, the corresponding virtual logic instance and virtual control instance are constructed, realizing zero-code update for the part corresponding to the updated data table that is not an associated data table in the program to be updated, improving the applicability of zero-code update.

[0066] Exemplarily, subsequently, based on the program update data, the instance association data in the target entity container, and the virtual interaction instance, virtual logic instance, and virtual control instance in the target instance container, the target code for update can be found, and based on the target code, zero-code update is performed on the program to be updated.

[0067] It should be noted that if there is instance association data for both the data table entity name and the interaction instance name in the target entity container, and there is also instance association data for the corresponding logic instance name and control instance name, then the target code for update can be determined based on the program update data, the instance association data in the target entity container, and the target interaction instance, target logic instance, and target control instance in the target instance container, and based on the target code, zero-code update is performed on the program to be updated.

[0068] Embodiment 2

[0069] Figure 2 FIG. is a flowchart of a program zero-code update method provided by Embodiment 2 of the present invention. On the basis of the above embodiments, further, the operation of "updating the initial entity container according to the program update data, data table attribute data, the pre-constructed initial entity container, and the initial instance container corresponding to the program to be updated to obtain the target entity container" is refined into "storing the data table attribute data into the initial entity container to obtain a reference entity container; where the data table attribute data includes an update table name, an update field type, and an update field name; performing an escape process on the update table name to obtain the corresponding data table entity name, and determining an instance query name according to the data table entity name; respectively determining the instance association data corresponding to the data table entity name and the instance query name according to the instance query name, program update data, and initial instance container, and updating the reference entity container according to the instance association data to obtain the target entity container", so as to improve the determination mechanism of the target entity container. It should be noted that for the parts not detailed in the embodiments of the present invention, reference can be made to the descriptions of other embodiments.

[0070] See Figure 2 the program zero-code update method shown in the following, including:

[0071] S210. Obtain the program update data and the candidate code framework file of the program to be updated, and determine whether the candidate code framework file is the target code framework file according to the preset framework judgment data.

[0072] S220. If so, determine the data table attribute data of the data table corresponding to the program to be updated, and store the data table attribute data in the initial entity container to obtain a reference entity container.

[0073] Among them, the reference entity container refers to the initial entity container that stores the data table attribute data. Exemplarily, the data table attribute data includes the update table name, the update field type, and the update field name.

[0074] S230. Perform an escape process on the update table name to obtain the corresponding data table entity name, and determine the instance query name according to the data table entity name.

[0075] Among them, the data table entity name refers to the entity name of the updated data table. The instance query name refers to the name used for instance query in the initial instance container. Exemplarily, the instance query name may include the interaction instance name, the logic instance name, and the control instance name. The interaction instance name is the Mapper name, which can be used to query the candidate interaction instance corresponding to the updated data table in the initial instance container, that is, the target interaction instance. The logic instance name is the Service name, which can be used to query the candidate logic instance corresponding to the updated data table in the initial instance container, that is, the target logic instance. The control instance name is the Control name, which can be used to query the candidate control instance corresponding to the updated data table in the initial instance container, that is, the target control instance.

[0076] Specifically, perform camel case escape on the updated data table to obtain the corresponding data table entity name, determine the interaction instance name by the data table entity name + Mapper, determine the logic instance name by the data table entity name + Service, and determine the control instance name by the data table entity name + Control.

[0077] S240. According to the instance query name, the program update data, and the initial instance container, respectively determine the instance association data corresponding to the data table entity name and the instance query name, and update the reference entity container according to the instance association data to obtain the target entity container.

[0078] Among them, the instance association data can be used to represent the path of the instance associated with the corresponding instance query name in the initial instance container or the reference relationship between the upper and lower instances.

[0079] In an alternative embodiment, if the instance query name includes an interaction instance name, a logical instance name, and a control instance name, then based on the instance query name, program update data, and initial instance container, the data table entity name and the instance association data corresponding to the instance query name are determined respectively, including: determining whether there is a target interaction instance in the initial instance container that matches the interaction instance name, and if so, obtaining the interaction metadata and the interaction associated entity name of the target interaction instance; verifying the target interaction instance according to the interaction metadata, the interaction associated entity name, and the program update data; if the verification passes, then based on the interaction association path data of the target interaction instance, the data table entity name and the instance association data corresponding to the interaction instance name are determined respectively; determining the target logical instance corresponding to the logical instance name and the target control instance corresponding to the control instance name from the initial instance container; and determining the instance association data corresponding to the logical instance name and the control instance name respectively according to the reference relationships among the target interaction instance, the target logical instance, and the target control instance.

[0080] Among them, the target interaction instance refers to a candidate interaction instance that matches the interaction instance name. The interaction metadata refers to the metadata of the Mapper, which is the basic attribute data in the target interaction instance. Exemplarily, the interaction metadata may include input parameters (StatementType) and output parameters (ResultSetType). The interaction associated entity name refers to the table entity name associated with the target interaction instance.

[0081] Among them, passing the verification means that the input parameters and the interaction associated entity name are the same as the input parameters in the program interaction parameters of the data table entity name and the program update data, or passing the verification means that the output parameters and the interaction associated entity name are the same as the output parameters in the program interaction parameters of the data table entity name and the program update data.

[0082] Among them, the interaction association path data refers to the path data associated with the target interaction instance. The instance association data of the data table entity name can be used to determine the data operation behavior. The instance association data of the interaction instance name can be used to find the candidate interaction instance corresponding to the interaction instance name in the initial instance container.

[0083] Among them, the target logical instance refers to a candidate logical instance in the initial instance container that matches the logical instance name. The target control instance refers to a candidate control instance in the initial instance container that matches the control instance name.

[0084] Among them, the instance association data of the logical instance name can be used to determine the reference relationship between the target interaction instance and the target logical instance. The instance association data of the control instance name can be used to determine the reference relationship between the target interaction instance or the target logical instance and the target control instance.

[0085] It can be understood that by determining the target interaction instance, the target logic instance, and the target control instance from the initial instance container according to the interaction instance name, the logic instance name, and the control instance name, and then respectively determining the instance association data corresponding to the data table entity name, the interaction instance name, the logic instance name, and the control instance name, the accuracy of the determined instance association data is improved.

[0086] In an alternative embodiment, according to the interaction association path data of the target interaction instance, respectively determining the instance association data corresponding to the data table entity name and the interaction instance name includes: determining the interaction instance path name of the target interaction instance, and using the interaction instance path name as the instance association data corresponding to the interaction instance name; determining the interaction parameter path of the target interaction instance, and using the interaction parameter path as the instance association data corresponding to the data table entity name.

[0087] Among them, the interaction instance path name is the full Mapper path name, which can be used to find the target interaction instance corresponding to the interaction instance name in the initial instance container. The interaction parameter path can be used to standardize the operation behavior of data. Exemplarily, the interaction parameter path may include an interaction input parameter path and an interaction output parameter path. The interaction input parameter path is the full StatementType path, which can be used to standardize the SQL (Structured Query Language) execution behavior. The interaction input parameter path is the full ResultSetType path, which can be used to standardize the result set operation behavior.

[0088] It can be understood that by using the interaction instance path name as the instance association data corresponding to the interaction instance name, the efficiency of subsequent searching for the target interaction instance is improved, and by using the interaction parameter path as the instance association data corresponding to the data table entity name, it is convenient to standardize the data operation behavior for updating the data table subsequently.

[0089] In an alternative embodiment, the method further includes: if the target interaction instance corresponding to the interaction instance name does not exist in the initial instance container, determining that the instance association data corresponding to the corresponding data table entity name and the instance query name is empty or a preset default value, that is, there is no corresponding instance association data for both the data table entity name and the instance query name.

[0090] Among them, the embodiments of the present invention do not make any limitations on the setting of the preset default value, which can be set by those skilled in the art according to experience or needs. The preset default value can represent the non-existence of instance association data.

[0091] Furthermore, if the instance association data corresponding to the data table entity name and the instance query name is empty, the instance association data corresponding to the corresponding logic instance name and the control instance name is also empty or a preset default value, that is, there is no corresponding instance association data for both the logic instance name and the control instance name.

[0092] It is understandable that, in the case where there is no target interaction instance corresponding to the interaction instance name, setting the instance association data corresponding to the corresponding data table entity name and instance query name to be empty avoids the influence of filling in other data on the subsequent use of the instance association data and improves the accuracy of the instance association data.

[0093] S250. Determine whether the corresponding updated data table is an associated data table according to the data table metadata of the updated data table in the target entity container. If so, determine the candidate processing method under the candidate processing instance in the initial instance container.

[0094] S260. Construct an initial proxy instance, and update the initial instance container according to the program update data, candidate processing method, and initial proxy instance to obtain a target instance container.

[0095] S270. Update the program to be updated according to the target instance container, target entity container, and program update data.

[0096] The embodiment of the present invention provides a program zero-code update solution, which refines the operation of updating the initial entity container according to the program update data, data table attribute data, pre-constructed initial entity container, and initial instance container corresponding to the program to be updated to obtain a target entity container into storing the data table attribute data into the initial entity container to obtain a reference entity container; wherein, the data table attribute data includes an update table name, an update field type, and an update field name; perform an escape process on the update table name to obtain the corresponding data table entity name, and determine the instance query name according to the data table entity name; respectively determine the instance association data corresponding to the data table entity name and the instance query name according to the instance query name, program update data, and initial instance container, and update the reference entity container according to the instance association data to obtain a target entity container, improving the determination mechanism of the target entity container. Through the above solution, by introducing the instance association data, the data operation behavior of the updated data table, the target interaction instance, and the reference relationship between instances at different levels can be determined through the instance association data, facilitating subsequent obtaining of the required data from the initial instance container based on the instance association data, avoiding the situation of missing data obtained from the initial instance container, improving the comprehensiveness of the data obtained from the initial instance container, and improving the efficiency of program update.

[0097] Embodiment III

[0098] On the basis of the above embodiments, the embodiment of the present invention provides an optional example. It should be noted that for parts not detailed in the embodiment of the present invention, reference can be made to the descriptions of other embodiments.

[0099] In the development of business systems using common programming software (such as Java), 80% of the workload is database-oriented programming. By integrating various open-source frameworks and constructing different business functions according to the writing syntax stipulated by the open-source frameworks, in the actual construction process, for very simple business functions, due to the carelessness of developers in writing code, a large number of functional bugs will be generated, resulting in a waste of R & D costs. In the prior art, a large number of personnel are invested in functional testing to modify functional defects. The embodiments of the present invention provide a method for zero-code update of programs, which automatically constructs application functions by building a zero-code framework.

[0100] Exemplarily, when developing an application software, a zero-code framework is built and introduced, and database connection information is configured in the application software. By introducing it in the files of the application software, the AUTOZeroCodeService (Automated Zero Code) is dynamically triggered through the dynamic class loading mechanism. Specifically, environment detection: After AUTOZeroCodeService is triggered (that is, the zero-code update starts when the candidate code framework is introduced), it starts to detect the open-source framework of the current application program (that is, to determine whether the candidate code framework file is the target code framework file). In the zero-code framework, as long as the dependent frameworks include springboot and mybatis, then AUTOZeroCodeService detects whether the SpringApplication class and the SqlSessionFactory class can be loaded in the current environment, and whether the current environment is a springboot webserver running environment. If the above detections are not satisfied, AUTOZeroCodeService exits the operation; if the above detections are satisfied, it indicates whether the candidate code framework file is the target code framework file.

[0101] Exemplarily, metadata construction (i.e., determining data table metadata): AUTOZeroCodeService constructs an entity metadata container EDC and completes the following steps: ① Database metadata collection (i.e., obtaining data table attribute data): According to the database information configured in the application, obtain the updated data tables from the database, and obtain the updated fields, updated field types, updated field lengths, and updated field descriptions of each updated data table. Then, construct a metadata object based on the updated table name (i.e., determine the correspondence between the updated table name and the updated fields, updated field types, updated field lengths, and updated field descriptions), and put it into the initial entity container to obtain a reference entity container. ② Escape Java metadata: By iterating through the entity metadata container (i.e., the reference entity container), perform data processing on the metadata object. First, obtain the updated table name, perform camel case escaping on the updated table name to obtain the data table entity name (e.g., if the updated table name is test_user, the data table entity name obtained after escaping is TestUser). Second, obtain all the fields of each updated data table, perform camel case escaping on the updated field names to obtain the program attribute names, that is, the first letter of the escaped field needs to be in lowercase, and the escaping is completed; obtain the updated field types, and complete the conversion of field types according to the correspondence between Java field types and database field types. At the same time, upgrade the Java fields according to the updated field lengths (for example: if the Java field is float, upgrade it to BigDecimal according to the length of the field in the database; if the Java field is Integer, upgrade it to Long according to the length of the field in the database). ③ Expand Java metadata: After the Java metadata escaping is completed, obtain the escaped table name (i.e., the data table entity name), and generate the corresponding Mapper name (i.e., the interaction instance name), Service name (i.e., the logic instance name), and Control name (i.e., the control instance name) according to the data table entity name. For example, the data table metadata in the target entity container is shown in Table 1.

[0102] Table 1 Data table metadata

[0103] Among them, instance association data A represents the instance association data corresponding to the data table entity name; instance association data B represents the instance association data corresponding to the interaction instance name; instance association data C represents the instance association data corresponding to the logic instance name; instance association data D represents the instance association data corresponding to the control instance name.

[0104] Specifically, after converting the updated field type to the program field type according to the correspondence between Java field types and database field types, if the character length that the updated field type can store in the database is greater than the preset character length threshold, the program field type is upgraded based on the corresponding relationship of field type upgrade. The embodiments of the present invention do not make any limitation on the size of the preset character length threshold, which can be set by technicians according to experience or needs, or determined repeatedly through a large number of experiments. The corresponding relationship of field type upgrade refers to the corresponding relationship between the converted program field type and the upgraded program field type.

[0105] Exemplarily, Java class association (i.e., determining instance association data): By detecting in the spring container (i.e., the initial instance container), obtain the Mapper name, Service name, and Control name of the EDC object, and make the first letter of the name lowercase. Continuously detect in the spring container to determine whether the spring container object can be obtained. If the object can be obtained, first obtain the object with the Mapper name (i.e., determine the target interaction instance), and through the configuration management object of mybatis, obtain the metadata of the Mapper (i.e., interaction metadata). Through the metadata object (i.e., interaction metadata), determine whether the StatementType or ResultSetType is consistent with the associated entity name (i.e., interaction associated entity name). If they are consistent, fill in the full path name of the associated Mapper (i.e., interaction instance path name) in the instance association data B, and put the full path of the extracted StatementType or ResultSetType (i.e., interaction parameter path) into the instance association data A of the data table entity name; secondly, scan the Service name and Control name to determine whether the object with the Service name references the Mapper object, and whether the object with the Control name references the object with the Service name. If both references exist, put them into the instance association data C and instance association data D.

[0106] Exemplarily, zero-code service construction: For zero-code service construction, mainly construct the zero-code service portrait, including services for addition, deletion, modification, import, export, and various queries. Establish a complete zero-code service around the database table. For the construction of the service, different processing is mainly carried out according to whether there is an association with the current Java.

[0107] Specifically, if the updated data table is an associated data table, it indicates that the initial code framework already exists in the current code. There is no need to further introduce the Mapper. Only the Service and Control need to be processed. Obtain the container object of the Service (i.e., the candidate logical instance), extract all the public methods of the object (i.e., obtain the candidate logical methods), and perform semantic understanding. At the same time, infer the method code of the associated object to determine the intention of the current method (i.e., determine the candidate logical function), and match the zero-code service portrait service for correspondence (i.e., match the candidate logical function and the program logic parameters to obtain the reference logical method). At the same time, extract the method parameters of this method (i.e., extract the reference logical parameters). If one service corresponds to multiple existing services, establish a one-to-many relationship in the service portrait. At the same time, create proxies corresponding to the Service and Control (i.e., create the initial logical proxy instance and the initial control proxy instance), and proxy the existing Service and Control objects (i.e., proxy the candidate logical instance and the candidate control instance), and replace them in the spring container. In the proxy of the Control, when a service request is accessed, obtain the corresponding zero-code service portrait. If there is a one-to-many situation, obtain the current request parameters, and automatically determine the intention of the current request service according to the request parameter situation, and call the Service.

[0108] Specifically, if the updated data table is not an associated data table, first construct a virtual Mapper class (i.e., a virtual interface class), inherit from BaseMapper, and put the virtual Mapper class into the metadata of the Mapper in the mybatis configuration manager (i.e., the interface configurator) to complete the injection of the mapper. At the same time, construct a chained call proxy service for the Control and Service (i.e., construct a virtual logical instance and a virtual control instance), finally call the mapper object, and put the chained call proxy service into the spring container.

[0109] Exemplarily, after the construction of the instances of the associated data table and the non-associated data table is completed, the construction of the entire zero-code service is completed. For the non-associated data table, scan the target entity container again. According to the metadata of each data table, add the zero-code service path of the updated data table and the corresponding Control object in the handerMapping (processor mapping) of the springmvc service, aiming to make the created virtual interaction instance, virtual logical instance, and virtual control instance effective. For the associated data table, it is necessary to select the already added instance association data in the handerMapping for acquisition and modification. The purpose of the above operations on the handerMapping is to support front-end access.

[0110] Embodiment 4

[0111] Figure 3 It is a schematic structural diagram of a program zero - code update device provided in Embodiment 4 of the present invention. This embodiment is applicable to the situation of zero - code update of a program. This method can be executed by a program zero - code update device, and this device can be implemented in a software - and / or - hardware manner and can be configured in an electronic device carrying the program zero - code update function.

[0112] As Figure 3 shown, the device includes: a target framework file determination module 310, a target entity container determination module 320, a candidate processing method determination module 330, a target instance container determination module 340, and a program update module 350. Among them,

[0113] The target framework file determination module 310 is configured to obtain program update data and candidate code framework files of the program to be updated, and determine whether the candidate code framework file is a target code framework file according to preset framework judgment data;

[0114] The target entity container determination module 320 is configured to, if so, determine the data table attribute data of the data table corresponding to the program to be updated, and update the initial entity container according to the program update data, the data table attribute data, the pre - constructed initial entity container, and the initial instance container corresponding to the program to be updated, to obtain a target entity container;

[0115] The candidate processing method determination module 330 is configured to determine whether the corresponding update data table is an associated data table according to the data table metadata of the update data table in the target entity container, and if so, determine the candidate processing method under the candidate processing instance in the initial instance container;

[0116] The target instance container determination module 340 is configured to construct an initial proxy instance, and update the initial instance container according to the program update data, the candidate processing method, and the initial proxy instance, to obtain a target instance container;

[0117] The program update module 350 is configured to update the program to be updated according to the target instance container, the target entity container, and the program update data.

[0118] An embodiment of the present invention provides a program zero-code update solution. By obtaining program update data and a candidate code framework file of the program to be updated, and determining whether the candidate code framework file is a target code framework file according to preset framework judgment data; if so, determining the data table attribute data of the data table corresponding to the program to be updated, and updating the initial entity container based on the program update data, the data table attribute data, the pre-constructed initial entity container, and the initial instance container corresponding to the program to be updated to obtain a target entity container; determining whether the corresponding updated data table is an associated data table according to the data table metadata of the updated data table in the target entity container, and if so, determining the candidate processing method under the candidate processing instance in the initial instance container; constructing an initial proxy instance, and updating the initial instance container based on the program update data, the candidate processing method, and the initial proxy instance to obtain a target instance container; and updating the program to be updated according to the target instance container, the target entity container, and the program update data. In the above solution, the target entity container is obtained by updating the initial entity container, and it is determined whether the updated data table is an associated data table according to the data table metadata in the target entity container. If so, based on the candidate processing method under the candidate processing instance in the initial instance container, the initial proxy instance, and the program update data, a target instance container is obtained. Finally, based on the target instance container, the target entity container, and the program update data, the program to be updated is updated, realizing zero-code update of the program and improving the efficiency of program update.

[0119] Optionally, the target entity container determination module 320 includes:

[0120] A reference entity container determination unit, configured to store the data table attribute data in the initial entity container to obtain a reference entity container; wherein, the data table attribute data includes an update table name, an update field type, and an update field name;

[0121] An instance query name determination unit, configured to perform an escape process on the update table name to obtain a corresponding data table entity name, and determine an instance query name according to the data table entity name;

[0122] A target entity container determination unit, configured to respectively determine instance association data corresponding to the data table entity name and the instance query name according to the instance query name, the program update data, and the initial instance container, and update the reference entity container according to the instance association data to obtain a target entity container.

[0123] Optionally, if the instance query name includes an interaction instance name, a logic instance name, and a control instance name, the target entity container determination unit includes:

[0124] A target interaction instance determination subunit, configured to determine whether there is a target interaction instance in the initial instance container that matches the interaction instance name. If so, obtain the interaction metadata and the interaction associated entity name of the target interaction instance;

[0125] An instance verification subunit, configured to verify the target interaction instance according to the interaction metadata, the interaction associated entity name, and the program update data;

[0126] A first instance association data determination subunit, configured to, if the verification is passed, respectively determine the instance association data corresponding to the data table entity name and the interaction instance name according to the interaction association path data of the target interaction instance;

[0127] A target instance determination subunit, configured to determine a target logic instance corresponding to the logic instance name and a target control instance corresponding to the control instance name from the initial instance container;

[0128] A second instance association data determination subunit, configured to respectively determine the instance association data corresponding to the logic instance name and the control instance name according to the reference relationship among the target interaction instance, the target logic instance, and the target control instance.

[0129] Optionally, the apparatus further includes:

[0130] A third instance association data determination subunit, configured to, if there is no target interaction instance corresponding to the interaction instance name in the initial instance container, determine that the instance association data corresponding to the corresponding data table entity name and the instance query name is empty.

[0131] Optionally, the first instance association data determination subunit is specifically configured to:

[0132] Determine the interaction instance path name of the target interaction instance, and use the interaction instance path name as the instance association data corresponding to the interaction instance name;

[0133] Determine the interaction parameter path of the target interaction instance, and use the interaction parameter path as the instance association data of the data table entity name.

[0134] Optionally, the target instance container determination module 340 is specifically configured to:

[0135] Determine the candidate processing function of the candidate processing method, and determine a reference processing method from the candidate processing methods according to the candidate processing function and the program processing requirements in the program update data;

[0136] Update the initial agent instance according to the reference processing parameters in the reference processing method to obtain a candidate agent instance, and determine a target processing method from the reference processing method according to the candidate agent instance and the program update parameters in the program update data;

[0137] Update the candidate agent instance according to the target processing method to obtain a target agent instance, and proxy the candidate processing instance according to the target agent instance to obtain a target instance container.

[0138] Optionally, after determining whether the corresponding updated data table is an associated data table according to the data table metadata of the updated data table in the target entity container, the apparatus further includes:

[0139] A virtual interaction instance determination module, configured to, if not, construct a virtual interface class for the corresponding updated data table, and determine a corresponding virtual interaction instance according to the virtual interface class and the interface metadata in the interface configurator;

[0140] An initial instance container update module, configured to construct a corresponding virtual logic instance and a virtual control instance according to the virtual interaction instance, and store the virtual interaction instance, the virtual logic instance, and the virtual control instance in the initial instance container to obtain a target instance container.

[0141] The program zero-code update apparatus provided by the embodiments of the present invention can execute the program zero-code update method provided by any embodiment of the present invention, and has function modules and beneficial effects corresponding to executing each program zero-code update method.

[0142] In the technical solution of the present invention, the collection, storage, use, processing, transmission, provision, and disclosure of the program to be updated, program update data, candidate code framework files, preset framework judgment data, data table attribute data, etc. comply with the provisions of relevant laws and regulations and do not violate public order and good customs.

[0143] Embodiment 5

[0144] Figure 4FIG. 0 is a schematic structural diagram of an electronic device for implementing a program zero-code update method provided in Embodiment 5 of the present invention. The electronic device 410 is intended to represent various forms of digital computers, such as, for example, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as, for example, personal digital processors, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0145] As Figure 4 shown, the electronic device 410 includes at least one processor 411, and a memory communicatively connected to the at least one processor 411, such as a read-only memory (ROM) 412, a random access memory (RAM) 413, etc. Among them, the memory stores a computer program executable by the at least one processor. The processor 411 may execute various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 412 or the computer program loaded from the storage unit 418 into the random access memory (RAM) 413. In the RAM 413, various programs and data required for the operation of the electronic device 410 may also be stored. The processor 411, the ROM 412, and the RAM 413 are connected to each other via a bus 414. The input / output (I / O) interface 415 is also connected to the bus 414.

[0146] Multiple components in the electronic device 410 are connected to the I / O interface 415, including: an input unit 416, such as a keyboard, a mouse, etc.; an output unit 417, such as various types of displays, speakers, etc.; a storage unit 418, such as a magnetic disk, an optical disk, etc.; and a communication unit 419, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 419 allows the electronic device 410 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0147] The processor 411 may be various general-purpose and / or dedicated processing components having processing and computing capabilities. Some examples of the processor 411 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 411 executes the various methods and processes described above, such as the program zero-code update method.

[0148] In some embodiments, the program zero-code update method may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 418. In some embodiments, part or all of the computer program may be loaded and / or installed onto the electronic device 410 via the ROM 412 and / or the communication unit 419. When the computer program is loaded into the RAM 413 and executed by the processor 411, one or more steps of the program zero-code update method described above may be performed. Alternatively, in other embodiments, the processor 411 may be configured to execute the program zero-code update method by any other suitable means (e.g., by means of firmware).

[0149] The various embodiments of the systems and techniques described above in this document may be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGA), application specific integrated circuits (ASIC), application specific standard products (ASSP), systems on a chip (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that may be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a special-purpose or general-purpose programmable processor that receives data and instructions from a storage system, at least one input device, and at least one output device, and transmits the data and instructions to the storage system, the at least one input device, and the at least one output device.

[0150] The computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs may be executed entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine, or entirely on the remote machine or server.

[0151] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0152] In order to provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, speech input, or tactile input).

[0153] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0154] A computing system may include a client and a server. The client and the server are generally far from each other and usually interact via a communication network. The client-server relationship is created by computer programs running on respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system, solving the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.

[0155] It should be understood that various forms of processes shown above can be used, steps can be reordered, added or deleted. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is made herein.

[0156] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A method for zero-code update of a program, characterized in that, Including: Obtain the program update data and the candidate code framework file of the program to be updated, and determine whether the candidate code framework file is the target code framework file according to the preset framework judgment data; If so, determine the data table attribute data of the data table corresponding to the program to be updated, and update the initial entity container according to the program update data, the data table attribute data, the pre-constructed initial entity container, and the initial instance container corresponding to the program to be updated to obtain the target entity container; According to the data table metadata of the update data table in the target entity container, determine whether the corresponding update data table is an associated data table. If so, determine the candidate processing method under the candidate processing instance in the initial instance container; Construct an initial proxy instance, and update the initial instance container according to the program update data, the candidate processing method, and the initial proxy instance to obtain the target instance container; Update the program to be updated according to the target instance container, the target entity container, and the program update data.

2. The method according to claim 1, characterized in that, The step of updating the initial entity container according to the program update data, the data table attribute data, the pre-constructed initial entity container, and the initial instance container corresponding to the program to be updated to obtain the target entity container includes: Store the data table attribute data into the initial entity container to obtain a reference entity container; wherein, the data table attribute data includes an update table name, an update field type, and an update field name; Perform an escape process on the update table name to obtain the corresponding data table entity name, and determine the instance query name according to the data table entity name; According to the instance query name, the program update data, and the initial instance container, respectively determine the instance association data corresponding to the data table entity name and the instance query name, and update the reference entity container according to the instance association data to obtain the target entity container.

3. The method according to claim 2, wherein If the instance query name includes an interaction instance name, a logic instance name, and a control instance name, the step of respectively determining the instance association data corresponding to the data table entity name and the instance query name according to the instance query name, the program update data, and the initial instance container includes: Determine whether there is a target interaction instance that matches the interaction instance name in the initial instance container. If so, obtain the interaction metadata and the interaction associated entity name of the target interaction instance; Verify the target interaction instance according to the interaction metadata, the interaction associated entity name, and the program update data; If the verification is passed, respectively determine the instance association data corresponding to the data table entity name and the interaction instance name according to the interaction associated path data of the target interaction instance; Determine the target logic instance corresponding to the logic instance name and the target control instance corresponding to the control instance name from the initial instance container; Respectively determine the instance association data corresponding to the logic instance name and the control instance name according to the reference relationship among the target interaction instance, the target logic instance, and the target control instance.

4. The method according to claim 3, wherein The method further includes: If the target interaction instance corresponding to the interaction instance name does not exist in the initial instance container, it is determined that the instance association data corresponding to the corresponding data table entity name and instance query name is empty.

5. The method according to claim 3, characterized in that The determining the instance association data corresponding to the data table entity name and the interaction instance name according to the interaction association path data of the target interaction instance includes: Determining the interaction instance path name of the target interaction instance and using the interaction instance path name as the instance association data corresponding to the interaction instance name; Determining the interaction parameter path of the target interaction instance and using the interaction parameter path as the instance association data of the data table entity name.

6. The method according to claim 1, wherein The updating the initial instance container according to the program update data, the candidate processing method, and the initial proxy instance to obtain a target instance container includes: Determining the candidate processing function of the candidate processing method, and determining a reference processing method from the candidate processing methods according to the candidate processing function and the program processing requirements in the program update data; Updating the initial proxy instance according to the reference processing parameters in the reference processing method to obtain a candidate proxy instance, and determining a target processing method from the reference processing methods according to the candidate proxy instance and the program update parameters in the program update data; Updating the candidate proxy instance according to the target processing method to obtain a target proxy instance, and proxying the candidate processing instance according to the target proxy instance to obtain a target instance container.

7. The method according to any one of claims 1 to 6, characterized in that After determining whether the corresponding updated data table is an associated data table according to the data table metadata of the updated data table in the target entity container, the method further includes: If not, constructing a virtual interface class for the corresponding updated data table, and determining a corresponding virtual interaction instance according to the virtual interface class and the interface metadata in the interface configurator; Constructing a corresponding virtual logic instance and virtual control instance according to the virtual interaction instance, and storing the virtual interaction instance, the virtual logic instance, and the virtual control instance in the initial instance container to obtain a target instance container.

8. A program zero-code update device, characterized in that, Including: A target framework file determination module, configured to obtain program update data and a candidate code framework file of a program to be updated, and determine whether the candidate code framework file is a target code framework file according to preset framework judgment data; A target entity container determination module, configured to, if so, determine the data table attribute data of the update data table corresponding to the program to be updated, and update the initial entity container according to the program update data, the data table attribute data, a pre-constructed initial entity container, and the initial instance container corresponding to the program to be updated to obtain a target entity container; A candidate processing method determination module, configured to determine whether the corresponding updated data table is an associated data table according to the data table metadata of the updated data table in the target entity container, and if so, determine the candidate processing method under the candidate processing instance in the initial instance container; A target instance container determination module, configured to construct an initial proxy instance, and update the initial instance container according to the program update data, the candidate processing method, and the initial proxy instance, so as to obtain a target instance container; A program update module, configured to update the program to be updated according to the target instance container, the target entity container, and the program update data.

9. An electronic device, characterized in that, Comprising: One or more processors; A memory, configured to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement a program zero-code update method according to any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by a processor, it implements a program zero-code update method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Low-code development framework based on configuration file and inertia principle

    CN111880782A

  • Container handover for device updates

    US10007509B1