Application updating method and device, program product and electronic equipment

Obtain and replace target configuration files or software packages through the service layer low-code development interface to achieve hot loading of application service components, solve the problem of frequent restarts of application updates, improve application stability and update efficiency, and reduce operation and maintenance costs and development complexity.

CN118778984APending Publication Date: 2024-10-15NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410969567.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-18
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

In the existing technology, application updates require frequent application restarts, resulting in poor application stability, high operation and maintenance costs, and low update efficiency.

Method used

Through the low-code development interface of the service layer, respond to the operation of the service deployment control, obtain the target configuration file, replace the original configuration file of the service component to be updated, or obtain the target software package or source code file to implement hot loading of the service component to be updated.

Benefits of technology

Real-time updates of application functions can be achieved without restarting the application, improving application stability and update efficiency, and reducing operation and maintenance costs and back-end development complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118778984A_ABST
    Figure CN118778984A_ABST
Patent Text Reader

Abstract

The invention provides an application updating method and device, a program product and electronic equipment, and relates to the technical field of computers.The application updating method comprises the steps that in response to a triggering operation for a service deployment control in a service layer low-code development interface, a target configuration file of a to-be-updated service component generated by the service layer low-code development interface is obtained; the service layer low-code development interface is used for visually editing a configuration file corresponding to the to-be-updated service component; in the running process of the application, under the condition that the target configuration file comprises the first updating information, replacing the original configuration file of the to-be-updated service component with the target configuration file; under the condition that the target configuration file comprises second updating information, obtaining a target software package or a target source code file through the second updating information, and replacing an original software package used by the to-be-updated service component with the target software package; or importing the target source code file into a corresponding code file used by the to-be-updated service component. The application updating efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to an application updating method, an application updating device, a computer program product, and an electronic device. Background Art

[0002] With the rapid growth of application business volume, the functional requirements for different businesses are increasing, which poses a huge challenge to development efficiency.

[0003] In related technologies, developers need to manually write framework code based on newly added business functions, and then restart the application to make the update effective. Obviously, when the business is frequently iterated and launched, this method requires frequent application restarts, resulting in poor application stability, increased application operation and maintenance costs, and reduced application update efficiency. Summary of the invention

[0004] The present disclosure provides a human application update method, an application update device, a computer program product and an electronic device, thereby improving the problem of low application update efficiency at least to a certain extent.

[0005] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.

[0006] According to a first aspect of the present disclosure, there is provided an application updating method, wherein the application comprises one or more functions, and the business logic of each function is implemented by a corresponding service component; the method comprises: in response to a trigger operation on a service deployment control in a service layer low-code development interface, obtaining a target configuration file of the service component to be updated generated by the service layer low-code development interface; the service layer low-code development interface is used to visually edit a configuration file corresponding to the service component to be updated; during the operation of the application, when the target configuration file includes first update information, replacing the original configuration file of the service component to be updated with the target configuration file; when the target configuration file includes second update information, obtaining a target software package or a target source code file through the second update information, replacing the original software package used by the service component to be updated with the target software package; or importing the target source code file into a corresponding code file used by the service component to be updated; so as to hot load the service component to be updated.

[0007] According to a second aspect of the present disclosure, an application updating device is provided, wherein the application includes one or more functions, and the business logic of each function is implemented by a corresponding service component; the device includes: a target configuration file acquisition module, configured to obtain a target configuration file of the service component to be updated generated by the service layer low-code development interface in response to a trigger operation on a service deployment control in the service layer low-code development interface; the service layer low-code development interface is used to visually edit a configuration file corresponding to the service component to be updated; a configuration replacement module, configured to replace the original configuration file of the service component to be updated with the target configuration file when the target configuration file includes first update information during the operation of the application; when the target configuration file includes second update information, obtain a target software package or a target source code file through the second update information, and replace the original software package used by the service component to be updated with the target software package; or import the target source code file into a corresponding code file used by the service component to be updated, so as to hot load the service component to be updated.

[0008] According to a third aspect of the present disclosure, a computer program is provided, which, when executed by a processor, implements the application update method of the first aspect and possible implementation manners thereof.

[0009] According to a fourth aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor, wherein the processor is configured to execute the application update method of the first aspect and possible implementation thereof by executing the executable instructions.

[0010] The technical solution disclosed in this disclosure has the following beneficial effects:

[0011] On the one hand, by triggering the service deployment control in the service layer low-code development interface, the service component to be updated can be hot-loaded according to the target configuration file of the service component to be updated, thereby realizing real-time update of application functions. Compared with the solution of related technologies that require restarting the application to make the application update effective, this solution can realize real-time update of application functions without restarting the application after updating the service component to be updated, thereby improving the stability of the application operation process, and reducing the operation and maintenance costs caused by frequent restarts of the application during the application update process, effectively improving the update efficiency of the application and improving the user experience. On the other hand, this solution provides a service layer low-code development interface for visually editing the corresponding configuration files of the service component to be updated. Developers only need to make simple edits to the service layer low-code development interface to automatically build the service layer development architecture corresponding to the service component to be updated, effectively reducing the complexity of the application backend development process, reducing the amount of redundant code in the backend development process, optimizing the project architecture, and helping to reduce the time cost of the application development process and further improve the application update efficiency.

