Model-based application building method and device, equipment, medium and program product

Through the model-based application construction method, interactive information is used to determine requirements and match services to generate code, which solves the problems of insufficient code generation quality and service integration in existing technologies, realizes efficient and secure code generation and integration, and reduces development difficulty and cost.

CN120848870APending Publication Date: 2025-10-28BEIJING ZITIAO NETWORK TECH CO LTD

Patent Information

Application Number
CN202510948402.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-09
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

Existing automated code generation methods have shortcomings in the quality and accuracy of the generated code, making it difficult to meet complex development needs and unable to effectively integrate platform services, resulting in the code being out of touch with actual needs and posing security risks.

Method used

A model-based application building method determines demand description information through interactive information, matches candidate services and generates code, including code segments for calling services, and uses machine learning models to automatically integrate multiple services, reducing development difficulty and time costs.

Benefits of technology

It improves the efficiency and practicality of code generation, ensures code integrity and security, automatically integrates platform services, and allows deployment without manual modification, reducing technical barriers and time costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120848870A_ABST
    Figure CN120848870A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a model-based application building method and device, equipment, a storage medium and a program product. The method comprises the steps that demand description information for an application is determined based on interaction information related to generation of the application, and the demand description information indicates requirements for the application; determining at least one service matched with the demand description information from a plurality of created candidate services based on the demand description information; and generating a code for implementing the application at least based on the demand description information and the service encapsulation information corresponding to the at least one service, the code comprising a code segment for calling the at least one service. According to the application building of the embodiment of the invention, a machine learning model can be utilized. For example, determination of demand description information, determination of matching services, and code generation may utilize a large model. Therefore, the code generation efficiency in application building can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The exemplary embodiments disclosed herein generally relate to the field of computers, and particularly to model-based application building methods, apparatuses, electronic devices, computer-readable storage media, and computer program products. Background Technology

[0002] With the rapid development of internet technology and the continuous evolution of software development techniques, automated code generation has become an important means of improving development efficiency. However, as development needs become increasingly complex, existing automated code generation methods still have certain shortcomings in terms of the quality and accuracy of the generated code. How to ensure that the generated code accurately meets actual needs and further improve the efficiency of code generation has become an urgent problem to be solved. Summary of the Invention

[0003] In a first aspect of this disclosure, a model-based application building method is provided. The method includes: determining requirement description information for the application based on interaction information related to application generation, the requirement description information indicating the requirements for the application; determining at least one service matching the requirement description information from a plurality of created candidate services based on the requirement description information; and generating code for implementing the application based at least on the requirement description information and service encapsulation information corresponding to the at least one service, the code including code segments for calling the at least one service.

[0004] In a second aspect of this disclosure, a model-based application building apparatus is provided. The apparatus includes: an information determination module configured to determine requirement description information for the application based on interaction information related to application generation, the requirement description information indicating requirements for the application; a service determination module configured to determine at least one service matching the requirement description information from a plurality of created candidate services based on the requirement description information; and a code generation module configured to generate code for implementing the application based at least on the requirement description information and service encapsulation information corresponding to the at least one service, the code including code segments for calling the at least one service.

[0005] In a third aspect of this disclosure, an electronic device is provided. The device includes at least one processor; and at least one memory coupled to the at least one processor and storing instructions for execution by the at least one processor. When executed by the at least one processor, the instructions cause the electronic device to perform the method of the first aspect.

[0006] In a fourth aspect of this disclosure, a computer-readable storage medium is provided. The computer-readable storage medium stores computer-executable instructions that, when executed by a processor, implement the method of the first aspect.

[0007] In a fifth aspect of this disclosure, a computer program product is provided. The computer program product includes computer-executable instructions, wherein when executed by a processor, the computer-executable instructions implement the method according to a first aspect of this disclosure.

[0008] It should be understood that the content described in this content section is not intended to limit the key or essential features of the embodiments of this disclosure, nor is it intended to restrict the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0009] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein:

[0010] Figure 1 A schematic diagram of an example environment in which embodiments of the present disclosure can be implemented is shown;

[0011] Figure 2 Example diagrams of model-based application building architectures according to some embodiments of this disclosure are shown;

[0012] Figure 3 A flowchart illustrating a model-based application building method according to some embodiments of the present disclosure is shown;

[0013] Figure 4 An exemplary structural block diagram of a model-based application building apparatus according to some embodiments of the present disclosure is shown; and

[0014] Figure 5 A block diagram of an electronic device in which one or more embodiments of the present disclosure may be implemented is shown. Detailed Implementation

[0015] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0016] In the description of embodiments of this disclosure, the term "comprising" and similar terms should be understood as open-ended inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". The terms "first", "second", etc., may refer to different or the same objects. Other explicit and implicit definitions may also be included below.

[0017] In this document, unless explicitly stated otherwise, performing a step in response to A does not mean that the step is performed immediately after A, but may include one or more intermediate steps.

[0018] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.

[0019] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure through appropriate means in accordance with relevant laws and regulations, and user authorization should be obtained.

[0020] For example, in response to receiving a user's active request, a prompt message is sent to the user to clearly inform the user that the requested operation will require the acquisition and use of the user's personal information, thereby enabling the user to choose whether to provide personal information to the software or hardware such as electronic devices, applications, servers or storage media that perform the operation of the technical solution disclosed herein, based on the prompt message.

[0021] As an optional but non-restrictive implementation, in response to a user's active request, a prompt message can be sent to the user, such as a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0022] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0023] As used in this paper, the term "model" refers to a model that learns the relationship between inputs and outputs from training data, enabling it to generate corresponding outputs for a given input after training. Model generation can be based on machine learning techniques. Deep learning is a machine learning algorithm that processes inputs and provides corresponding outputs using multiple layers of processing units. A neural network model is an example of a deep learning-based model. In this paper, "model" may also be referred to as a "machine learning model," "learning model," "machine learning network," or "learning network," and these terms are used interchangeably.

