Application software generation method and system, electronic equipment and storage medium

By applying componentization concepts and chain calls in the traditional MVC mode, determining and setting the call order of target components and generating application software, the problems of bloated and high coupling in the traditional service layer are solved, and the solution of business function code is realized Coupling and easy-to-maintenance effects.

CN119512555APending Publication Date: 2025-02-25SUNSHINE PROPERTY & CASUALTY INSURANCE CO
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411342639.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

In the traditional MVC mode, the service layer is prone to become bloated, with too many deep dependencies, high coupling between functions, and lack of effective encapsulation, which leads to difficulty in maintaining business code.

Method used

By determining the target framework and the target application object, selecting multiple target components, and setting their call order, the application software corresponding to the target framework is generated. This method is based on the concept of componentization and chain calling, and realizes decoupling of business function code and cohesive encapsulation at the functional level.

Benefits of technology

It realizes decoupling of business function code, reduces the coupling between functional code blocks, reduces the depth of dependency calls, and makes business code easier to maintain and expand.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119512555A_ABST
    Figure CN119512555A_ABST
Patent Text Reader

Abstract

The invention discloses an application software generation method and system, electronic equipment and a storage medium, and relates to the technical field of software generation, the method comprises the following steps: determining a plurality of target components according to a target framework and a target application object, and setting a calling sequence of all the target components; and generating application software corresponding to the target framework according to all the target components and the calling sequence of all the target components. According to the method, a software development framework is designed, researched and developed on the basis of a modularization idea and in combination with a chain calling idea, so that decoupling of service function codes is realized, cohesion packaging of a function level is enhanced, coupling among function code blocks is reduced, and the depth of dependent calling is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] In the MVC (Model-View-Controller) mode of traditional software development, the controller, service, and dao design patterns that are popular in the industry are prone to very bloated service layers and too many deep layers (for dependent calls) when dealing with complex business logic. The functions are coupled and dependent on each other, but lack effective encapsulation, resulting in problems such as "high coupling, bloated code duplication, and chaotic structure" in the business code, which creates huge obstacles to the maintenance of subsequent business codes. Summary of the invention

[0003] The technical problem to be solved by the present invention is to address the deficiencies of the prior art and specifically provide a method, system, electronic device and storage medium for generating application software, as follows:

[0004] 1) In the first aspect, the present invention provides a method for generating application software, and the specific technical solution is as follows:

[0005] According to the target framework and target application object, multiple target components are determined, and the calling order of all target components is set;

[0006] Generate application software corresponding to the target framework based on all target components and the calling order of all target components.

[0007] The beneficial effects of the method for generating application software provided by the present invention are as follows:

[0008] Based on the concept of componentization and combined with the idea of ​​chain calling, the present invention designs and develops a software development framework to realize the decoupling of business function codes, strengthen the cohesive encapsulation at the functional level, reduce the coupling between functional code blocks, and reduce the depth of dependent calls.

[0009] On the basis of the above scheme, the method for generating application software of the present invention can also be improved as follows.

[0010] Further, it also includes: pre-packaging a plurality of components corresponding to different applications;

[0011] Based on the target framework and target application object, multiple target components are determined, including:

[0012] According to the target framework and target application object, multiple target components are selected from all pre-packaged components.

[0013] Further, according to the target framework and the target application object, multiple target components are selected from all pre-packaged components, including:

[0014] According to the functions involved in the target framework and the target application objects, multiple target components are selected from all pre-packaged components.

[0015] Furthermore, the target framework is a functional framework of the business system.

[0016] 2) In the second aspect, the present invention also provides a system for generating application software, and the specific technical solution is as follows:

[0017] It includes a determination module and a generation module;

[0018] The determination module is used to: determine multiple target components according to the target framework and the target application object, and set the calling order of all target components;

[0019] The generation module is used to generate application software corresponding to the target framework according to all target components and the calling sequence of all target components.

[0020] Based on the above solution, the generation system of application software of the present invention can also be improved as follows.

[0021] Furthermore, it also includes a pre-packaging module, the pre-packaging module is used to: pre-packaging multiple components corresponding to different applications;

[0022] The determination module is specifically used to select multiple target components from all pre-packaged components according to the target framework and the target application object.

[0023] Furthermore, the determination module is also specifically used to: select multiple target components from all pre-packaged components according to the functions involved in the target framework and the target application objects.