[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 disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0014] Figure 1 The system operation architecture of this exemplary embodiment is shown;

[0015] Figure 2 A flowchart of an application updating method in this exemplary embodiment is shown;

[0016] Figure 3 A flow chart showing a method for determining a target functional structure in this exemplary embodiment;

[0017] Figure 4A A schematic diagram showing a service layer low-code development interface including a first control in this exemplary embodiment is shown;

[0018] Figure 4B A schematic diagram showing a service layer low-code development interface including a second control in this exemplary embodiment is shown;

[0019] Figure 5A flowchart showing a method for obtaining a target configuration file in this exemplary embodiment;

[0020] Figure 6 A flowchart showing a process of replacing an original software package with a target software package in this exemplary embodiment;

[0021] Figure 7 A schematic diagram showing the structure of an application updating device in this exemplary embodiment is shown;

[0022] Figure 8 A schematic structural diagram of an electronic device in this exemplary embodiment is shown. DETAILED DESCRIPTION

[0023] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.

[0024] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0025] In related technologies, developers need to manually write framework code based on the requirements of new business functions, and then restart the application to make the update effective. Obviously, when the business is frequently iterated and launched, this method requires frequent application restarts, resulting in poor application stability, increased application operation and maintenance costs, and reduced application update efficiency.

[0026] In view of one or more of the above problems, the exemplary embodiment of the present disclosure first provides an application update method. Figure 1 The system architecture of the operating environment of this exemplary embodiment will be described.

[0027] refer to Figure 1 As shown, the system architecture 100 may include a terminal device 110 and a server 120. The terminal device 110 may be an electronic device such as a tablet computer, a laptop computer, or a desktop computer, and the terminal device 110 may be used to visually edit configuration files in the low-code development interface of the service layer. The server 120 generally refers to a background system that provides configuration update related services in this exemplary embodiment, such as a server that implements an application update method. The server 120 may be a single server or a cluster formed by multiple servers, which is not limited in this disclosure. The terminal device 110 and the server 120 may be connected via a wired or wireless communication link for data exchange.

[0028] The application update method in this exemplary embodiment can be executed by the terminal device 110. For example, in the application update scenario, the terminal device 110 can be a computer that displays a service layer low-code development interface. The developer can visually edit the service layer low-code development interface on the terminal device 110 according to the update requirements of the service component to be updated to develop the service component to be updated, and trigger the service deployment control after the development is completed, so that the terminal device 110 automatically obtains the target configuration file, and completes the hot loading of the service layer code corresponding to the service component to be updated according to the target configuration file, so as to realize the dynamic update of the service component to be updated and the hot deployment of the application.

[0029] In one embodiment, the terminal device 110 can be a computer that displays the service layer low-code development interface. After the developer completes the backend configuration through the service layer low-code development interface, in response to the trigger operation of the service deployment control in the service layer low-code development interface, the terminal device 110 can send the acquired target configuration file of the service component to be updated to the server 120. After receiving the target configuration file, the server 120 can hot load the service layer code corresponding to the service component to be updated according to the target configuration file: when the target configuration file includes the first update information, the original configuration code block at the corresponding position in the original configuration file of the service component to be updated is replaced with the first update information; when the target configuration file includes the second update information, the target software package or the target source code file is obtained through the second update information, and the original software package used by the service component to be updated is replaced with the target software package; or the target source code file is imported into the corresponding code file used by the service component to be updated; thereby realizing dynamic update of the service component to be updated.

[0030] As can be seen from the above, the application updating method in this exemplary embodiment can be executed by the terminal device 110 or the server 120 .

[0031] Combine the following Figure 2An application updating method is described. The application includes one or more functions, and the business logic of each function is implemented through a corresponding service component. Figure 2 An exemplary process of an application update method is shown, including the following steps S210 to S220:

[0032] Step S210, in response to a trigger operation on a service deployment control in a service layer low-code development interface, obtaining a target configuration file of a service component to be updated generated by the service layer low-code development interface; the service layer low-code development interface is used to visually edit a configuration file corresponding to the service component to be updated;

[0033] Step S220, when the target configuration file includes the first update information, the original configuration file of the service component to be updated is replaced with the target configuration file; when the target configuration file includes the second update information, the target software package or the target source code file is obtained through the second update information, and the original software package used by the service component to be updated is replaced with the target software package; or the target source code file is imported into the corresponding code file used by the service component to be updated; so as to complete the hot loading of the service component to be updated and realize the dynamic update of the service component to be updated.

[0034] Based on the above method, on the one hand, by triggering the service deployment control in the service layer low-code development interface, the service component to be updated can be hot-loaded according to the target configuration file of the service component to be updated, thereby realizing real-time update of application functions. Compared with the solution of related technologies that require restarting the application to make the application update effective, this solution can realize real-time update of application functions without restarting the application after updating the service component to be updated, thereby improving the stability of the application operation process, and reducing the operation and maintenance costs caused by frequent restarts of the application during the application update process, effectively improving the update efficiency of the application and improving the user experience. On the other hand, this solution provides a service layer low-code development interface for visually editing the corresponding configuration files of the service component to be updated. Developers only need to make simple edits to the service layer low-code development interface to automatically build the service layer development architecture corresponding to the service component to be updated, effectively reducing the complexity of the application backend development process, reducing the amount of redundant code in the backend development process, optimizing the project architecture, and helping to reduce the time cost of the application development process and further improve the application update efficiency.