[0024] As briefly mentioned earlier, with the continuous advancements in machine learning, natural language processing, and code generation technologies, the feasibility and application scenarios of automated code generation have garnered widespread attention. Currently, many front-end code generation tools based on machine learning technologies have emerged. These tools can automatically generate front-end page code from natural language descriptions or design drafts, greatly improving development efficiency. However, these code generation tools still have significant limitations in practical applications.

[0025] Existing front-end code generation tools primarily focus on generating static user interface code, making it difficult to generate applications containing complete business logic. The generated code typically requires significant follow-up development work from developers to integrate backend services and data sources. Most existing front-end code generation tools exist as standalone tools, unable to recognize and utilize existing platform capabilities. For example, they cannot automatically identify and invoke platform-provided data services, function services, workflow services, etc., resulting in generated code that is disconnected from reality. Most existing front-end code generation tools typically lack permission awareness capabilities, failing to generate appropriate access control code based on user roles, data permissions, and other factors, posing data security risks. The code generated by most existing front-end code generation tools is often "one-off," difficult to integrate with workflows, toolchains, etc., and unable to form a complete development loop from requirements to deployment.

[0026] In view of this, according to embodiments of this disclosure, a model-based application building scheme is proposed. According to the scheme of this disclosure, based on interaction information related to application generation, requirement description information for the application is determined, the requirement description information indicating the requirements for the application. Based on the requirement description information, at least one service matching the requirement description information is determined from a plurality of created candidate services. Based at least on the requirement description information and service encapsulation information corresponding to the at least one service, code for implementing the application is generated. The generated code includes at least a code segment for calling the at least one service.

[0027] According to embodiments of this disclosure, user requirements can be broken down, matching user requirements to services, and code matching the user requirements can be generated based on the service encapsulation information corresponding to the services. In this way, existing services can be integrated into application code development. This reduces the difficulty of code generation during application setup, improves code generation efficiency, and ensures the practicality and completeness of the generated code. The generated code can automatically integrate multiple services and can be directly deployed and run without manual modification, significantly reducing the technical threshold and time cost of application development.

[0028] Figure 1 A schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented is shown. Environment 100 relates to an application management platform 110, which can support the creation and / or execution of applications. In some embodiments, the portion of the application management platform 110 used to support application creation may also be referred to as an application creation portion 111. In some embodiments, the portion of the application management platform 110 used to support application execution may also be referred to as an application execution portion 112.

[0029] like Figure 1 As shown, the application creation section 111 provides an environment for user 105 to create and publish applications. User 105 may be referred to as the application creation user or creator. In some embodiments, the application creation section 111 may be a low-code platform that provides a collection of tools for application creation. The application creation section 111 can support visual development of various types of applications, allowing developers to skip the manual coding process and accelerate the application development cycle and reduce costs. The application creation section 111 can support any suitable platform for users to develop one or more types of applications, such as an application platform as a service (aPaaS) based platform. Such a platform enables users to efficiently develop applications, enabling operations such as application creation and application function adjustment.

[0030] The application creation component 111 can be deployed locally on the user 105's terminal device and / or supported by a server. For example, the user 105's terminal device can run a client with the application creation component 111, which can support interaction between the user and the application creation component 111 provided by the server. When the application creation component 111 runs locally on the user's terminal device, the user 105 can directly interact with the local application creation component 111 using the terminal device. When the application creation component 111 runs on a server, the server can provide services to the client running on the terminal device based on the communication connection with the terminal device. The application creation component 111 can present a corresponding interface 130 to the user 105 based on the user 105's operations, to output and / or receive application creation-related information from the user 105.

[0031] In some embodiments, the application creation section 111 may be associated with a corresponding database, which stores the data or information required for the application creation process supported by the application creation section 111. For example, the database may store the code and description information corresponding to the various functional modules that make up the application. The application creation section 111 may also perform operations such as calling, adding, deleting, and updating the functional modules in the database. The database may also store operations that can be performed on different functional blocks. For example, in a scenario where an application needs to be created, the application creation section 111 can call the corresponding functional blocks from the database to build the application.

[0032] In embodiments of this disclosure, user 105 can create application 120 (also referred to as application to be created) as needed on application creation section 111 and publish application 120. Application 120 can be published to any appropriate application runtime section 112, as long as application runtime section 112 can support the operation of application 120.

[0033] After release, application 120' becomes available. Application 120' can be operated by one or more end users 145. End users 145 can operate application 120' through associated terminal devices 146 and thus interact with application management platform 110. End users 145 can be referred to as end users of application 120'. In some embodiments, application 120' may include or be implemented as a digital assistant.

[0034] Digital assistants can be configured to have intelligent conversational capabilities. They can be integrated into application 120' as part of application 120' to assist in task processing within application 120'. In other examples, digital assistants can be configured to run as standalone applications, such as web applications or other types of applications. In such examples, the digital assistant and application 120' can be considered as the same application. Digital assistants are provided to assist users with various task processing needs in different applications and scenarios. During interaction with the digital assistant, the user inputs interactive messages, and the digital assistant responds to the user's input by providing reply messages. Typically, digital assistants support users inputting questions in natural language and perform tasks and provide responses based on their understanding of natural language input and logical reasoning capabilities.

[0035] In some embodiments, the digital assistant can interact with end user 145 as a contact. For example, the digital assistant can be implemented in an instant messaging (IM) application. The digital assistant can interact with end user 145 in a one-on-one chat session. In some embodiments, the digital assistant can interact with multiple users in a group chat session that includes multiple users.