[0024] Furthermore, the target framework is a functional framework of the business system.

[0025] 3) In a third aspect, the present invention further provides an electronic device, comprising a processor, the processor being coupled to a memory, the memory storing at least one computer program, the at least one computer program being loaded and executed by the processor so that the electronic device implements any one of the above-mentioned methods for generating application software.

[0026] 4) In a fourth aspect, the present invention further provides a computer-readable storage medium, in which at least one computer program is stored, and the at least one computer program is loaded and executed by a processor so that the computer implements any of the above-mentioned methods for generating application software.

[0027] It should be noted that the beneficial effects achieved by the technical solutions of the second to fourth aspects of the present invention and the corresponding possible implementation methods can be found in the above-mentioned technical effects of the first aspect and its corresponding possible implementation methods, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0029] Figure 1 A schematic diagram of a flow chart of a method for generating application software according to an embodiment of the present invention;

[0030] Figure 2 A schematic diagram of the structure of a system for generating application software according to an embodiment of the present invention;

[0031] Figure 3 The figure is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0032] In order to make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.

[0033] like Figure 1 As shown, a method for generating application software according to an embodiment of the present invention comprises the following steps:

[0034] S1. Determine multiple target components according to the target framework and target application object, and set the calling order of all target components;

[0035] S2. Generate application software corresponding to the target framework according to all target components and the calling order of all target components.

[0036] Optionally, in the above technical solution, it also includes:

[0037] S01, pre-packaging multiple components corresponding to different applications;

[0038] In S1, multiple target components are determined according to the target framework and target application object, including:

[0039] According to the target framework and target application object, multiple target components are selected from all pre-packaged components.

[0040] Optionally, in the above technical solution, according to the target framework and the target application object, multiple target components are selected from all pre-packaged components, including:

[0041] According to the functions involved in the target framework and the target application objects, multiple target components are selected from all pre-packaged components.

[0042] Optionally, in the above technical solution, the target framework is a functional framework of the business system.

[0043] Among them, multiple application objects are determined in advance, and the business targeted by the target framework can be abstracted into an application object. The application object contains all the element fields required by the business. For example, the business of producing a certain product can be abstracted into an order. The order contains all the user's requirements and parameter information, and the factory completes the production according to this order. In this example, the application object is the "order object". Different businesses correspond to different application objects, which can be set according to actual conditions.

[0044] Among them, a component is a code block that implements a certain function. For example, the components corresponding to the business system include: code blocks used to implement business logic. A component is like a process on a factory assembly line. Each application object corresponds to a group of components. Components corresponding to different application objects cannot be mixed, just like each assembly line can only produce one product.

[0045] Among them, multiple components can be obtained by searching the entire network. For each component, the name of the component, the applicable application object and the applicable system (for example, business system and financial system, etc.) will be defined. When generating the application software corresponding to the target framework, all components are scanned and registered in the component manager to facilitate the determination and calling of multiple target components.

[0046] In S2, the application software corresponding to the target framework is generated according to all target components and the calling order of all target components. The specific implementation method is as follows:

[0047] A framework often involves multiple functions, each function corresponds to a component, and each component has a driver. When calling a component, the corresponding component is automatically determined based on the functions involved in the framework and the application object corresponding to the framework, and the calling procedures of these components are set. By calling the corresponding driver, the corresponding application software is generated, which can realize all the functions involved in the corresponding framework.

[0048] Among them, a driver is used to define the calling order of components. The driver will be automatically scanned when loaded, and all target components are called by calling the driver to generate application software corresponding to the target framework.

[0049] Among them, the framework specified by the user and the framework designed by the user can both be considered as target frameworks, the application objects executed by the user or the application objects designed by the user can both be considered as target application objects, and the components corresponding to the target framework and the target application objects are target components. For example, the target framework is the functional framework of the business system. Specifically, when the target framework is the framework of the insurance underwriting business system, the application object corresponding to the target framework is the insurance policy, then the target components include verification components, billing components, storage components and payment components, etc.

[0050] The generated application software may specifically include the following two categories:

[0051] 1) Generate application software for online use. Specifically, after determining all target components and the calling order of all target components, when using the application software, the driver of the target component is chain-called to execute the corresponding component and realize the corresponding function.