[0035] Below Figure 2 Each step in the procedure is described in detail.

[0036] refer to Figure 2In step S210, in response to the trigger operation of the service deployment control in the service layer low-code development interface, the target configuration file of the service component to be updated generated by the service layer low-code development interface is obtained; the service layer low-code development interface is used to visually edit the configuration file corresponding to the service component to be updated.

[0037] Among them, the service layer low-code development interface allows developers to design the service layer (Service Layer) of the application through low-code development methods; the low-code development method can modularize the function points through various underlying encapsulation methods, provide necessary parameter entries to the outside, and then use graphical drag and drop methods. For example, developers only need to enter parameters to complete the deployment of a function, and can also adjust the execution order of each function by dragging and dropping modules, thereby reducing the development threshold and completing the logic development efficiently; in the software development architecture, the service layer does not directly execute specific tasks, but is responsible for processing the core business logic of the application, so that the presentation layer and the data access layer can be low-coupled and communicate efficiently. Exemplarily, the commonly used basic functions of the service layer in the application development process can be encapsulated, and visual components can be generated, and parameter input entries can be provided to the outside to obtain the service layer low-code development interface; at the same time, since different service layer codes in the same project are usually responsible for implementing the logic development of different functions, custom coding components can be provided to users for the parts of each function that exceed the basic functions, so that users can perform custom development.

[0038] The above-mentioned service deployment control is used to deploy the configuration edited by the developer in the service layer low-code development interface to the project with one click, so as to realize hot loading of the service layer code corresponding to the configuration file. Exemplarily, the low-code development platform in the related technology mainly focuses on the code generation process. Developers usually need to export the latest configuration file after generating the configuration in the low-code development platform, and then load the latest configuration in the corresponding service layer by manual deployment, and finally restart the application to make the service layer update take effect; and the service deployment control provided by this exemplary embodiment can hot load the updated backend configuration in the corresponding service layer after the developer completes the configuration update of the service layer, so as to realize hot update of the application, and the entire application update process does not need to restart the application to make the update take effect.

[0039] The above-mentioned service components can be used to implement the business logic of the service layer of the application's functions in code. For example, the service component can be a service layer program file that implements the application's functions; and the service components to be updated may include service components that need to perform corresponding business logic updates based on new functional requirements; the above-mentioned configuration files can be used to record the identification information and configuration information of each sub-function in the service component, as well as the execution order of each sub-function; wherein the sub-function may include the method used to implement the application function, and the identification information may include the method name of the method, such as read_redis; the configuration information may be used to describe the content about the method entered by the developer in the service layer low-code development interface. For example, the configuration information may include a list of parameters required for the method implementation process, or the code storage path of a custom-written method body, etc.

[0040] In one embodiment, in response to a trigger operation on a service deployment control in a service layer low-code development interface, before obtaining a target configuration file of a service component to be updated generated by the service layer low-code development interface, refer to Figure 3 As shown, the above method may further include steps S310 to S320:

[0041] Step S310, based on the service layer identification information of the service component to be updated, the original functional structure of the service component to be updated is obtained, and the original functional structure is displayed in the service layer low-code development interface; the original functional structure includes sub-functional nodes and connection lines connecting the sub-functional nodes;

[0042] Step S320, receiving interactive operations on the service layer low-code development interface to edit the original functional structure, and determining the target functional structure based on the edited original functional structure; the target functional structure is a graphical representation of the target configuration file.

[0043] Among them, the above-mentioned functional structure can be a directed acyclic graph, which is used to visually describe the execution order of each method in the service component. One method corresponds to a sub-function node, and the sub-function node is used to visualize the method; the original functional structure is used to describe the functional structure of the service component to be updated when it is not updated, and the target functional structure is used to describe the functional structure of the service component to be updated after the configuration is updated; the connecting lines are used to connect the sub-function nodes to describe the execution order of each method in the service component.

[0044] The service layer low-code development interface includes at least a first control and a second control, wherein the first control is used to modify the configuration parameters of the sub-function node, and the second control is used to input the custom code block required to implement the sub-function corresponding to the node; the above-mentioned receiving interactive operations for the service layer low-code development interface to edit the original functional structure may include:

[0045] When the interactive operation includes a first interactive operation for a first control, the configuration parameters of the corresponding sub-function node are modified based on the first interactive operation; when the interactive operation includes a second interactive operation for a second control, a custom code block is entered in the second control; when the interactive operation includes a third interactive operation for a sub-function node or a connecting line, the execution order of each sub-function node in the original functional structure is edited based on the third interactive operation.