[0036] For each end user 145, the client of the application runtime portion 112 can present an interaction window 142 of the application 120' or a digital assistant in the client interface, such as a conversation window with the digital assistant. The end user 145 can enter conversation messages in the conversation window, and the application 120' can determine the digital assistant's response message based on the created configuration information and present it to the user in the interaction window 142. In some embodiments, depending on the configuration of the application 120', the interaction messages with the application 120' can include multimodal messages, such as text messages (e.g., natural language text), voice messages, image messages, video messages, and so on.

[0037] Similar to the application creation component 111, the application execution component 112 can be deployed locally on each end user's (145's) terminal device and / or supported by a server. For example, the end user's (145's) terminal device can run a client with the application execution component 112, which can support interaction between the user and the application execution component 112 provided by the server. When the application execution component 112 runs locally on the user's terminal device, the end user (145) can directly interact with the local application execution component 112 using the terminal device. When the application execution component 112 runs on a server, the server can provide services to the client running on the terminal device based on the communication connection with the terminal device. The application execution component 112 can present corresponding application pages to the end user (145) based on the end user's (145's) actions, to output and / or receive application-related information from the end user (145).

[0038] In some embodiments, the implementation of at least some of the functionality of application 120', and / or the implementation of at least some of the functionality of the digital assistant in application 120', may be based on models. During the creation or operation of application 120', one or more models 155 may be invoked, such as the capabilities of model 155. In application 120', the digital assistant may utilize model 155 to understand user input and provide responses to the user based on the output of model 155.

[0039] During the creation process, the application management platform 110 needs to use model 155 to test the application 120 to determine whether the application 120's running results meet expectations. During operation, in response to different operation requests from users of application 120', the application running part 112 may need to use model 155 to determine the response results to users.

[0040] Although shown as independent of the application management platform 110, one or more models 155 may run on the application management platform 110 or other remote servers. In some embodiments, model 155 may be a machine learning model, a deep learning model, a learning model, a neural network, etc. In some embodiments, the model may be based on a language model (LM). A language model, by learning from a large corpus, is capable of question answering. Model 155 may also be based on other suitable models. In some embodiments, model 155 may include a large language model or may be implemented based on a large language model.

[0041] Application management platform 110 can run on suitable electronic devices. These electronic devices can be any type of computing device, including terminal devices or servers. Terminal devices can be any type of mobile terminal, fixed terminal, or portable terminal, including mobile phones, desktop computers, laptop computers, notebook computers, netbook computers, tablet computers, media computers, multimedia tablets, personal communication system (PCS) devices, personal navigation devices, personal digital assistants (PDAs), audio / video players, digital cameras / camcorders, positioning devices, television receivers, radio receivers, e-book devices, gaming devices, or any combination of the foregoing, including accessories and peripherals of these devices or any combination thereof. Servers can include, for example, computing systems / servers, such as mainframes, edge computing nodes, computing devices in cloud environments, and so on. In some embodiments, application management platform 110 can be implemented based on cloud services.

[0042] It should be understood that the structure and function of environment 100 are described for illustrative purposes only and do not imply any limitation on the scope of this disclosure. For example, although a single user interacting with application creation section 111 and a single user interacting with application execution section 112 are illustrated, in practice multiple users can access application management platform 110 to each create a digital assistant, and each digital assistant can be used to interact with multiple users.

[0043] The following description will continue with reference to the accompanying drawings, which will provide some exemplary embodiments of this disclosure.

[0044] Figure 2Example diagrams of a model-based application building architecture 200 according to some embodiments of the present disclosure are shown. Architecture 200 can be implemented at application management platform 110. It should be noted that architecture 200 can be applied to application creation scenarios or application update scenarios. In the application update scenario, the code generated by architecture 200 can be the entire code of the updated application, or it can be the code corresponding to the updated part (e.g., added functionality) of the updated application (i.e., the generated code is a part of the entire code corresponding to the application). In the following description, different nodes or stages of application creation or updating can utilize machine learning models. The machine learning models utilized by different nodes or stages can be the same or different. The utilized machine learning model can be a large model. A large model can be a large language model. Alternatively or additionally, a large model can be a multimodal model capable of handling multiple modal inputs (e.g., text input, visual input).

[0045] like Figure 2 As shown, architecture 200 includes a requirements determination unit 210. The requirements determination unit 210 is configured to determine requirements description information for the application based on interaction information related to the application's creation. The requirements description information may indicate the application's requirements, such as the application's functionality, the visual style and layout of the application's interface, the types of data required by the application, etc.

[0046] In some embodiments, the requirement determination unit 210 may provide an interactive interface and obtain interactive information related to the generation of the application through the interactive interface. For example, the interactive interface provided by the requirement determination unit 210 may include an input box, through which the requirement determination unit 210 may receive interactive information input by the user 105 indicating requirements for the application (in this case, it may also be referred to as user input). The interactive information may include any appropriate type of information, including but not limited to files, text, images, videos, audio, links, etc.

[0047] In some embodiments, if the interaction information includes visual data (e.g., video and / or images), the requirement determination unit 210 can determine the text description of the visual data in any suitable manner. This text description may, for example, indicate the content of the visual data, the objects included in the visual data, the positions of the objects in the visual data, the style of the visual data, etc. As an example only, the requirement determination unit 210 can utilize a visual language model 212 to determine the text description of the visual data. In this case, the requirement determination unit 210 can determine the requirement description information based on the interaction information, the text description of the visual data, and the access address of the visual data (e.g., the URL of the visual data). Similarly, in some embodiments, if the interaction information includes other types of non-textual information (e.g., audio), the requirement determination unit 210 can also determine the text description corresponding to that information in any suitable manner, and then determine the requirement description information based on that text description, the interaction information, and the access link of that information.

[0048] In some embodiments, the requirement determination unit 210 may use a machine learning model 214 to determine requirement description information. The machine learning model 214 may be based on any suitable model architecture, including but not limited to Transformer models, convolutional neural networks (CNNs), recurrent neural networks (RNNs), deep neural networks (DNNs), and so on. In some embodiments, the machine learning model 214 may be based on a language model (LM). Language models, by learning from a large corpus, possess question-answering capabilities. The machine learning model 214 may also be based on other suitable models. In some embodiments, the machine learning model 214 may include a large language model or may be implemented based on a large language model. In some embodiments, the machine learning model 214 may be based on or include a multimodal model capable of handling multiple modal inputs (e.g., text input, visual input). The requirement determination unit 210 may, for example, provide interaction information to the machine learning model 214 and obtain the model output of the machine learning model 214, which may indicate requirement description information for the interaction information.

[0049] In some embodiments, to improve the accuracy of the determined requirement description information, the requirement determination unit 210 may also acquire historical reference information associated with the requirement description information. As an example, the architecture 200 may also include a history context management unit 220. The history context management unit 220 may provide at least model history information 222, code history information 224, and agent history information 226. The history context management unit 220 may also provide other information, such as user evaluation information of historically generated code. This disclosure does not limit the specific information that the history context management unit 220 can provide.

[0050] Model history information 222 may indicate, for example, the historical model inputs (e.g., historical interaction information) and historical model outputs (e.g., historical requirement description information) of machine learning model 214. Code history information 224 may at least indicate the historical code generated by architecture 200. As described later, architecture 200 may include code agent 250, which may be configured to generate code based on requirement description information and service encapsulation information corresponding to that requirement description information. Code history information 224 may include the historical inputs (i.e., historical requirement description information and historical service encapsulation information corresponding to the historical requirement description information) and historical outputs (historical code) of code agent 250. If architecture 200 calls one or more agents during code generation, each agent may be based on one or more machine learning models. Agent history information 226 may include historical call information of one or more agents. Requirement determination unit 210 may further determine requirement description information based on historical reference information. For example, requirement determination unit 210 may provide interaction information and historical reference information to machine learning model 214 and obtain the requirement description information output by machine learning model 214. In some embodiments, to improve the accuracy of the determined requirement description information, the application management platform 110 may also provide the determined requirement description information to the user so that the user can manually determine the requirement description information.

[0051] Architecture 200 may also include a service matching tool 232. The service matching tool 232 can determine at least one service that matches the requirement description information from a plurality of candidate services 240 based on the requirement description information. The service matching tool 232 may be implemented based on a machine learning model (e.g., a large language model or a multimodal model). In some embodiments, the plurality of candidate services 240 may include different types of services. The different types of services include at least a data service 242, a function service 244, and a workflow service 246. These plurality of candidate services 240 may be services already created in the application management platform 110 and that can be directly used. The service matching tool 232 can determine the service that matches the requirement description information based on any suitable method. For example, the service matching tool 232 may determine at least one service that matches the requirement description information from a plurality of candidate services based on the semantics of the requirement description information and the respective descriptions of the plurality of candidate services. As another example, the service matching tool 232 may determine at least one service from a plurality of services based on the requirement description information using a trained machine learning model. This disclosure does not limit the specific determination method.

[0052] In some embodiments, to ensure the accuracy of at least one identified service, architecture 200 may further include a requirement expansion tool 234. The requirement expansion tool 234 may be implemented based on a machine learning model (e.g., a large language model or a multimodal model). Application management platform 110 can obtain a quality assessment result of the requirement description information, which evaluates the quality of the requirement description information at least from the dimension of requirement completeness. For example, if the requirement description information can describe the application to be generated relatively completely, its requirement completeness can be determined to be high; if the requirement description information cannot clearly describe the application to be generated (e.g., lacking application functionality), its requirement completeness can be determined to be low. Application management platform 110 can use any appropriate method to obtain the quality assessment result of the requirement description information; as an example only, it can use a trained assessment model to obtain the quality assessment result of the requirement description information.

[0053] If the quality assessment results indicate that the quality of the requirement description information does not meet the predetermined quality requirements, the application management platform 110 can update the requirement description information using the requirement expansion tool 234. The requirement expansion tool 234 can update the requirement description information in any suitable manner. For example, the requirement expansion tool can update the requirement description information using a requirement expansion model. Alternatively, the requirement expansion tool can update the requirement description information based on predetermined rules or algorithms. The updated requirement description information is provided to the service matching tool 232, which can then determine at least one service from multiple candidate services 240 based on the updated requirement description information.

[0054] As mentioned earlier, architecture 200 may also include code agent 250. Code agent 250 can, for example, obtain service information for multiple candidate services. Service information includes descriptions and interface information of the wrapper suites for the corresponding candidate services. The wrapper suites can include any suitable wrapping form, such as a software development kit (SDK). It should be noted that each service can have its own corresponding wrapper suite (i.e., one service corresponds to one wrapper suite), or multiple services can correspond to one wrapper suite (e.g., two services correspond to one wrapper suite, three services correspond to one wrapper suite, etc.). This article uses the example of one wrapper suite per service for illustration.

[0055] As an example, architecture 200 may also involve a knowledge base 260. Knowledge base 260 may include service information 264. Service information 264 may include a large number of services (which may include at least several candidate services) and description information and interface information of the encapsulation suite for each service. The description information may indicate the functionality of the corresponding service, and the interface information may indicate the interface used to invoke the encapsulation suite of that service. Code agent 250, for example, can determine the description information and interface information of the encapsulation suite for at least one service by querying the service information 264 in knowledge base 260. Code agent 250 can then determine service encapsulation information based at least on the interface information of the encapsulation suite for at least one service. Code agent 250 can generate code for implementing the application based at least on the requirement description information and the service encapsulation information corresponding to at least one service. Service encapsulation information may include service invocation information, such as interface information. For example, service encapsulation information may describe the invocation method, invocation parameters, and service output parameters.

[0056] Code agent 250 can generate code in any suitable manner. For example, code agent 150 may include code generation unit 256. Code generation unit 256 may provide prompt word information to code generation model based on requirement description information and service encapsulation information corresponding to at least one service to obtain the output of code generation model. It is understood that the code generation model may also be based on any suitable model structure, such as a language model or other suitable models. In some embodiments, the code generation model may include a large language model or may be implemented based on a large language model. The code generation model may be based on or include a multimodal model. This disclosure does not limit this. The output of the code generation model may indicate code that matches the prompt word information, i.e., code used to implement the application. The code may include code segments that call at least one service. For example, for one of the at least one services, the code may include a statement that calls the service, which may indicate the call parameters of the service. The code may also include statements for using the output of the service. The statements may indicate how the output of the service is processed, such as providing it to other parts of the application or as input to other services, etc. As an example, such as Figure 2As shown, the code generated by the code generation model can call the service corresponding to encapsulation suite 272 via the interface of encapsulation suite 272. Although only one is shown in the figure, encapsulation suite 272 can include one or more encapsulation suites. It can be seen that, using this pre-created service, during the code generation process, there is no need to understand the internal implementation logic of the service; service call code can be generated directly. Compared to generating code that implements the internal logic of the service, generating code that calls the service is simpler and more efficient. This allows for the efficient integration of the service capabilities of the application management platform into the development of new applications, thereby reducing the difficulty of code generation in new application development.

[0057] In some embodiments, the knowledge base 260 may further include a component template 262. The component template 262 may include multiple components (also referred to as functional modules) for constituting the application and description information for each component. The code agent 250 may include, for example, a component decomposition unit 252, which may determine at least one component that matches the requirement description information from the multiple components based on the component template 262 and the requirement description information. For example, the component decomposition unit 252 may determine at least one function corresponding to the application to be generated based on the requirement description information, and then determine at least one component from the multiple components to implement the at least one function based on the at least one function.

[0058] The code agent 250 may include, for example, a component code unit 254. The component code unit 254 can obtain reference code for each component in at least one component. The reference code corresponding to each component can be configured to call that component. The reference code for each component can be historical code that calls that component, or it can be pre-generated reference code for that component. It can be understood that if each component corresponds to one function, and the requirement description information indicates that the application to be generated has five functions, and the component decomposition unit 252 has determined these five functions based on the requirement description information and obtained five components corresponding to each of these five functions from multiple components based on the component template 262, the component code unit 254 can obtain the reference code for each of these five components. If the component decomposition unit 252 has only obtained components corresponding to some of the five functions (e.g., three of the functions) (i.e., it failed to obtain components corresponding to two of the functions), the code agent 250 can generate reference code for that function.

[0059] In this scenario, the code generation unit 256 can, for example, determine the prompt words to be provided to the code generation model based on the acquired reference code, requirement description information, and service encapsulation information. The code generation unit 256 can then provide this prompt word information to the code generation model and obtain the model output of the code generation model. Based on the output of the code generation model, the code generation unit 256 can determine the code used to implement the application.

[0060] In some embodiments, to further improve the quality of the final generated code, the service can be adjusted according to current needs. In some embodiments, if at least one service matching the requirement description information includes data service 242, the application management platform 110 can also determine whether data service 242 includes data objects that satisfy the data requirements indicated by the requirement description information. As an example, if the data requirement indicates that data table A is needed, but data service 242 does not include data table A, it can be determined that data service 242 lacks data objects that satisfy the data requirements.

[0061] In this scenario, the application management platform 110 can utilize the data agent 236 to add data objects to the data service 242 based on data requirements. The data agent 236 can be implemented based on a machine learning model (e.g., a large language model or a multimodal model). Continuing with the example that data service 242 cannot provide data table A, the data agent 236 can, for instance, add data table A to the data service 242 based on data requirements.

[0062] In some embodiments, where data service 242 includes data objects, application management platform 110 can inspect the data objects to determine whether the data objects provided by data service 242 meet the data requirements indicated by the requirement description information. For example, if the requirement description information indicates that field A is required, but the data table provided by data service 242 does not have field A, then application management platform 110 can determine that the data table does not meet the data requirements.

[0063] If it is determined that a data object does not meet the data requirements, the application management platform 110 can use the data agent 236 to update the data object according to the data requirements. For example, if the requirement description information indicates that field A is required, but the data table provided by the data service 242 does not have field A, the data agent 236 can determine A based on the existing fields B and C in the data table, and then add field A to the data table to update the data table.

[0064] The application management platform 110 can then update the service encapsulation information corresponding to the data service 242 based on the added data object or the updated data object, and subsequently generate code based on the updated service encapsulation information.

[0065] In some embodiments, data agent 236 can first determine where data requirements are not met in the data object, and then update the parts of the data object that do not meet the data requirements. In some embodiments, data agent 236 can also specifically determine whether the data structure of the data object meets the data requirements. If the data structure does not meet the data requirements, data agent 236 can instruct data structure agent 238 to update the data structure of the data object. Data structure agent 238 can be implemented based on a machine learning model (e.g., a large language model or a multimodal model). Data structure agent 238 can update the data structure based on the data requirements and the current state of the data object's data structure to obtain an updated data object.

[0066] In some embodiments, data structure agent 238 can be considered as part of data agent 236. In this case, after data agent 236 instructs data structure agent 238 to update the data structure, it will obtain the updated data object from data structure agent 238. Data agent 236 can then provide the updated data object to application management platform 110. In some embodiments, data structure agent 238 can also be considered as a separate agent. In this case, data structure agent 238 can directly provide the updated data object to application management platform 110.

[0067] It is understandable that requirement description information can describe requirements in multiple dimensions, with data being one of those dimensions. Furthermore, data requirements can indicate the needs of a data object in multiple dimensions, with data structure being just one of them. If it is determined that a data object does not meet data requirements in dimensions other than the data structure, the application management platform 110 can utilize the data agent 236 to update the data object using other methods.

[0068] In some embodiments, after code generation, the application management platform 110 can perform error correction on the generated code. For example, architecture 200 may also include an error correction unit 280. The error correction unit 280 can verify and correct the code using any appropriate method. For example, the error correction unit 280 can verify and correct the code based on predetermined rules or algorithms. Another example is that the error correction unit 280 can use a trained machine learning model to verify and correct the code. Yet another example is that the error correction unit 280 can provide the code to a user for manual verification and error correction. This helps improve the accuracy of the final generated code.

[0069] In summary, user requirements can be broken down and matched with services. Based on the service encapsulation information corresponding to each service, code matching the user requirements can be generated. This allows existing services to be integrated into application code development. This reduces the difficulty and efficiency of code generation during application setup, ensuring the usability and completeness of the generated code. The generated code can automatically integrate multiple services and can be deployed and run directly without manual modification, significantly lowering the technical threshold and time cost of application development. Furthermore, the generated code can directly call services provided by the platform without accessing the service's internal logic. In this case, the permission management in the created services can also be inherited by the application. This avoids the security risks caused by neglecting permission management in traditional code generation, improving the reliability and security of the application.

[0070] Figure 3 A flowchart of a model-based application building method 300 according to some embodiments of the present disclosure is shown. Method 300 can be implemented at an application management platform 110.

[0071] In box 310, the application management platform 110 determines the requirement description information for the application based on the interaction information related to the generation of the application. The requirement description information indicates the requirements for the application.

[0072] In box 320, the application management platform 110 determines at least one service that matches the requirement description information from a plurality of candidate services that have been created, based on the requirement description information.

[0073] In box 330, the application management platform 110 generates code for implementing the application based at least on the requirement description information and the service encapsulation information corresponding to at least one service. The code includes code segments for calling at least one service.

[0074] In some embodiments, at least one service includes a data service, and method 300 further includes: determining whether a data object provided by the data service meets the data requirements indicated by the requirement description information; in response to determining that the data object does not meet the data requirements, updating the data object using a data agent according to the data requirements; and updating service encapsulation information corresponding to the data service based on the updated data object.

[0075] In some embodiments, updating a data object using a data agent according to data requirements includes: using the data agent to determine whether the data structure of the data object meets the data requirements; in response to the data structure not meeting the data requirements, instructing a data structure agent to update the data structure of the data object; and having the data structure agent update the data structure based on the data requirements and the current state of the data object's data structure to obtain the updated data object.

[0076] In some embodiments, at least one service includes a data service, and method 300 further includes: in response to determining that the data service lacks data objects that satisfy the data requirements indicated by the requirement description information, using a data agent to add data objects to the data service to satisfy the data requirements; and updating service encapsulation information corresponding to the data service based on the added data objects.

[0077] In some embodiments, generating code for implementing an application includes: obtaining reference code for each of at least one functional module that matches the requirements description information; providing prompt word information to a code generation model based on the obtained reference code, requirements description information, and service encapsulation information to obtain the output of the code generation model; and determining the code for implementing the application based on the output of the code generation model.

[0078] In some embodiments, service encapsulation information corresponding to at least one service is determined based on the following: obtaining corresponding service information for multiple candidate services, the service information including description information and interface information of the encapsulation suite of the corresponding candidate service; and determining service encapsulation information based on the interface information of the encapsulation suite of at least one service.

[0079] In some embodiments, determining the requirement description information for an application includes: obtaining historical reference information, which includes at least one of the following: historical interaction information related to the generation of the application, historical requirement description information, historical service encapsulation information corresponding to the historical requirement description information, historical call information of one or more agents, and generated historical code; and determining the requirement description information based on the historical reference information and the interaction information.

[0080] In some embodiments, determining the requirement description information for an application includes: in response to interaction information including visual data, using a visual language model to determine a textual description of the visual data; and determining the requirement description information based on the interaction information, the textual description, and the access address of the visual data.

[0081] In some embodiments, determining at least one service that matches the requirement description information from a plurality of created candidate services includes: obtaining a quality assessment result of the requirement description information, the quality assessment result assessing the quality of the requirement description information at least from the dimension of requirement completeness; updating the requirement description information using a requirement expansion model in response to the quality assessment result indicating that the quality of the requirement description information does not meet a predetermined quality requirement; and determining at least one service from the plurality of candidate services based on the updated requirement description information.

[0082] Embodiments of this disclosure also provide corresponding apparatus for implementing the above methods or processes. Figure 4An exemplary structural block diagram of a model-based application building apparatus 400 according to some embodiments of the present disclosure is shown. Apparatus 400 may be implemented as or included in an application management platform 110. Various modules / components in apparatus 400 may be implemented by hardware, software, firmware, or any combination thereof.

[0083] like Figure 4 As shown, the apparatus 400 includes an information determination module 410 configured to determine requirement description information for the application based on interaction information related to the creation of the application, the requirement description information indicating the requirements for the application. The apparatus 400 also includes a service determination module 420 configured to determine at least one service matching the requirement description information from a plurality of created candidate services based on the requirement description information. The apparatus 400 further includes a code generation module 430 configured to generate code for implementing the application based at least on the requirement description information and service encapsulation information corresponding to the at least one service, the code including code segments for calling the at least one service.

[0084] In some embodiments, at least one service includes a data service, and the apparatus 400 further includes: a first determining module configured to determine whether a data object provided by the data service meets the data requirements indicated by the requirement description information; a data object updating module configured to update the data object according to the data requirements using a data agent in response to determining that the data object does not meet the data requirements; and a first service encapsulation information updating module configured to update the service encapsulation information corresponding to the data service based on the updated data object.

[0085] In some embodiments, the data object update module is further configured to: use a data agent to determine whether the data structure of the data object meets the data requirements; in response to the data structure not meeting the data requirements, instruct a data structure agent to update the data structure of the data object; and have the data structure agent update the data structure based on the data requirements and the current state of the data structure of the data object to obtain the updated data object.

[0086] In some embodiments, at least one service includes a data service, and the apparatus 400 further includes: a data object adding module configured to, in response to determining that the data service lacks data objects that satisfy the data requirements indicated by the requirement description information, use a data agent to add data objects in the data service to satisfy the data requirements; and a second service encapsulation information updating module configured to update the service encapsulation information corresponding to the data service based on the added data objects.

[0087] In some embodiments, the code generation module 430 is further configured to: acquire reference code for each of at least one functional module that matches the requirement description information; provide prompt word information to the code generation model based on the acquired reference code, requirement description information, and service encapsulation information to obtain the output of the code generation model; and determine the code for implementing the application based on the output of the code generation model.

[0088] In some embodiments, service encapsulation information corresponding to at least one service is determined based on the following: obtaining corresponding service information for multiple candidate services, the service information including description information and interface information of the encapsulation suite of the corresponding candidate service; and determining service encapsulation information based on the interface information of the encapsulation suite of at least one service.

[0089] In some embodiments, the information determination module 410 is further configured to: acquire historical reference information, which includes at least one of the following: historical interaction information related to the generation of the application, historical requirement description information, historical service encapsulation information corresponding to the historical requirement description information, historical call information of one or more intelligent agents, and generated historical code; and determine the requirement description information based on the historical reference information and the interaction information.

[0090] In some embodiments, the information determination module 410 is further configured to: determine a text description of the visual data using a visual language model in response to the interaction information including visual data; and determine a demand description information based on the interaction information, the text description, and the access address of the visual data.

[0091] In some embodiments, the service determination module 420 is further configured to: obtain a quality assessment result of the requirement description information, the quality assessment result assessing the quality of the requirement description information at least from the dimension of requirement completeness; update the requirement description information using a requirement expansion model in response to the quality assessment result indicating that the quality of the requirement description information does not meet a predetermined quality requirement; and determine at least one service from a plurality of candidate services based on the updated requirement description information.

[0092] The modules included in device 400 can be implemented in various ways, including software, hardware, firmware, or any combination thereof. In some embodiments, one or more modules may be implemented using software and / or firmware, such as machine-executable instructions stored on a storage medium. In addition to or as an alternative to machine-executable instructions, some or all of the modules in device 400 may be implemented at least partially by one or more hardware logic components. By way of example, and not limitation, exemplary types of hardware logic components that may be used include field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-chips (SoCs), complex programmable logic devices (CPLDs), and so on.

[0093] Figure 5 A block diagram of an electronic device 500 in which one or more embodiments of the present disclosure may be implemented is shown. It should be understood that... Figure 5 The electronic device 500 shown is merely exemplary and should not be construed as limiting the functionality and scope of the embodiments described herein. Figure 5 The electronic device 500 shown can be used to achieve Figure 1 Application management platform 110 or Figure 4 Device 400.

[0094] like Figure 5 As shown, electronic device 500 is in the form of a general-purpose electronic device. Components of electronic device 500 may include, but are not limited to, one or more processing units or processors 510, memory 520, storage devices 530, one or more communication units 540, one or more input devices 550, and one or more output devices 560. Processor 510 may be a physical or virtual processor and is capable of performing various processes according to programs stored in memory 520. In a multiprocessor system, multiple processors execute computer-executable instructions in parallel to improve the parallel processing capability of electronic device 500.

[0095] Electronic device 500 typically includes multiple computer storage media. Such media can be any accessible media that is accessible to electronic device 500, including but not limited to volatile and non-volatile media, removable and non-removable media. Memory 520 can be volatile memory (e.g., registers, cache, random access memory (RAM)), non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. Storage device 530 can be removable or non-removable media and can include machine-readable media, such as flash drives, disks, or any other media that can be used to store information and / or data and can be accessed within electronic device 500.

[0096] Electronic device 500 may further include additional removable / non-removable, volatile / non-volatile storage media. Although not explicitly stated... Figure 5 As shown, disk drives for reading from or writing to removable, non-volatile disks (e.g., "floppy disks") and optical disk drives for reading from or writing to removable, non-volatile optical disks can be provided. In these cases, each drive can be connected to a bus (not shown) via one or more data media interfaces. Memory 520 may include computer program product 525 having one or more program modules configured to perform various methods or actions of various embodiments of this disclosure.

[0097] Communication unit 540 enables communication with other electronic devices via a communication medium. Additionally, the functionality of components of electronic device 500 can be implemented using a single computing cluster or multiple computing machines capable of communicating via communication connections. Therefore, electronic device 500 can operate in a networked environment using logical connections to one or more other servers, network personal computers (PCs), or another network node.

[0098] Input device 550 can be one or more input devices, such as a mouse, keyboard, trackball, etc. Output device 560 can be one or more output devices, such as a monitor, speaker, printer, etc. Electronic device 500 can also communicate with one or more external devices (not shown) via communication unit 540 as needed. These external devices include storage devices, display devices, etc., and can communicate with one or more devices that enable user interaction with electronic device 500, or with any device that enables electronic device 500 to communicate with one or more other electronic devices (e.g., network card, modem, etc.). Such communication can be performed via input / output (I / O) interface (not shown).

[0099] According to an exemplary implementation of this disclosure, a computer-readable storage medium is provided that stores computer-executable instructions thereon, wherein the computer-executable instructions are executed by a processor to implement the methods described above. According to an exemplary implementation of this disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, which are executed by a processor to implement the methods described above.

[0100] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatuses, devices, and computer program products implemented according to this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0101] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0102] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions that execute on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0103] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which contains one or more executable instructions for implementing the specified logical function. In some, as newer, implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0104] Various implementations of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed implementations. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described implementations. The terminology used herein is chosen to best explain the principles, practical applications, or improvements to technology in the market, or to enable others skilled in the art to understand the various implementations disclosed herein.

