AIGC-based code-free application rapid generation and deployment method and system
By building directed graph structure data and obtaining intermediate nodes or adding new components, the problem of low component connection efficiency during the generation process of codeless application is solved, and the application generation efficiency and user experience are improved.
Patent Information
- Application Number
- CN202411955551.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-28
- Publication Date
- 2025-04-25
AI Technical Summary
In the process of codeless application generation based on AIGC technology, users are not proficient in operation or missing platform component library, which reduces application generation efficiency and user experience.
By building the platform component library and user applications to build directed graph structure data for initial results, determine the shortest path between target expected components, and obtain intermediate nodes or new components to achieve component connection.
It improves application generation efficiency, lowers the user's usage threshold, and improves the user experience, without the need for users to connect components one by one.
Smart Images

Figure CN119883244A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of codeless application construction, and in particular to a method and system for rapid generation and deployment of codeless applications based on AIGC. Background Art
[0002] When generating applications based on AIGC technology, in order to ensure the stability of the generated application effects, the platform generally builds code components and allows users to drag and drop functional components to achieve rapid generation of the expected application.
[0003] Due to different user needs, when dragging and dropping functional components to quickly generate applications, the application functions expected by users are also different. In order to meet the application building needs of different users, a platform component library can be built to allow users to select corresponding functional components as needed to build applications.
[0004] However, when users build applications through component libraries, the expected components may not be effectively connected due to missing functional components in the platform component library or the users' own lack of proficiency in operation, resulting in low application generation efficiency and reduced user experience. Summary of the invention
[0005] In order to improve the application generation efficiency and user experience, the present application provides a method and system for rapid generation and deployment of codeless applications based on AIGC.
[0006] In the first aspect, the present application provides a method for rapid generation and deployment of codeless applications based on AIGC, which adopts the following technical solutions:
[0007] A method for quickly generating and deploying codeless applications based on AIGC, comprising:
[0008] Obtain the platform component library of the AIGC codeless application development platform, and the initial application construction results generated by the user based on the platform component library;
[0009] Constructing first directed graph structure data for the platform component library based on the platform component library, and constructing second directed graph structure data for the user based on the initial result of the application construction;
[0010] Obtaining an expected component that the user expects to connect but has not been successfully connected, pre-connecting two target expected components to be connected, and determining two target nodes corresponding to the target expected components in the second directed graph structure data;
[0011] Based on the first directed graph structure data and the pre-connection, a construction result of the shortest path between the target nodes is obtained, and based on the construction result, an intermediate node between two target nodes or an intermediate component between two newly added target expected components is obtained;
[0012] The intermediate component corresponding to the intermediate node is obtained, the intermediate component is added between the target expected components, the final result of the user's application construction is obtained, and the application is installed and deployed based on the final result of the application construction.
[0013] Optionally, for any directed graph structure data, the method for constructing the directed graph structure data includes:
[0014] Get a single component of any component library as a graph structure node;
[0015] Obtaining connectable properties of any two components, and determining edge weights between corresponding graph structure nodes based on the connectable properties;
[0016] Constructing directed graph structure data based on the graph structure nodes and the edge weights;
[0017] The connectable attribute and the corresponding edge weight are configured as follows: if the output data of one component can be directly used as the input data of another component, the connectable attribute of the two components is directly connectable, and the edge weight between the corresponding graph structure nodes is 1; if the connectable attribute of the two components is not directly connectable, the edge weight between the corresponding graph structure nodes is 0;
[0018] When any of the directed graph structure data is the first directed graph structure data, any of the component libraries is a platform component library; and when any of the directed graph structure data is the second directed graph structure data, any of the component libraries is a user component library corresponding to the initial result of the application construction.
[0019] Optionally, the acquiring a construction result of the shortest path between the target nodes based on the first directed graph structure data and the pre-connection includes:
[0020] Determine a target node in the first directed graph structure data, and calculate the shortest path between two of the target nodes based on a preset shortest path construction method and the pre-connection;
[0021] If the shortest path exists, the construction result output is the shortest path;
[0022] If the shortest path does not exist, the build result output is the new requirement for the component.
[0023] Optionally, obtaining an intermediate component between two target expected components based on the construction result includes:
[0024] In response to the output of the construction result being a component new addition requirement, a newly added intermediate component between the two target expected components is obtained based on the component new addition requirement.
[0025] Optionally, obtaining an intermediate component between two target expected components based on the construction result includes:
[0026] If the construction result output is the shortest path, obtain the occurrence frequency of the target node when all users build applications and the path length of the shortest path;
[0027] Based on the occurrence frequency and the path length, calculating the necessary coefficient of the newly added components between the target expected components corresponding to the target node;
[0028] Based on the necessary coefficient of the new component and a preset necessary coefficient threshold, determining whether a new component is needed;
[0029] If no additional component is needed, determining an intermediate node between the two target nodes according to the shortest path;
[0030] If a new component is needed, a new component requirement is generated, and based on the new component requirement and the pre-connection, a new intermediate component between the two target expected components is obtained.
[0031] Optionally, the calculation method of the necessary coefficient of the newly added component is:
[0032] C m,n =D m,n *E m,n
[0033] D m,n It represents the frequency of occurrence of the mth and nth components. The method for obtaining it is to count the number of times D′ the mth and nth components are connected during development by each user. m,n , get the number of times the mth and nth components are connected D′ m,n The maximum number of connections between any two components D max The ratio is
[0034] E m,n It represents the ratio of the number of nodes between the mth and nth components. The method for obtaining it is to obtain the number of nodes E′ in the shortest path between the mth and nth components when there is a shortest path. m,n , the number of nodes in the shortest path E′ m,n The maximum number of nodes in the shortest path between any two components E ma The ratio is When there is no shortest path, the shortest path is infinite, then Em,n Is a constant value of 1.
[0035] Optionally, after obtaining the newly added intermediate component between the two target expected components, the method further includes:
[0036] Obtain the maximum value of the necessary coefficients of the historical newly added components between the two target expected components, and obtain the approximation of the code operation logic of the intermediate component and other components in the platform component library;
[0037] Calculate the redundancy coefficient between two of the user expected components based on the maximum value of the necessary coefficients of the historical newly added components and the approximation;
[0038] Based on the redundancy coefficient and a preset redundancy coefficient threshold, it is determined whether the intermediate component needs code simplification, and if so, the code of the intermediate component is simplified.
[0039] Optionally, obtaining the similarity of the code running logic of the intermediate component and other components in the platform component library includes:
[0040] Set a code splitting variable of the intermediate component, and obtain the code block after the intermediate component is split based on the code splitting variable;
[0041] Based on the code similarity algorithm, calculate the similarity of each code block with the code running logic of all other components in the platform component library, and obtain the maximum value of the similarity;
[0042] Accumulating the maximum values of the approximations to construct an objective function, performing Gaussian distribution fitting on the objective function based on a double Gaussian distribution function, and obtaining a bimodal coefficient value of the objective function;
[0043] Based on the optimization method, the maximum value of the bimodal coefficient is calculated and obtained as the approximation of the running logic of the intermediate component and other component codes in the platform component library.
[0044] Optionally, the code similarity algorithm is any one of abstract syntax tree (AST) analysis and edit distance algorithm; the optimization method is any one of genetic algorithm and particle swarm algorithm.
[0045] In the second aspect, the present application provides a codeless application rapid generation and deployment system based on AIGC, which adopts the following technical solutions:
[0046] A system for rapidly generating and deploying codeless applications based on AIGC includes: a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the method for rapidly generating and deploying codeless applications based on AIGC is implemented.
[0047] The beneficial effect is: the above-mentioned AIGC-based codeless application rapid generation and deployment method generates a computer program and stores it in a memory so that it can be loaded and executed by a processor, thereby making a system based on the memory and the processor for easy use.
[0048] This application has the following technical effects:
[0049] By constructing the user's application construction initial results and the platform component library as directed graph structure data respectively, the abstract components can be converted into concrete directed graph structure data, and the component connection problem of the target expected components can be converted into the problem of building the shortest path between two nodes in the directed graph structure data. The corresponding intermediate nodes can be quickly matched, and the components corresponding to the intermediate nodes can be added as intermediate components between the two expected components, thereby improving the application generation efficiency. There is no need for users to connect components one by one, which lowers the user's usage threshold and improves the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become easily understood. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-restrictive manner, and the same or corresponding numbers represent the same or corresponding parts.
[0051] Figure 1 It is a schematic diagram of the overall process of a method for rapid generation and deployment of codeless applications based on AIGC in an embodiment of the present application.
[0052] Figure 2 It is a flowchart of steps S201-S203 in a method for rapid generation and deployment of codeless applications based on AIGC in an embodiment of the present application.
[0053] Figure 3 It is a flowchart of steps S301-S305 in a method for rapid generation and deployment of codeless applications based on AIGC in an embodiment of the present application.
[0054] Figure 4 It is a flowchart of steps S401-S403 in a method for rapid generation and deployment of codeless applications based on AIGC in an embodiment of the present application.
[0055] Figure 5 It is a flowchart of steps S501-S504 in a method for rapid generation and deployment of codeless applications based on AIGC in an embodiment of the present application. DETAILED DESCRIPTION
[0056] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0057] It should be understood that when the terms "first", "second", etc. are used in the claims, specification and drawings of the present application, they are only used to distinguish different objects, rather than to describe a specific order. The terms "include" and "comprise" used in the specification and claims of the present application indicate the presence of the described features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or their collections.
[0058] The present application embodiment discloses a method for quickly generating and deploying codeless applications based on AIGC, referring to Figure 1 ,include:
[0059] S101. Obtain the platform component library of the AIGC codeless application development platform, and the initial result of the application construction generated by the user based on the platform component library.
[0060] The AIGC codeless application development platform itself has a platform component library for users to use the AIGC codeless application development platform for application development. Through the AIGC codeless application development platform, each user obtains the initial application construction result consisting of components selected from the platform component library, that is, the application initially constructed by the user. It can be seen that both the platform component library and the initial application construction result are composed of multiple components. The difference is that the components in the platform component library are stored individually or in combination, while the initial application construction result of the user is composed of component paths that can realize the corresponding required functions selected according to the user's needs. Due to the user's unskilled operation or the lack of the components required by the user in the platform component library, some components in the user's initial component construction result are not successfully connected, which causes defects.
[0061] S102: construct first directed graph structure data for the platform component library based on the platform component library, and construct second directed graph structure data for the user based on the initial application construction result.
[0062] In this embodiment, first directed graph structure data for the platform component library is constructed based on all components in the platform component library, and second directed graph structure data for the user is constructed based on the initial result of application construction. The connection relationship of the components can be visualized through the directed graph structure data, so that it is easy to determine the defects based on the initial result of application construction and make timely adjustments, such as adding missing components in the platform component library, thereby improving the accuracy of user application functions.
[0063] Specifically, in this embodiment, for the initial result of application construction, a second directed graph structure data is constructed, and the specific method is: a single component in the initial result of application construction is used as a graph structure node of the directed graph structure data, the connectable attribute between any two components is obtained, and the edge weight between the corresponding graph structure nodes is determined based on the connectable attribute. Among them, the connectable attribute and the corresponding edge weight can be configured as follows: if the output data of one of the components can be directly used as the input data of another component, then the connectable attribute between the two components is determined to be directly connectable, and the edge weight between the two graph structure nodes corresponding to the two components is set to 1; if the output data of one of the components cannot be used as the input data of another component, then the connectable attribute of the two components is not directly connectable, and the edge weight of the two graph structure nodes corresponding to the two components is 0. Through the above settings, in this embodiment, the input or output of each component corresponds to a line, and there can also be a many-to-one relationship between components, with the direction being that the output of one graph structure node points to the input of another graph structure node.
[0064] Further, the second directed graph structure data of the i-th user is set to A i , Similarly, the same method is used for the platform component library to construct the first directed graph structure data A′.
[0065] S103, obtaining the expected components that the user expected to connect but failed to connect successfully, pre-connecting the two target expected components to be connected, and determining two target nodes corresponding to the target expected components in the second directed graph structure data.
[0066] For the expected components that the user expected to connect but failed to connect successfully, in order to ensure the functional accuracy of the application generated by the user based on the codeless development platform, this embodiment will pre-connect the two target expected components to be connected. Specifically, you can choose to set a blank connection line to connect the two target expected components as one of the implementation methods of pre-connection, wherein, when the blank connection line is used, it is necessary to clarify the input data type and output data type in the two target expected components. The blank connection line is set to facilitate the construction of a component path between the two target expected components. In the second directed graph structure data, the two ends of the blank connection line connect the two target nodes. Correspondingly, in the first directed graph structure data, the two target nodes are also connected by a blank connection line.
[0067] Furthermore, in this embodiment, the input data types and output data types of all graph structure nodes in the first directed graph structure data have been recorded and marked. Therefore, when establishing a connection between two target nodes, it is necessary to refer to the input data type and output data type and select appropriate graph structure nodes to add between the two target nodes to form a node path that meets user needs.
[0068] S104. Based on the first directed graph structure data and the pre-connection, obtain the construction result of the shortest path between the target nodes, and based on the construction result, obtain the intermediate node between the two target nodes or the intermediate component between two newly added target expected components.
[0069] In this embodiment, the shortest path between two target nodes is constructed based on the blank connecting lines between the two target nodes in the first directed graph structure data, as well as the data input type and data output type of the target nodes. The shortest path is constructed to reduce the number of intermediate nodes between the target nodes, thereby reducing the number of components in the user-built application and improving the application running speed.
[0070] Specifically, refer to Figure 2 , based on the first directed graph structure data and the pre-connection, obtaining the construction result of the shortest path between target nodes, including:
[0071] S201, determining a target node in the first directed graph structure data, and calculating the shortest path between two target nodes based on a preset shortest path construction method and pre-connection;
[0072] S202, if the shortest path exists, the construction result is output as the shortest path;
[0073] S203. If the shortest path does not exist, the build result is output as a new requirement for the component.
[0074] In this embodiment, the shortest path construction method is used to calculate the path between two target nodes in the first directed graph structure data A′, wherein the shortest path construction method can adopt the Floyd-Warshall algorithm, the Dijkstra algorithm, the Bellman-Ford algorithm, etc., which can be adjusted by the implementer according to the specific implementation scenario.
[0075] Specifically, when the shortest path is constructed by the shortest path construction method, two results may occur. The first is that the shortest path exists, and the construction result of the shortest path can output the shortest path. The second is that the shortest path does not exist, which means that there is no intermediate node connecting the two target nodes in the current first directed graph structure data. At this time, the construction result of the shortest path is to output the new component requirements, indicating that a new component is needed as an intermediate node to connect the two target nodes, that is, to use the intermediate component to fill the blank connection line between the two target expected components to obtain a more functional application.
[0076] Among them, if the build result output is a new component requirement, that is, when the shortest path does not exist, obtaining the intermediate component between the two target expected components includes: using the input and output workflow of the two target expected components and the blank connecting line as the basis for generating a new intermediate component, wherein the generated new intermediate component is a normal single component, which can be developed and generated by relevant personnel with development experience, and the obtained new component is updated to the platform component library.
[0077] If the construction result is output as the shortest path, the path length of the shortest path may be too long. There are multiple intermediate nodes in the shortest path. If the intermediate components corresponding to these intermediate nodes are added to the two target expected components, the resulting application may have slow response speed and complex calculation process, resulting in poor application experience. Therefore, this embodiment needs to calculate the necessary coefficient of the newly added intermediate components between the target expected components, and determine whether a new component needs to be added based on the necessary coefficient of the newly added components.
[0078] If the shortest path is too long, it is also necessary to add new components between the target expected components that can realize the functions jointly implemented by multiple intermediate components to simplify the number of components and thus improve the application response speed.
[0079] Further, refer to Figure 3 , based on the construction results, get the intermediate nodes between the two target nodes, including:
[0080] S301. If the construction result output is the shortest path, obtain the occurrence frequency of the target node when all users build applications and the path length of the shortest path;
[0081] S302, based on the occurrence frequency and the path length, calculating the necessary coefficient of the newly added components between the target expected components corresponding to the target node;
[0082] S303, judging whether a new component is needed based on the new component necessary coefficient and a preset necessary coefficient threshold;
[0083] S304: If no new component is needed, determine the intermediate node between the two target nodes according to the shortest path;
[0084] S305: If a new component is needed, a new component requirement is generated, and a new intermediate component between two target expected components is obtained based on the new component requirement and the pre-connection.
[0085] Furthermore, in this embodiment, a method for calculating the necessary coefficient of the newly added components between the target expected components is provided as follows:
[0086] C m,n =D m,n *E m,n
[0087] D m,n It represents the frequency of occurrence of the mth and nth components. The method for obtaining it is to count the number of times D′ the mth and nth components are connected during development by each user. m,n (including blank connecting lines), get the number of times the mth and nth components are connected D′ m,n The maximum number of connections between any two components D max The ratio is
[0088] E m,n It represents the ratio of the number of nodes between the mth and nth components. The method for obtaining it is to obtain the number of nodes E′ in the shortest path between the mth and nth components when there is a shortest path. m,n , the number of nodes in the shortest path E′ m,n The maximum number of nodes in the shortest path between any two components E max The ratio is When there is no shortest path, the shortest path is infinite NaN, then E m,n Is a constant value of 1.
[0089] After calculating the necessary coefficient of the new component between two target expected components (i.e., target nodes) based on the above-mentioned calculation method of the necessary coefficient of the new component, it can be determined whether the new component is really needed by comparing it with the preset necessary coefficient threshold of the new component. For example, the necessary coefficient threshold of the new component is set to 0.7. When the necessary coefficient of the new component exceeds 0.7, it is determined that a new component is needed between the two target expected components; otherwise, it is determined that no new component is needed between the two target expected components.
[0090] Furthermore, if there is no need to simplify the shortest path, that is, when the construction result is output as the shortest path, and the calculated necessary coefficient of the new component between the target nodes does not exceed the necessary coefficient threshold of the new component, the corresponding intermediate node can be directly determined from the output shortest path.
[0091] If a new component is needed, the output component adds new requirements, and the input and output workflows of the two target expected components and the blank connection line are used as the basis for generating a new intermediate component. Generally speaking, the function of the new intermediate component added in this way is to merge part or all of the functions of all intermediate components, and finally generate a new intermediate component between the two target expected components.
[0092] Furthermore, although the newly generated intermediate components can meet user needs, they will also lead to component functional redundancy and excessive repetition rate in the platform component library. Therefore, this embodiment also provides that when there is a shortest path but a new component is also needed, a soft component can be generated. The soft component is a component that does not really exist. The code of the soft component is implemented by the remaining intermediate components in the shortest path according to the workload combination corresponding to the shortest path. This process can be implemented by relevant personnel with development experience, or it can be implemented through a trained mathematical model.
[0093] S105: Obtain the intermediate component corresponding to the intermediate node, add the intermediate component between the target expected components, obtain the final result of the user's application construction, and install and deploy the application based on the final result of the application construction.
[0094] After obtaining the shortest path to be constructed, the intermediate node is determined according to the shortest path, and the intermediate component corresponding to the intermediate node can be determined through the correspondence between the first directed graph structure data and the platform component library, and the intermediate component is added between the target expected components in sequence according to the input data type and the output data type, so that the effective connection between the two target expected components can be achieved. Based on this, combined with the initial result of the user's application construction, the final result of the user's application construction can be output.
[0095] Similarly, when there is no shortest path, or when there is a shortest path but the requirements of the new components are met, after obtaining the newly added intermediate components, the effective connection between the two target expected components is also achieved. Based on this, combined with the initial result of the user's application construction, the final result of the user's application construction can be output.
[0096] This embodiment constructs the user's application construction initial results and the platform component library as directed graph structure data respectively, which can convert abstract components into concrete directed graph structure data, and convert the component connection problem of the target expected component into the problem of building the shortest path between two nodes in the directed graph structure data. It can quickly match the corresponding intermediate nodes and add the components corresponding to the intermediate nodes as intermediate components between the two expected components, thereby improving the application generation efficiency and eliminating the need for users to connect components one by one, lowering the user's usage threshold and improving the user experience.
[0097] At this point, this embodiment has been able to complete the construction of the platform component library, and then generate the user's intended application according to the final result of the application construction, compile and add dependencies to the user-generated application, and then complete the packaging, install and deploy the packaged application, and realize the rapid generation and deployment of codeless applications. This embodiment has achieved the acquisition and addition of components in the application. However, the new components can be used to obtain a complete code application generation work, and realize the dynamic construction of the platform component library. However, due to the different needs of different users, the platform component library is constantly supplemented with new components, resulting in the gradual appearance of redundant components in the platform component library, that is, there are problems such as code duplication and poor availability in the new components, resulting in low generation efficiency when generating applications, and low running efficiency of the generated applications.
[0098] In this embodiment, the platform component library is also monitored for redundancy to ensure the generation efficiency and operation efficiency of codeless applications. Figure 4 , after obtaining the newly added intermediate component between the two target expected components, the method further includes:
[0099] S401, obtaining the maximum value of the necessary coefficient of the historical newly added components between the two target expected components, and obtaining the approximation of the code operation logic of the intermediate component and other components in the platform component library;
[0100] S402, calculating the redundancy coefficient between two user expected components based on the maximum and approximation of the necessary coefficients of the historical newly added components;
[0101] S403: Based on the redundancy coefficient and a preset redundancy coefficient threshold, determine whether the intermediate component needs code simplification; if necessary, perform code simplification on the intermediate component.
[0102] In this embodiment, by obtaining the maximum value of the necessary coefficient of the historical newly added components of the intermediate component, and the similarity of the code operation logic of the intermediate component and other components in the platform component library, the redundancy coefficient between the two target expected components can be calculated based on the two. In this embodiment, the larger the redundancy coefficient, the higher the code repetition rate of the intermediate component, that is, the code needs to be streamlined to reduce the same code in the platform component library. In this embodiment, a redundancy coefficient threshold is set. When the calculated redundancy coefficient exceeds the redundancy coefficient threshold, it means that the data operation code repetition rate between the two target expected components is high. At this time, the newly added intermediate components can be streamlined according to the two target expected components.
[0103] Specifically, the redundancy coefficient between the mth and nth components is:
[0104] F m,n =C m,n,max *G m,n
[0105] C m,n,max is the maximum value of the necessary coefficient of the new component between the mth and nth components. The larger the value, the stronger the necessity of the new component in the historical use of the two components. After the value exceeds the necessary coefficient threshold of the new component, a new component is generated, which will shorten the path length of the constructed shortest path. However, there may be a problem of code redundancy approximation when the new code is generated, which will lead to C m,n In this embodiment, the maximum value of the necessary coefficient of the newly added component between the mth and nth components is obtained as C m,n,max .
[0106] G m,n Indicates the similarity of the code running logic between the newly added component between the mth and nth components and all other components, where G m,n The larger the value, the higher the repetition rate, that is, the higher the code repetition rate in the component library, and thus the code needs to be split and merged between components to make the code of each component as concise as possible. In this embodiment, the newly added intermediate components are split into soft components (components when the shortest path exists) as much as possible to ensure the efficiency of application generation and operation.
[0107] Furthermore, optional code similarity algorithms include abstract syntax tree (AST) analysis, edit distance algorithm, and other algorithms, which can be adjusted by implementers according to specific implementation scenarios.
[0108] Further, refer to Figure 5 , obtain the similarity of the running logic of the intermediate component and other component codes in the platform component library, including:
[0109] S501, setting a code splitting variable of the intermediate component, and obtaining the code block after the intermediate component is split based on the code splitting variable;
[0110] S502: Calculate the similarity of each code block to the code running logic of all other components in the platform component library based on the code similarity algorithm, and obtain the maximum value of the similarity;
[0111] S503, accumulating the maximum values of the approximations to construct a target function, performing Gaussian distribution fitting on the target function based on a double Gaussian distribution function, and obtaining a bimodal coefficient value of the target function;
[0112] S504. Based on the optimization method, the maximum value of the bimodal coefficient is calculated and used as the approximation of the running logic of the intermediate component and other component codes in the platform component library.
[0113] In this embodiment, the code splitting variable of the newly added intermediate component between the mth and nth components is first set, the code blocks after the new intermediate component is split are obtained according to the code splitting variable, and the similarity between each split code block and the remaining components is calculated according to the code similarity algorithm.
[0114] When using the abstract syntax tree (AST) to analyze code similarity, the data whose values are not 0 to 1 are normalized using the maximum and minimum algorithm (or Z-score) to obtain the approximation h, and the maximum value H among all the approximations is obtained. Set the objective function K m,n , objective function K m,n It is the cumulative value of the maximum value H of the split code blocks, and the H value should present a bimodal distribution, and then the optimization algorithm is used to complete the code splitting of the new component.
[0115] In this embodiment, the calculation method of the bimodal distribution can utilize the double Gaussian distribution function to fit two Gaussian distributions, and calculate the absolute value of the two mean differences corresponding to the fitting results of the two Gaussian distributions, which is the bimodal coefficient value P of the H value. It can be seen that the larger the bimodal coefficient value, the more obvious the bimodal distribution is. The maximum value of the bimodal coefficient value is calculated, which is the approximation of the running logic of the intermediate component and other component codes in the platform component library.
[0116] Specifically, the calculation method for the similarity of the code operation logic of the newly added intermediate component and other components in the platform component library in this embodiment is:
[0117]
[0118] Among them, the number of code splitting variables is a hyperparameter. In this embodiment, it is set to a split point every three lines of code. The split point is a variable, and the variable value is 1 or 0. 1 means splitting, and 0 means not splitting. The split code block is the code between two variable values 1. The implementer can adjust the splitting interval according to the specific implementation scenario. Among them, Z represents the number of code blocks after splitting, and z represents the zth split code block. The value of the variable determines the value of Z. Here, the splitting can also be performed by relevant experienced personnel.
[0119] Among them, the selection of the number of remaining components is a hyperparameter. This embodiment selects all remaining components. During the specific implementation, the implementer can select a matching range of the code of the remaining components based on code labels or manual division operations to reduce the amount of code matching calculations.
[0120] H z It is the maximum value of the similarity between the z-th split code block and all other codes. The larger the value, the higher the code repetition rate.
[0121] Among them, the objective function K m,n The solution method can be solved by using an existing optimization method, such as a genetic algorithm, a particle swarm algorithm, etc., which is not limited in this embodiment.
[0122] At this point, we can get the objective function K m,n The solved K m,n The maximum value is G m,n , if F m,n If the redundancy coefficient threshold is greater than the set redundancy coefficient threshold, the developer will streamline the newly added intermediate components based on the splitting results of the split variables and the corresponding maximum matching components, so that the intermediate components are adjusted to a combination of soft components and new components. The redundancy coefficient threshold is also a hyperparameter, which is set to 0.8 in this embodiment and is adjusted by the implementer according to the specific implementation scenario in other embodiments.
[0123] Specifically, in the AIGC-based codeless application rapid generation and deployment method provided in this embodiment, the platform component library can be updated once a day, and the redundancy check of the platform component library can be updated once a month, which can be adjusted by the implementer according to the specific implementation scenario.
[0124] An embodiment of the present application also discloses a system for rapid generation and deployment of codeless applications based on AIGC, including a processor and a memory, wherein the memory stores computer program instructions. When the computer program instructions are executed by the processor, a method for rapid generation and deployment of codeless applications based on AIGC according to the present application is implemented.
[0125] The above system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface, and their configuration and functions are known in the art, so they will not be described in detail here.
[0126] In the present application, the aforementioned memory may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, apparatus or device. For example, a computer-readable storage medium may be any suitable magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high bandwidth memory HBM (High Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc., or any other medium that can be used to store the required information and can be accessed by an application, a module or both. Any such computer storage medium may be part of a device or accessible or connectable to a device.
[0127] Although this specification has shown and described a plurality of embodiments of the present application, it is obvious to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will think of many changes, modifications and alternatives without departing from the thought and spirit of the present application. It should be understood that in the process of practicing the present application, various alternatives to the embodiments of the present application described herein may be adopted.
[0128] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in the protection scope of the present application.
Claims
1. A method for rapid generation and deployment of codeless applications based on AIGC, characterized in that: include: Obtain the platform component library of the AIGC codeless application development platform, and the initial application construction results generated by the user based on the platform component library; Constructing first directed graph structure data for the platform component library based on the platform component library, and constructing second directed graph structure data for the user based on the initial result of the application construction; Obtaining an expected component that the user expects to connect but has not been successfully connected, pre-connecting two target expected components to be connected, and determining two target nodes corresponding to the target expected components in the second directed graph structure data; Based on the first directed graph structure data and the pre-connection, a construction result of the shortest path between the target nodes is obtained, and based on the construction result, an intermediate node between two target nodes or an intermediate component between two newly added target expected components is obtained; The intermediate component corresponding to the intermediate node is obtained, the intermediate component is added between the target expected components, the final result of the user's application construction is obtained, and the application is installed and deployed based on the final result of the application construction.
2. The method according to claim 1, characterized in that For any directed graph structure data, the method for constructing the directed graph structure data includes: Get a single component of any component library as a graph structure node; Obtaining connectable properties of any two components, and determining edge weights between corresponding graph structure nodes based on the connectable properties; Constructing directed graph structure data based on the graph structure nodes and the edge weights; The connectable attribute and the corresponding edge weight are configured as follows: if the output data of one component can be directly used as the input data of another component, the connectable attribute of the two components is directly connectable, and the edge weight between the corresponding graph structure nodes is 1; if the connectable attribute of the two components is not directly connectable, the edge weight between the corresponding graph structure nodes is 0; When any of the directed graph structure data is the first directed graph structure data, any of the component libraries is a platform component library; and when any of the directed graph structure data is the second directed graph structure data, any of the component libraries is a user component library corresponding to the initial result of the application construction.
3. The method according to claim 1, characterized in that The obtaining the construction result of the shortest path between the target nodes based on the first directed graph structure data and the pre-connection includes: Determine a target node in the first directed graph structure data, and calculate the shortest path between two of the target nodes based on a preset shortest path construction method and the pre-connection; If the shortest path exists, the construction result output is the shortest path; If the shortest path does not exist, the build result output is the new requirement for the component.
4. The method according to claim 3, characterized in that Based on the construction result, an intermediate component is added between two target expected components, including: In response to the output of the construction result being a component new addition requirement, a newly added intermediate component between the two target expected components is obtained based on the component new addition requirement.
5. The method according to claim 3, characterized in that: Based on the construction result, an intermediate component is added between two target expected components, including: If the construction result output is the shortest path, obtain the occurrence frequency of the target node when all users build applications and the path length of the shortest path; Based on the occurrence frequency and the path length, calculating the necessary coefficient of the newly added components between the target expected components corresponding to the target node; Based on the necessary coefficient of the new component and a preset necessary coefficient threshold, determining whether a new component is needed; If no additional component is needed, determining an intermediate node between the two target nodes according to the shortest path; If a new component is needed, a new component requirement is generated, and based on the new component requirement and the pre-connection, a new intermediate component between the two target expected components is obtained.
6. The method according to claim 5, characterized in that The calculation method of the necessary coefficient of the new component is: C m,n =D m,n *E m,n D m,n It represents the frequency of occurrence of the mth and nth components. The method for obtaining it is to count the number of times D′ the mth and nth components are connected during development by each user. m,n , get the number of times the mth and nth components are connected D′ m,n The maximum number of connections between any two components D max The ratio is E m,n It represents the ratio of the number of nodes between the mth and nth components. The method for obtaining it is to obtain the number of nodes E′ in the shortest path between the mth and nth components when there is a shortest path. m,n , the number of nodes in the shortest path E′ m,n The maximum number of nodes in the shortest path between any two components E max The ratio is When there is no shortest path, the shortest path is infinite, then E m,n Is a constant value of 1.
7. The method according to claim 4 or 5, characterized in that: After obtaining the newly added intermediate component between the two target expected components, the method further includes: Obtain the maximum value of the necessary coefficients of the historical newly added components between the two target expected components, and obtain the approximation of the code operation logic of the intermediate component and other components in the platform component library; Calculate the redundancy coefficient between two of the user expected components based on the maximum value of the necessary coefficients of the historical newly added components and the approximation; Based on the redundancy coefficient and a preset redundancy coefficient threshold, it is determined whether the intermediate component needs code simplification, and if so, the code of the intermediate component is simplified.
8. The method according to claim 7, characterized in that The obtaining of the similarity of the code operation logic of the intermediate component and other components in the platform component library includes: Set a code splitting variable of the intermediate component, and obtain the code block after the intermediate component is split based on the code splitting variable; Based on the code similarity algorithm, calculate the similarity of each code block with the code running logic of all other components in the platform component library, and obtain the maximum value of the similarity; Accumulating the maximum values of the approximations to construct an objective function, performing Gaussian distribution fitting on the objective function based on a double Gaussian distribution function, and obtaining a bimodal coefficient value of the objective function; Based on the optimization method, the maximum value of the bimodal coefficient is calculated and obtained as the approximation of the running logic of the intermediate component and other component codes in the platform component library.
9. The method according to claim 8, characterized in that The code similarity algorithm is any one of an abstract syntax tree (AST) analysis and an edit distance algorithm; the optimization method is any one of a genetic algorithm and a particle swarm algorithm.
10. A codeless application rapid generation and deployment system based on AIGC, characterized in that: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the method for rapid generation and deployment of codeless applications based on AIGC according to any one of claims 1 to 9 is implemented.