[0046] Among them, the first control is a visual control obtained by encapsulating the commonly used basic functions in the service layer development process, which can provide developers with a visual parameter entry. Developers only need to enter necessary configuration parameters in the parameter entry to update the basic functions; the basic functions may include commonly used functions in the service layer development process, for example, the basic functions may include reading and writing remote dictionary services (Remote Dictionary Server, Redis), reading and writing HBase databases and other input / output operations, general calculation processes of models, etc.; the first interactive operation may include configuration parameter editing operations for the first control, such as operations of entering or modifying configuration parameters in the first control.

[0047] Exemplary, reference Figure 4A As shown, the service layer low-code development interface 400 may include a service deployment control 410, a current editing node display control 420, and a functional structure display area 430: including a sub-function node 431 corresponding to the basic function, a sub-function node 432 corresponding to the custom function, and a connecting line 433; service layer identification information 440, an output result display area 450, and a first control 460; developers can enter corresponding configuration parameters in the first control 460, such as entering the configuration parameter "String" in the input box of the configuration item "type", entering the configuration parameter "redis_test_key" in the input box of the configuration item "keys", etc., to modify the configuration parameters of the sub-function node 431; the configuration parameter "read_redis" of the configuration item operator_id can be used to represent the identification information of the sub-function node, and accordingly, the identification information of the sub-function node can be modified by entering other strings in the input box.

[0048] The second control can be a visual control used for custom coding to implement custom functions. The component can simultaneously support multiple programming languages, such as Java, Python, etc.; that is, developers can use Java or Python to perform custom coding in the second control to complete the development of custom requirements; accordingly, the second interactive operation can include programming operations.

[0049] Exemplary, reference Figure 4BAs shown, the service layer low-code development interface 400 may also include a second control 470, which may include a configuration item operator_id for modifying the identification information of the sub-function node, and a custom coding area 471. The developer only needs to write Java code or Python code in the custom coding area 471. After clicking the "Save" button, the custom code block generates a corresponding file and stores it in the specified location, and binds the path information of the specified location to the sub-function node; in this process, if the custom code block is written in Java language, the custom code block can be packaged into a software package, such as a Java Archive File (JAR) package, and then stored; if the custom code block is written in Python language, the custom code block can be automatically saved as a file in the ".py" format and then stored. In addition, the sub-function nodes or connecting lines in the functional structure display area 430 can be dragged through third interactive operations such as "drag and drop" to adjust the execution order of each sub-function node.

[0050] Developers can modify the service components to be updated through interactive operations on the low-code development interface of the service layer. In this process, they only need to pass in the corresponding configuration parameters for basic functions, and only need to perform custom programming operations for custom functions, which lowers the development threshold, effectively improves development efficiency, and reduces the amount of redundant code.

[0051] After the configuration update of the service component to be updated is completed through the service layer low-code development interface, the target configuration file can be obtained and applied through the trigger operation of the service deployment control, such as clicking the service deployment control. In one embodiment, the target configuration file of the service component to be updated generated by the service layer low-code development interface is obtained, refer to Figure 5 As shown, steps S510 to S530 may be included:

[0052] Step S510, obtaining configuration information and identification information of each sub-function node in the target function structure; the configuration information at least includes first update information generated based on configuration parameters and / or second update information generated based on storage information of the custom code block.

[0053] Among them, the above-mentioned update information may include the identification information and configuration information of the sub-function node modified by the developer; the above-mentioned first update information may include the identification information and configuration parameters of the sub-function node corresponding to the basic function modified by the user, and the second update information may include the storage information of the custom code block of the sub-function node corresponding to the custom function modified by the user; the storage information of the above-mentioned custom code block may include the storage information of the target software package generated based on the custom code block, or the storage information of the target source code file generated based on the custom code block, that is, the storage information can be understood as the storage path of the target software package or the target source code file.

[0054] Step S520: Bind the identification information and configuration information of the same sub-function node.

[0055] In one implementation, the binding of the identification information and configuration information of the same sub-function node may include:

[0056] The identification information and configuration information of the same sub-function node are written into the same code block through a specified programming language to bind the identification information and configuration information of the sub-function node.

[0057] The above-specified programming languages ​​may include domain specific languages ​​(DSL), Java, Python and other programming languages. DSL languages ​​are computer languages ​​specially designed to solve a certain type of task. Figure 4A The identification information and configuration information of the sub-function node read_redis in the code block are written into the following code block to implement the binding of the identification information and configuration information of the sub-function node read_redis:

[0058]

[0059] Through DSL language Figure 4B The identification information and configuration information of the sub-function node code_123 in the code block are written into the following code block to implement the binding of the identification information and configuration information of the sub-function node code_123:

[0060]

[0061] Step S530, determining the execution order between the sub-function nodes according to the connection relationship between the sub-function nodes, and describing the execution order through a specified programming language to obtain a target configuration file.

[0062] Exemplary, reference Figure 4A or Figure 4BAs shown, the functional structure (directed acyclic graph) shown in 430 is described by DSL language, and the target configuration file is obtained as follows:

[0063]

[0064]

[0065]

[0066] based on Figure 5 The method can obtain the configuration file corresponding to the updated configuration of the service component to be updated, and the configuration file contains the update information of each sub-function node, which provides the possibility of hot loading the service component to be updated based on the target configuration file in the subsequent steps.