Claims

1. A model-based application development method, comprising: Based on interaction information related to the generation of the application, requirement description information for the application is determined, the requirement description information indicating the requirements for the application; Based on the demand description information, at least one service that matches the demand description information is determined from multiple candidate services that have been created; as well as Based at least on the requirement description information and the service encapsulation information corresponding to the at least one service, code for implementing the application is generated, the code including code segments for calling the at least one service.

2. The method of claim 1, wherein the at least one service includes a data service, and the method further includes: Determine whether the data objects provided by the data service meet the data requirements indicated by the requirement description information; In response to determining that the data object does not meet the data requirement, the data agent updates the data object according to the data requirement; and Based on the updated data object, update the service encapsulation information corresponding to the data service.

3. The method according to claim 2, wherein updating the data object using a data agent based on the data requirements comprises: The data agent is used to determine whether the data structure of the data object meets the data requirements. In response to the data structure not meeting the data requirements, the data agent instructs the data structure agent to update the data structure of the data object; as well as The data structure agent updates the data structure based on the data requirements and the current state of the data structure of the data object to obtain the updated data object.

4. The method of claim 1, wherein the at least one service includes a data service, and the method further includes: In response to determining that the data service lacks a data object that satisfies the data requirement indicated by the requirement description information, a data agent is used to add the data object to the data service to satisfy the data requirement; as well as Based on the added data object, update the service encapsulation information corresponding to the data service.