[0052] 2) Generate independent application software. Specifically, after determining all target components, extract all target software and combine all target software according to the calling order of all target components. When using the application software, the driver of the target component is chain-called to execute the corresponding component and realize the corresponding function. Independent application software means that the application software can be installed on other computers.

[0053] In another embodiment, the overall idea of ​​the technical solution of the present invention adopts the principle of "one object, multiple components, chain assembly, function drive, and flow and batch integration", and designs and develops a development framework based on the concept of componentization and the idea of ​​chain call to achieve decoupling of business function codes, strengthen cohesive encapsulation at the functional level, reduce coupling between functional code blocks, and reduce the depth of dependent calls, specifically:

[0054] 1) One object: "One object" means abstracting business demands into standard objects (business objects). This business object contains all the element fields required by this type of business. For example, the business of producing a certain product can be abstracted into an order. The order contains all the user's requirements and parameter information, and the factory completes production according to this order. The business object in this example is the "order object". If it is other businesses, it corresponds to other business objects, which can be set according to actual conditions.

[0055] 2) Multiple components: A component is a code block of actual business logic, just like each process on a factory assembly line. Each business object corresponds to a set of components, and components corresponding to different business objects cannot be mixed, just like each assembly line can only produce one product.

[0056] 3) Component registration: When defining a component, the component name, applicable business object, and corresponding system are defined. When the project is started, all components in the project are scanned and registered in the component manager.

[0057] 4) Component assembly: The assembly of components is defined by drivers. According to different business functions, multiple drivers are defined. The driver defines the components used by this business and the order in which the components are called. For example, the insurance business defines verification components, billing components, storage components, and payment components.

[0058] 5) Function driver: The same business object may have multiple functions, and each function corresponds to a driver. When calling a function, the corresponding driver will be automatically found according to the function, and chain calls will be implemented according to the components corresponding to the driver.

[0059] 6) Stream and batch integration: The above business objects and components all belong to streaming processing, that is, only one business is driven at a time, for example, one call can only process the insurance of an insurance policy. In addition, there are batch objects, which contain multiple businesses with the same function, that is, one call processes multiple identical businesses. In addition to streaming components, there are also batch components, which are special and are specifically used to implement some aggregation operations. For example, when a batch of insurance businesses is processed, a message needs to be pushed uniformly, or the total insured amount of the insurance policies of this batch of insurance businesses needs to be checked to be no more than 100,000.

[0060] 7) Automatic sorting: In batch processing, when faced with many businesses with different functions, the framework will automatically sort them into batch business objects with the same functions according to their functions, and call the corresponding drivers to implement the functions.

[0061] The beneficial effects of the present invention are as follows:

[0062] 1) By splitting business functions into multiple functional components, each functional component is independent of each other and the degree of coupling is reduced, which can simplify the bloated service layer and provide a framework support for the code reconstruction of complex logic.

[0063] 2) Through component encapsulation, each functional module is relatively independent and the code is easier to maintain.

[0064] 3) Abstract different types of business into synchronized business objects to isolate and split different businesses and reduce the coupling between modules.

[0065] 4) The driver is used to define functions. The driver is not reused, but the components can be reused. This mode clarifies the standards between code reuse and code coupling, realizes the decoupling of functions, and the implementation of functions is reusable.

[0066] 5) Provides an underlying framework for service reconstruction of complex business logic.

[0067] In the above embodiments, although the steps are numbered S1, S2, etc., these are only specific embodiments given by the present invention. Those skilled in the art may adjust the execution order of S1, S2, etc. according to actual conditions, which is also within the protection scope of the present invention. It can be understood that in some embodiments, some or all of the above embodiments may be included.

[0068] like Figure 2As shown, a system 200 for generating application software according to an embodiment of the present invention includes a determination module 201 and a generation module 202;

[0069] The determination module 201 is used to: determine multiple target components according to the target framework and the target application object, and set the calling order of all target components;

[0070] The generation module 202 is used to generate application software corresponding to the target framework according to all target components and the calling sequence of all target components.

[0071] Optionally, in the above technical solution, a pre-packaging module is further included, and the pre-packaging module is used to: pre-packaging multiple components corresponding to different applications;

[0072] The determination module 201 is specifically used to select a plurality of target components from all pre-packaged components according to the target framework and the target application object.

[0073] Optionally, in the above technical solution, the determination module 201 is further specifically used for: selecting a plurality of target components from all pre-packaged components according to the functions involved in the target framework and the target application objects.