[0067] In one embodiment, after obtaining the target configuration file of the service component to be updated generated by the service layer low-code development interface, the method may further include: sending the target configuration file to the loading process of the service component to be updated to implement the hot loading process of the service component in step S220.

[0068] For example, the target configuration file can be sent to the corresponding loading process through the interface to store the target configuration file in the memory and bind it to the service layer identification information corresponding to the service component to be updated, so as to execute step S220 in the loading process to complete the hot loading of the service component to be updated.

[0069] Continue to refer Figure 2 In step S220, during the running of the application, when the target configuration file includes the first update information, the original configuration file of the service component to be updated is replaced with the target configuration file; when the target configuration file includes the second update information, the target software package or the target source code file is obtained through the second update information, and the original software package used by the service component to be updated is replaced with the target software package; or the target source code file is imported into the corresponding code file used by the service component to be updated; so as to hot load the service component to be updated.

[0070] The programming language used in the target source code file is different from the programming language used in the target software package. For example, the target source code file can be written in Python, and the target software package can be a JAR package generated by a custom code block written in Java. The programming language used in the corresponding code file is the same as that in the target source code file, and the corresponding code file may include a file that needs to use all or part of the code in the target source code file. For example, if the programming language used in the corresponding code file and the programming language used in the target source code file are both Python, the target source code file can be imported into the corresponding code file by "import package".

[0071] Since the first update information may include the configuration information of the basic function modified by the developer, according to the content of step S220, if the configuration parameters of the basic function are updated, the original configuration file of the service component to be updated can be directly replaced with the target configuration file, or the identification information and / or configuration information corresponding to the updated sub-function node in the original configuration file can be replaced by text, thereby modifying the original configuration file to the target configuration file; when the loading process loads the service component to be updated, it can be automatically matched to the target configuration file according to the service layer identification information of the service component to be updated, so as to realize hot update of the basic function.

[0072] Since the target configuration file stores storage information corresponding to the custom code block, it is necessary to find and load the target software package or target source code file corresponding to the custom code block according to the storage information.

[0073] In one implementation, replacing the original software package used by the to-be-updated service component with the target software package may include:

[0074] Load the implementation class in the target software package through the class loader, and specify the sub-function node applied by the implementation class according to the target configuration file;

[0075] Uninstall the implementation class corresponding to the original package.

[0076] The above specifies the sub-function nodes used by the implementation class according to the target configuration file, refer to Figure 6 As shown, steps S610 to S620 may be included:

[0077] Step S610, obtaining identification information of the sub-function node corresponding to the second update information in the target configuration file;

[0078] Step S620: Establish a mapping relationship between the implementation class and the identification information through the dependency injection framework to specify the sub-function node applied by the implementation class.

[0079] For example, since the target configuration file includes the storage information of the target software package generated by the custom code block, the target software package can be found and downloaded based on the storage information, and all implementation classes in the target software package can be loaded into the memory through a class loader such as URLClassLoader. Then, through a dependency injection framework (such as Map injection), a mapping relationship between the target software package and the identification information of the sub-function node corresponding to the custom code block is established to specify the sub-function node corresponding to the implementation class, and at the same time, the implementation class in the original software package is uninstalled to achieve hot update of the software package.

[0080] By loading the implementation class in the target software package through the class loader and specifying the sub-function node applied by the implementation class according to the target configuration file, the updated implementation class can be replaced, thereby realizing the hot update of Java code.

[0081] For example, the above-mentioned target source code file can be written in Python programming language. In the process of importing the target source code file into the corresponding code file used by the service component to be updated, it may happen that the loading process written in Java programming language cannot directly call the target source code file written in Python programming language. Therefore, after receiving the target configuration file, the target source code file can be read according to the storage information of the target source code file through Py4J technology, and written to the specified location, and then the corresponding Python code file can be imported through the "import package" method to replace the original source code file used by the corresponding Python code file with the target source code file, thereby realizing the hot update of the Python code file used by the service component to be updated; after the source code file is replaced, when the application requests to use the target source code file, the corresponding Python code file can be called through Py4J technology, and the corresponding Python code file can find and use the target source code file through "import package".

[0082] Based on the above method, the service components to be updated are hot loaded to achieve real-time update of the application, improve the stability of the application running process, and reduce the operation and maintenance costs caused by frequent restart of the application, effectively improve the update efficiency of the application, and improve the user experience.

[0083] The exemplary embodiment of the present disclosure also provides an application updating device, wherein the application includes one or more functions, and the business logic of each function is implemented by a corresponding service component. Figure 7 As shown, the application updating device 800 may include:

[0084] The target configuration file acquisition module 710 is configured to obtain the target configuration file of the service component to be updated generated by the service layer low-code development interface in response to the trigger operation of the service deployment control in the service layer low-code development interface; the service layer low-code development interface is used to visually edit the configuration file corresponding to the service component to be updated;