5. The method of claim 1, wherein generating code for implementing the application comprises: Obtain the reference code for each of at least one functional module that matches the requirement description information; Based on the obtained reference code, requirement description information, and service encapsulation information, prompt word information is provided to the code generation model to obtain the output of the code generation model; as well as Based on the output of the code generation model, the code used to implement the application is determined.

6. The method of claim 1, wherein the service encapsulation information corresponding to the at least one service is determined based on the following: Obtain the corresponding service information for the multiple candidate services, wherein the service information includes description information and interface information of the encapsulation suite of the corresponding candidate service; and The service encapsulation information is determined based at least on the interface information of the encapsulation suite of the at least one service.

7. The method of claim 1, wherein determining the requirement description information for the application includes: Obtain historical reference information, which includes at least one of the following: historical interaction information related to the generation of the application, historical requirement description information, historical service encapsulation information corresponding to the historical requirement description information, historical call information of one or more intelligent agents, and generated historical code. as well as The requirement description information is determined based on the historical reference information and the interaction information.

8. The method of claim 1, wherein determining the requirement description information for the application includes: In response to the interaction information including visual data, a textual description of the visual data is determined using a visual language model; as well as The requirement description information is determined based on the interaction information, the text description, and the access address of the visual data.

9. The method of claim 1, wherein determining at least one service matching the demand description information from a plurality of created candidate services comprises: Obtain the quality assessment results of the requirement description information, wherein the quality assessment results evaluate the quality of the requirement description information from at least the dimension of requirement completeness; In response to the quality assessment result indicating that the quality of the requirement description information does not meet the predetermined quality requirements, the requirement description information is updated using the requirement expansion model; as well as Based on the updated demand description information, at least one service is determined from the plurality of candidate services.

10. A model-based application building device, comprising: The information determination module is configured to determine requirement description information for the application based on interaction information related to the generation of the application, the requirement description information indicating the requirements for the application; The service determination module is configured to determine at least one service that matches the requirement description information from a plurality of created candidate services based on the requirement description information. as well as The code generation module is configured to generate code for implementing the application based at least on the requirement description information and service encapsulation information corresponding to the at least one service, the code including code segments for calling the at least one service.

11. An electronic device, comprising: At least one processor; as well as At least one memory coupled to the at least one processor and storing instructions for execution by the at least one processor, the instructions causing the electronic device to perform the method according to any one of claims 1 to 9 when executed by the at least one processor.

12. A computer-readable storage medium having stored thereon computer-executable instructions that can be executed by a processor to implement the method according to any one of claims 1 to 9.

13. A computer program product comprising computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Code generation method based on large language model, medium and equipment

    CN118363580A

  • Code generation method and device, equipment and storage medium

    CN119536720A

  • Code generation method and device, equipment, medium and product

    CN119917108A

Cited By

  • An Internet of Things project end-to-end automatic generation method and device based on a large language model

    CN122450466A