[0074] Optionally, in the above technical solution, the target framework is a functional framework of the business system.

[0075] It should be noted that the beneficial effects of the application software generation system 200 provided in the above embodiment are the same as the beneficial effects of the application software generation method described above, which will not be described in detail here. In addition, when the system provided in the above embodiment realizes its functions, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the system can be divided into different functional modules according to actual conditions to complete all or part of the functions described above. In addition, the system and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be described in detail here.

[0076] like Figure 3 As shown, an electronic device 300 according to an embodiment of the present invention includes a processor 320, the processor 320 is coupled to a memory 310, and the memory 310 stores at least one computer program 330, and the at least one computer program 330 is loaded and executed by the processor 320, so that the electronic device 300 implements any of the above-mentioned methods for generating application software, specifically:

[0077] The electronic device 300 may have relatively large differences due to different configurations or performances, and may include one or more processors 320 (Central Processing Units, CPU) and one or more memories 310, wherein the one or more memories 310 store at least one computer program 330, and the at least one computer program 330 is loaded and executed by the one or more processors 320, so that the electronic device 300 implements any application software generation method provided in the above embodiments. Of course, the electronic device 300 may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output. The electronic device 300 may also include other components for realizing device functions, which will not be described in detail here. The electronic device may specifically be a computer, etc.

[0078] A computer-readable storage medium according to an embodiment of the present invention stores at least one computer program, and the at least one computer program is loaded and executed by a processor so that a computer implements any of the above-mentioned methods for generating application software.

[0079] Optionally, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, and the like.

[0080] In an exemplary embodiment, a computer program product or a computer program is also provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes any of the above-mentioned methods for generating application software.

[0081] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects and represent the definition of a specific order or sequence. The order of use of similar objects can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than the order shown or described.

[0082] Those skilled in the art know that the present invention can be implemented as a system, method or computer program product. Therefore, the present invention can be specifically implemented in the following forms, namely: it can be complete hardware, it can be complete software (including firmware, resident software, microcode, etc.), or it can be a combination of hardware and software, which is generally referred to as "circuit", "module" or "system" herein. In addition, in some embodiments, the present invention can also be implemented in the form of a computer program product in one or more computer-readable media, and the computer-readable medium contains computer-readable program code.

[0083] Any combination of one or more computer-readable media can be used. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0084] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A method for generating application software, characterized in that: include: According to the target framework and target application object, multiple target components are determined, and the calling order of all target components is set; According to all target components and the calling sequence of all target components, application software corresponding to the target framework is generated.

2. The method for generating application software according to claim 1, characterized in that: Also includes: Pre-package multiple components corresponding to different applications; Based on the target framework and target application object, multiple target components are determined, including: According to the target framework and target application object, multiple target components are selected from all pre-packaged components.

3. The method for generating application software according to claim 2, characterized in that: According to the target framework and target application object, select multiple target components from all pre-packaged components, including: According to the functions involved in the target framework and the target application objects, multiple target components are selected from all pre-packaged components.

4. A method for generating application software according to any one of claims 1 to 3, characterized in that: The target framework is a functional framework of the business system.

5. A system for generating application software, characterized in that: It includes a determination module and a generation module; The determination module is used to: determine multiple target components according to the target framework and the target application object, and set the calling order of all target components; The generation module is used to generate application software corresponding to the target framework according to all target components and the calling sequence of all target components.

6. The system for generating application software according to claim 5, characterized in that: Also included is a pre-packaging module, the pre-packaging module is used to: pre-packaging multiple components corresponding to different applications; The determination module is specifically used to select a plurality of target components from all pre-packaged components according to the target framework and the target application object.

7. The system for generating application software according to claim 6, characterized in that: The determination module is also specifically used to select multiple target components from all pre-packaged components according to the functions involved in the target framework and the target application objects.

8. A system for generating application software according to any one of claims 5 to 7, characterized in that: The target framework is a functional framework of the business system.

9. An electronic device, characterized in that: The electronic device includes a processor, the processor is coupled to a memory, the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor so that the electronic device implements a method for generating application software as described in any one of claims 1 to 4.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one computer program, and the at least one computer program is loaded and executed by a processor so that a computer implements a method for generating application software as claimed in any one of claims 1 to 4.