[0085] The configuration replacement module 720 is configured to, during the running process of the application, replace the original configuration file of the service component to be updated with the target configuration file when the target configuration file includes first update information; when the target configuration file includes second update information, obtain the target software package or target source code file through the second update information, and replace the original software package used by the service component to be updated with the target software package; or import the target source code file into the corresponding code file used by the service component to be updated; so as to hot load the service component to be updated.

[0086] In one embodiment, before the above-mentioned response to the trigger operation of the service deployment control in the service layer low-code development interface and obtaining the target configuration file of the service component to be updated generated by the service layer low-code development interface, the above-mentioned device may also include:

[0087] Based on the service layer identification information of the service component to be updated, the original functional structure of the service component to be updated is obtained, and the original functional structure is displayed in the service layer low-code development interface; the original functional structure includes sub-functional nodes and connecting lines for connecting sub-functional nodes;

[0088] Receive interactive operations on the service layer low-code development interface to edit the original functional structure, and determine the target functional structure based on the edited original functional structure; the target functional structure is a graphical representation of the target configuration file.

[0089] In one embodiment, the service layer low-code development interface includes at least a first control and a second control, wherein the first control is used to modify the configuration parameters of the sub-function node, and the second control is used to input the custom code block required to implement the sub-function corresponding to the sub-function node; receiving an interactive operation on the service layer low-code development interface to edit the original function structure may include:

[0090] When the interactive operation includes a first interactive operation for a first control, the configuration parameters of the corresponding sub-function node are modified based on the first interactive operation; when the interactive operation includes a second interactive operation for a second control, a custom code block is entered in the second control; when the interactive operation includes a third interactive operation for a sub-function node or a connecting line, the execution order of each sub-function node in the original functional structure is edited based on the third interactive operation.

[0091] In one implementation, the target configuration file of the service component to be updated generated by the service layer low-code development interface may include:

[0092] Acquire configuration information and identification information of each sub-function node in the target function structure; the configuration information at least includes first update information generated based on configuration parameters and / or second update information generated based on storage information of the custom code block;

[0093] Binding the identification information and configuration information of the same sub-function node;

[0094] The execution order between the sub-function nodes is determined according to the connection relationship between the sub-function nodes, and the execution order is described by a specified programming language to obtain a target configuration file.

[0095] In one implementation, the storage information of the custom code block may include storage information of a software package generated based on the custom code block, or storage information of a source code file generated based on the custom code block.

[0096] In one implementation, the binding of the identification information and configuration information of the same sub-function node may include:

[0097] The identification information and configuration information of the same sub-function node are written into the same code block through a specified programming language to bind the identification information and configuration information of the sub-function node.

[0098] In one implementation, replacing the original software package used by the to-be-updated service component with the target software package may include:

[0099] Load the implementation class in the target software package through the class loader, and specify the sub-function node applied by the implementation class according to the target configuration file;

[0100] Uninstall the implementation class corresponding to the original package.

[0101] In one implementation, the sub-function node applied by the implementation class specified according to the target configuration file may include:

[0102] In the target configuration file, obtaining identification information of the sub-function node corresponding to the second update information;

[0103] A mapping relationship between the implementation class and the identification information is established through the dependency injection framework to specify the sub-function node to which the implementation class is applied.

[0104] The specific details of each part of the above device have been described in detail in the implementation method part, so they will not be repeated here.

[0105] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the exemplary embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0106] The exemplary embodiments of the present disclosure further provide a computer program product, the computer program product including a computer program, and the computer program implements the above-mentioned application updating method when executed by a processor.

[0107] Computer programs for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The computer program may be executed entirely on the user computing device, partially on the user device, as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0108] In one embodiment, the computer program product may be an intangible product including a computer program. Exemplarily, the computer program product may be implemented as a virtual digital product, such as a digital file storing an executable file, an installation package, etc. of the computer program.

[0109] The code of the computer program can be written in one or more programming languages. Programming languages ​​such as C language, Java, C++, etc. The program code can be executed entirely on the user computing device, or partially on the user computing device, or as a separate software package, or partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, such as a local area network (LAN), a wide area network (WAN), etc., or can be connected to an external computing device (e.g., an Internet connection provided by an operator).

[0110] Computer programs can be carried or transmitted by electrical, magnetic, optical, electromagnetic, infrared and other signals. Electronic devices can convert signals carrying computer programs into digital signals to run computer programs. When a computer program runs on an electronic device, its code is used to enable the electronic device to execute (more specifically, the processor of the electronic device can execute) the method steps of various exemplary embodiments of the present disclosure, such as the above-mentioned application update method, the application includes one or more functions, and the business logic of each function is implemented by a corresponding service component; it includes the following steps: in response to a trigger operation for a service deployment control in a service layer low-code development interface, obtaining a target configuration file of the service component to be updated generated by the service layer low-code development interface; the service layer low-code development interface is used to visually edit the configuration file corresponding to the service component to be updated; during the operation of the application, if the target configuration file includes the first update information, the original configuration file of the service component to be updated is replaced with the target configuration file; if the target configuration file includes the second update information, the target software package or target source code file is obtained through the second update information, and the original software package used by the service component to be updated is replaced with the target software package; or the target source code file is imported into the corresponding code file used by the service component to be updated; so as to hot load the service component to be updated.

[0111] By executing the above method steps through a computer program, on the one hand, by triggering the service deployment control in the service layer low-code development interface, the service component to be updated can be hot-loaded according to the target configuration file of the service component to be updated, thereby realizing real-time update of application functions. Compared with the solution of related technologies that requires restarting the application to make the application update effective, this solution can realize real-time update of application functions without restarting the application after updating the service component to be updated, thereby improving the stability of the application operation process, and reducing the operation and maintenance costs caused by frequent restarts of the application during the application update process, effectively improving the update efficiency of the application, and improving the user experience. On the other hand, this solution provides a service layer low-code development interface for visually editing the corresponding configuration files of the service component to be updated. Developers only need to make simple edits to the service layer low-code development interface to automatically build the service layer development architecture corresponding to the service component to be updated, effectively reducing the complexity of the application backend development process, reducing the amount of redundant code in the backend development process, optimizing the project architecture, and helping to reduce the time cost of the application development process and further improve the application update efficiency.

[0112] The exemplary embodiments of the present disclosure also provide an electronic device, such as the terminal device 110 or the server 120 described above. The electronic device may include a processor and a memory. The memory stores executable instructions of the processor, such as a computer program. The processor executes the method steps of various exemplary embodiments of the present disclosure by executing the executable instructions. In addition, the electronic device may also include a display for displaying a service layer low-code development interface.

[0113] Reference below Figure 8 , the electronic device is exemplarily described in the form of a general-purpose computing device. It should be understood that Figure 8 The electronic device 800 shown is merely an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0114] like Figure 8 As shown, the electronic device 800 may include: a processor 810 , a memory 820 , a bus 830 , an I / O (input / output) interface 840 , a network adapter 850 , and a display 860 .

[0115] The processor 810 may include one or more processing units. For example, the processor 810 may include an AP (Application Processor), a modem processor, a GPU (Graphics Processing Unit), an ISP (Image Signal Processor), a controller, an encoder, a decoder, a DSP (Digital Signal Processor), a baseband processor and / or an NPU (Neural-Network Processing Unit), etc.

[0116] The processor 810 can be used to execute executable instructions stored in the memory 820, such as executing the above-mentioned application update method, wherein the application includes one or more functions, and the business logic of each function is implemented by a corresponding service component; it includes the following steps: in response to a trigger operation on a service deployment control in a service layer low-code development interface, obtaining a target configuration file of the service component to be updated generated by the service layer low-code development interface; the service layer low-code development interface is used to visually edit a configuration file corresponding to the service component to be updated; during the operation of the application, if the target configuration file includes first update information, replacing the original configuration file of the service component to be updated with the target configuration file; if the target configuration file includes second update information, obtaining a target software package or a target source code file through the second update information, and replacing the original software package used by the service component to be updated with the target software package; or importing the target source code file into a corresponding code file used by the service component to be updated; so as to hot load the service component to be updated.

[0117] By executing the above method steps through a computer program, on the one hand, by triggering the service deployment control in the service layer low-code development interface, the service component to be updated can be hot-loaded according to the target configuration file of the service component to be updated, thereby realizing real-time update of application functions. Compared with the solution of related technologies that requires restarting the application to make the application update effective, this solution can realize real-time update of application functions without restarting the application after updating the service component to be updated, thereby improving the stability of the application operation process, and reducing the operation and maintenance costs caused by frequent restarts of the application during the application update process, effectively improving the update efficiency of the application, and improving the user experience. On the other hand, this solution provides a service layer low-code development interface for visually editing the corresponding configuration files of the service component to be updated. Developers only need to make simple edits to the service layer low-code development interface to automatically build the service layer development architecture corresponding to the service component to be updated, effectively reducing the complexity of the application backend development process, reducing the amount of redundant code in the backend development process, optimizing the project architecture, and helping to reduce the time cost of the application development process and further improve the application update efficiency.

[0118] The memory 820 may include a volatile memory, such as a RAM 821, a cache unit 822, and may also include a non-volatile memory, such as a ROM 823. The memory 820 may also include one or more program modules 824, such program modules 824 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or a combination thereof may include the implementation of a network environment. For example, the program module 824 may include each module in the above-mentioned apparatus 700.

[0119] The bus 830 is used to realize the connection between different components of the electronic device 800, and may include a data bus, an address bus, and a control bus.

[0120] The electronic device 800 can communicate with one or more external devices 900 (eg, a keyboard, a mouse, an external controller, etc.) through the I / O interface 840 .

[0121] The electronic device 800 can communicate with one or more networks through the network adapter 850. For example, the network adapter 850 can provide mobile communication solutions such as 3G / 4G / 5G, or wireless communication solutions such as wireless LAN, Bluetooth, near field communication, etc. The network adapter 850 can communicate with other modules of the electronic device 800 through the bus 830.

[0122] The electronic device 800 can display a graphical user interface through the display 860, such as a service layer low-code development interface.

[0123] although Figure 8 Not shown, other hardware and / or software modules may also be provided in the electronic device 800, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0124] As can be seen from the above, the technical solution of the present disclosure can be implemented as a method, an apparatus, a system, a computer program product, an electronic device, etc. Those skilled in the art can understand that various aspects of the present disclosure can be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software, such as being respectively referred to as a "circuit", "module" or "system".

[0125] It should be understood that the present disclosure is not limited to the specific method steps or structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from the scope thereof. Those skilled in the art will easily think of other embodiments based on the specific embodiments provided by the present disclosure. Therefore, the specific embodiments provided by the present disclosure are only exemplary, and the scope and spirit of the present disclosure are indicated by the claims, and any variations, uses or adaptive changes of the present disclosure should be covered, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the technical field that are not disclosed in the present disclosure.

Claims

1. An application update method, characterized in that: The application includes one or more functions, and the business logic of each function is implemented by a corresponding service component; the method includes: In response to a trigger operation on a service deployment control in a service layer low-code development interface, a target configuration file of the service component to be updated generated by the service layer low-code development interface is obtained; the service layer low-code development interface is used to visually edit a configuration file corresponding to the service component to be updated; During the running process of the application, if the target configuration file includes first update information, the original configuration file of the service component to be updated is replaced with the target configuration file; if the target configuration file includes second update information, the target software package or target source code file is obtained through the second update information, and the original software package used by the service component to be updated is replaced with the target software package; or the target source code file is imported into the corresponding code file used by the service component to be updated; so as to hot load the service component to be updated.

2. The method according to claim 1, characterized in that Before obtaining the target configuration file of the service component to be updated generated by the service layer low-code development interface in response to the trigger operation on the service deployment control in the service layer low-code development interface, the method further includes: Based on the service layer identification information of the service component to be updated, the original functional structure of the service component to be updated is obtained, and the original functional structure is displayed in the service layer low-code development interface; the original functional structure includes sub-functional nodes and connecting lines for connecting the sub-functional nodes; Receive interactive operations on the service layer low-code development interface to edit the original functional structure, and determine a target functional structure based on the edited original functional structure; the target functional structure is a graphical representation of the target configuration file.

3. The method according to claim 2, characterized in that The service layer low-code development interface includes at least a first control and a second control, wherein the first control is used to modify the configuration parameters of the sub-function node, and the second control is used to input a custom code block required to implement the sub-function corresponding to the sub-function node; the receiving of an interactive operation on the service layer low-code development interface to edit the original functional structure includes: In a case where the interactive operation includes a first interactive operation for the first control, the configuration parameters of the corresponding sub-function node are modified based on the first interactive operation; in a case where the interactive operation includes a second interactive operation for the second control, a custom code block is input in the second control; in a case where the interactive operation includes a third interactive operation for the sub-function node or the connecting line, the execution order of each sub-function node in the original functional structure is edited based on the third interactive operation.

4. The method according to claim 3, characterized in that The obtaining of the target configuration file of the service component to be updated generated by the service layer low-code development interface includes: Acquire configuration information and identification information of each sub-function node in the target function structure; the configuration information at least includes the first update information generated based on the configuration parameters and / or the second update information generated based on the storage information of the custom code block; Binding the identification information and configuration information of the same sub-function node; The execution order between the sub-function nodes is determined according to the connection relationship between the sub-function nodes, and the execution order is described by a specified programming language to obtain the target configuration file.

5. The method according to claim 4, characterized in that The storage information of the custom code block includes storage information of a software package generated based on the custom code block, or storage information of a source code file generated based on the custom code block.

6. The method according to claim 4, characterized in that The binding of the identification information and the configuration information of the same sub-function node includes: The identification information and configuration information of the same sub-function node are written into the same code block by using the specified programming language, so as to bind the identification information and configuration information of the sub-function node.

7. The method according to claim 1, characterized in that The step of replacing the original software package used by the to-be-updated service component with the target software package includes: Loading the implementation class in the target software package through a class loader, and specifying the sub-function node applied by the implementation class according to the target configuration file; Uninstall the implementation class corresponding to the original software package.

8. The method according to claim 7, characterized in that The specifying the sub-function node applied by the implementation class according to the target configuration file includes: In the target configuration file, obtaining identification information of the sub-function node corresponding to the second update information; A mapping relationship between the implementation class and the identification information is established through a dependency injection framework to specify the sub-function node applied by the implementation class.

9. An application updating device, characterized in that: The application includes one or more functions, and the business logic of each function is implemented by a corresponding service component; the device includes: A target configuration file acquisition module is configured to obtain a target configuration file of a service component to be updated generated by the service layer low-code development interface in response to a trigger operation on a service deployment control in the service layer low-code development interface; the service layer low-code development interface is used to visually edit a configuration file corresponding to the service component to be updated; A configuration replacement module is configured to, during the running process of the application, replace the original configuration file of the service component to be updated with the target configuration file when the target configuration file includes first update information; obtain the target software package or target source code file through the second update information when the target configuration file includes second update information, and replace the original software package used by the service component to be updated with the target software package; or import the target source code file into the corresponding code file used by the service component to be updated; so as to hot load the service component to be updated.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

11. An electronic device, characterized in that: include: processor; A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 8 by executing the executable instructions.