Application program generation method and device and electronic equipment
By building a knowledge base and knowledge graph in the coal field, using AIGC models to generate applications, the problems of high costs and long cycles of traditional development methods are solved, the automated generation of intelligent applications is realized, the development and maintenance costs are reduced, and coal mines are helped Intelligent construction.
Patent Information
- Application Number
- CN202411227963.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2024-12-06
AI Technical Summary
The traditional coal industry has high application development costs, long development cycles and high maintenance costs, which require professional developers, making it difficult to achieve automated and intelligent application generation.
By obtaining knowledge information in the coal field, building a knowledge base and knowledge graph, and using a generative artificial intelligence AIGC model to generate target applications based on user input information, reducing development thresholds and maintenance costs.
It has achieved automatic generation of intelligent target applications based on user needs, reduced development and maintenance costs, helped to build intelligent coal mines, and formed an intelligent application ecosystem in the coal field.
Smart Images

Figure CN119088355A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method, device and electronic device for generating an application. Background Art
[0002] Traditional coal industry application development methods include coded development and low-code development. Coded development requires professional developers to use specific programming languages to generate application products; low-code development requires a higher-dimensional and easier-to-use visual integrated development environment (IDE) to develop applications. Using traditional development methods, the cost of developing applications is high and requires professional developers. At the same time, the development cycle is long and the maintenance cost of the application is also high. Summary of the invention
[0003] The present application aims to solve one of the technical problems in the related art at least to some extent.
[0004] To this end, the first purpose of this application is to propose a method for generating an application so as to automatically understand and generate an intelligent target application required by a user based on the information provided by the user.
[0005] The second objective of the present application is to provide a device for generating an application.
[0006] The third objective of the present application is to provide an electronic device.
[0007] To achieve the above-mentioned objectives, the first aspect embodiment of the present application proposes a method for generating an application, including: obtaining knowledge information in the coal field, and inputting the knowledge information into a knowledge enhancement framework in the coal field to construct a coal field knowledge base and a coal field knowledge graph; obtaining user input information, and based on the input information, the coal field knowledge base and the coal field knowledge graph, determining prompt information of a generative artificial intelligence AIGC model; inputting the prompt information into the AIGC model, and having the AIGC model generate a target application in the coal field based on the prompt information.
[0008] To achieve the above-mentioned purpose, the second aspect embodiment of the present application proposes a device for generating an application, including: a construction module, used to obtain knowledge information in the coal field, and input the knowledge information into a knowledge enhancement framework in the coal field to construct a coal field knowledge base and a coal field knowledge graph; a determination module, used to obtain user input information, and based on the input information, the coal field knowledge base and the coal field knowledge graph, determine the prompt information of the generative artificial intelligence AIGC model; a generation module, used to input the prompt information into the AIGC model, and the AIGC model generates a target application in the coal field based on the prompt information.
[0009] To achieve the above-mentioned purpose, the third aspect embodiment of the present application proposes an electronic device, comprising: a processor; and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the processor can execute the method for generating an application described in the first aspect embodiment above.
[0010] The generation method, device and electronic device of the application provided in this application, by acquiring knowledge information in the coal field and based on the knowledge enhancement framework in the coal field, constructs a knowledge base and a knowledge graph in the coal field. Then, the coal field knowledge base and the coal field knowledge graph can be retrieved according to the user's input information to obtain the prompt information of the AIGC model. By inputting the prompt information into the AIGC model, the target application can be generated by the AIGC model. This application can automatically understand and generate the intelligent target application required by the user based on the information provided by the user, which reduces the development threshold, reduces manual work, reduces the development cost and maintenance threshold of the application, and helps to form an intelligent application ecology in the coal field and assist in the intelligent construction of coal mines.
[0011] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0013] Figure 1 A flowchart of a method for generating an application program provided in an embodiment of the present application;
[0014] Figure 2 A flowchart of another method for generating an application program provided in an embodiment of the present application;
[0015] Figure 3A flowchart of another method for generating an application program provided in an embodiment of the present application;
[0016] Figure 4 A flowchart of another method for generating an application program provided in an embodiment of the present application;
[0017] Figure 5 A schematic diagram of the structure of generating a target application provided in an embodiment of the present application;
[0018] Figure 6 A schematic diagram of a process for generating a target application program provided in an embodiment of the present application;
[0019] Figure 7 A schematic diagram of the structure of a device for generating an application program provided in an embodiment of the present application. DETAILED DESCRIPTION
[0020] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.
[0021] The following describes the method and device for generating an application program according to an embodiment of the present application with reference to the accompanying drawings.
[0022] Figure 1 is a flow chart of a method for generating an application according to an exemplary embodiment. Figure 1 As shown, the method for generating an application program in the embodiment of the present application includes but is not limited to the following steps:
[0023] S101, obtain knowledge information in the coal field, and input the knowledge information into the knowledge enhancement framework in the coal field to construct a knowledge base and a knowledge graph in the coal field.
[0024] It should be noted that the execution subject of the method for generating an application provided in the embodiment of the present application is an electronic device, which may be a terminal device. Optionally, the terminal device may be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device may be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (PDA), etc., and the non-mobile electronic device may be a personal computer (PC), a television, etc. The embodiment of the present application is not specifically limited.
[0025] In some implementations, knowledge information can be obtained from a database in the coal field, and / or information about the coal field can be searched on a network platform as knowledge information, and / or basic knowledge, technical principles, and other information in the coal field can be obtained from books in the coal field as knowledge information, and / or knowledge information in the coal field can be determined using a large language model.
[0026] Furthermore, by inputting the knowledge information into the knowledge enhancement framework in the coal field, the knowledge enhancement framework refines the knowledge information to obtain the knowledge summary corresponding to the knowledge information, and then the knowledge summary and the knowledge information are used as the knowledge base in the coal field.
[0027] It can be understood that the knowledge enhancement framework can process knowledge information, for example, prepare dictionaries for professional word segmentation of documents in the coal field (such as: comprehensive mining working face, auxiliary transport chute and other professional vocabulary); it can also supplement and improve the annotations of important code blocks in the field; it can also extract metadata information of coal mine production database tables and add necessary explanations; it can also parse coal field charts and generate introductory texts, etc.
[0028] Furthermore, after the coal field knowledge base is constructed, we can identify the entities related to the coal field in the coal field knowledge base, as well as the relationships between entities, and use the entities in the coal field as nodes in the coal field knowledge graph, and the relationships between entities as edges in the coal field knowledge graph, and then connect the nodes and edges to obtain the coal field knowledge graph.
[0029] In some implementations, after obtaining the coal field knowledge base and the coal field knowledge graph, the coal field knowledge base can be vectorized and stored, the coal field knowledge graph can be graph stored, and the entities in the coal field knowledge graph can be vectorized and stored.
[0030] S102, obtaining user input information, and determining prompt information of the generative artificial intelligence AIGC model based on the input information, the coal field knowledge base and the coal field knowledge graph.
[0031] In some implementations, the user may be guided to input demand information, and the input demand information may be used as input information, wherein the input information may include text and pictures. Optionally, after the input information is obtained, the input information may be improved.
[0032] Optionally, the artificial intelligence generative content (AIGC) model can guide the user to clarify and complete the input information through multiple rounds of dialogue. Optionally, the AIGC model can be used to guide the user to complete the development information according to the development standard requirements of the application.
[0033] In some implementations, after obtaining the input information, the input information can be used to search the coal field knowledge base and the coal field knowledge graph based on the Retrieval Augmented Generation (RAG) framework to obtain prompt information of the AIGC model.
[0034] That is to say, the input information can be used to search the coal field knowledge base and the coal field knowledge graph respectively, to obtain the first search result corresponding to the coal field knowledge base and the second search result corresponding to the coal field knowledge graph, and the first search result and the second search result can be combined to obtain the prompt information of the AIGC model.
[0035] S103, inputting the prompt information into the AIGC model, and the AIGC model generates a target application in the coal field based on the prompt information.
[0036] In some implementations, the AIGC model can generate code snippets corresponding to different components based on prompt information, that is, multiple candidate codes, and combine multiple candidate codes to obtain the engineering code required to generate the target application, and then compile the engineering code to generate the target application in the coal field.
[0037] Optionally, the AIGC model can generate engineering codes required by the target application according to prompt information by calling the code generation platform component and using the code generation platform component.
[0038] It is understandable that the different components of the target application may include: data framework, business logic, front-end orchestration, etc. Among them, the data framework defines the organization and storage structure of data; business logic defines how the program performs operations based on input data and produces output; front-end orchestration includes the interface design of the application, which means that in order to meet the needs of user interaction, the AIGC model can generate or adjust the front-end interface of the application. This includes designing interface elements such as buttons, input boxes, tables, and their layout and style.
[0039] In the method for generating an application provided in the embodiment of the present application, by acquiring knowledge information in the coal field and based on the knowledge enhancement framework in the coal field, a coal field knowledge base and a coal field knowledge graph are constructed. Then, the coal field knowledge base and the coal field knowledge graph can be retrieved according to the user's input information to obtain prompt information of the AIGC model. By inputting the prompt information into the AIGC model, the target application can be generated by the AIGC model. The present application can automatically understand and generate the intelligent target application required by the user based on the information provided by the user, which lowers the development threshold, reduces manual work, reduces the development cost and maintenance threshold of the application, and helps to form an intelligent application ecology in the coal field and assist in the intelligent construction of coal mines.
[0040] Figure 2 is a flow chart of a method for generating an application according to an exemplary embodiment. Figure 2 As shown, the method for generating an application program in the embodiment of the present application includes but is not limited to the following steps:
[0041] S201, acquiring knowledge information in the coal field, and inputting the knowledge information into a knowledge enhancement framework in the coal field to construct a knowledge base and a knowledge graph in the coal field.
[0042] In the embodiment of the present application, the implementation method of step S201 can be implemented by any method in the embodiments of the present application, which is not limited here and will not be repeated.
[0043] S202, obtaining user input information, and based on the input information, searching the coal field knowledge base to obtain a first search result.
[0044] It is understandable that after obtaining the coal field knowledge base, the coal field knowledge base is vectorized and stored, that is, the vector representation of the coal field knowledge base can be searched according to the vector representation of the input information to obtain the first search result.
[0045] Optionally, the input information is vector-encoded to obtain a first vector representation of the input information, and a second vector representation of the knowledge summary in the coal field knowledge base is obtained, and then two searches are performed based on the first vector representation and the second vector representation to filter out irrelevant knowledge information and obtain a first search result with a high relevance to the input information.
[0046] Optionally, a first similarity between the first vector representation and the second vector representation is calculated, and based on the first similarity between the first vector representation and the second vector representation, a first candidate retrieval result matching the input information in the coal field knowledge base is obtained, the first candidate retrieval result including multiple candidate text blocks.
[0047] Further, the second similarities between the input information and the plurality of candidate text blocks are calculated respectively, and based on the second similarities between the input information and the candidate text blocks, a first search result is determined from the first candidate search results, wherein the first search result includes the target text block that best matches the input information. In other words, the second similarities can be sorted, and the candidate text block with the highest similarity can be selected as the target text block.
[0048] S203: Based on the input information, search the coal field knowledge graph to obtain a second search result.
[0049] It is understandable that after obtaining the coal field knowledge graph, the entities in the coal field knowledge graph are vectorized and stored. That is, the real vector representation in the coal field knowledge graph can be searched according to the vector representation of the input information to obtain the second search result.
[0050] Optionally, by performing entity recognition on the input information and vectorizing the recognized entities to obtain a third vector representation, a fourth vector representation of the candidate entity in the coal field knowledge graph can be obtained.
[0051] Furthermore, a third similarity between the third vector representation and the fourth vector representation is calculated, and based on the third similarity between the third vector representation and the fourth vector representation, a target entity is determined from the candidate entities, and an entity subgraph of the target entity is obtained, and the entity subgraph is textualized to obtain a second retrieval result.
[0052] In some implementations, after obtaining the coal field knowledge graph, the coal field knowledge graph is also stored in a graph, that is, the coal field knowledge graph contains graph information and vector information of entities. After determining the target entity, the entity subgraph corresponding to the target entity can be determined from the coal field knowledge graph.
[0053] S204: Obtain a target search result based on the first search result and the second search result.
[0054] Optionally, the first search result and the second search result may be combined to obtain a target search result. That is, the target text block included in the first search result and the textualized entity subgraph included in the second search result may be combined to obtain the target search result.
[0055] S205, obtaining a reference template, and inputting the target search result and input information into the reference template to obtain prompt information.
[0056] In some implementations, in order to facilitate the AIGC model's understanding of input information and improve the quality of the model output engineering code, a reference template can be obtained. For example, the reference template may include: role settings, role introductions, role skills, rules to be followed by the role, role workflows, and related domain knowledge classification and summary information.
[0057] Optionally, by inputting the target retrieval results and input information into a reference template, and assembling the target retrieval results and input information based on the reference template to generate efficient and accurate prompt information, the generation effect of the AIGC model is further improved.
[0058] S206, inputting the prompt information into the AIGC model, and the AIGC model generates a target application in the coal field based on the prompt information.
[0059] In the embodiment of the present application, the implementation method of step S206 can be implemented by any method in the embodiments of the present application, which is not limited here and will not be repeated.
[0060] In the method for generating an application provided in the embodiment of the present application, by acquiring knowledge information in the coal field and based on the knowledge enhancement framework in the coal field, a coal field knowledge base and a coal field knowledge graph are constructed. Then, according to the user's input information, the coal field knowledge base and the coal field knowledge graph can be searched respectively to obtain the target search results, and the prompt information of the AIGC model can be obtained according to the target search results and the input information. By inputting the prompt information into the AIGC model, the target application can be generated by the AIGC model. The present application can automatically understand and generate the intelligent target application required by the user based on the information provided by the user, which reduces the development threshold, reduces manual work, reduces the development cost and maintenance threshold of the application, and helps to form an intelligent application ecology in the coal field and assist in the intelligent construction of coal mines.
[0061] Figure 3 is a flow chart of a method for generating an application according to an exemplary embodiment. Figure 3 As shown, the method for generating an application program in the embodiment of the present application includes but is not limited to the following steps:
[0062] S301, obtaining knowledge information in the coal field, extracting a summary of the knowledge information using a knowledge enhancement framework, and obtaining a knowledge summary of the knowledge information.
[0063] In some implementations, the knowledge enhancement framework can extract keywords, compress sentences, abstract and summarize the input knowledge information to extract knowledge summaries from the knowledge information. The knowledge summaries include keywords, relationship chains and conclusions in the knowledge information, so that the core content of the knowledge information can be quickly understood.
[0064] S302, constructing a coal field knowledge base based on knowledge information and knowledge summary.
[0065] Optionally, a coal field knowledge base can be obtained by initializing a database and writing knowledge information and knowledge summaries into the initialized database.
[0066] S303, obtaining the corresponding relationships between entities in the coal field, and constructing a knowledge graph in the coal field based on the coal field knowledge base and the corresponding relationships.
[0067] In some implementations, entities in the coal field in the coal field knowledge base may be identified and corresponding relationships between entities may be obtained, wherein entities in the coal field include but are not limited to: coal resources, coal mines, coal products, coal processing equipment, and the like.
[0068] Furthermore, by identifying the correspondence between entities in the coal field, and taking the entities in the coal field as nodes in the coal field knowledge graph, and taking the correspondence between entities as edges in the coal field knowledge graph, and then connecting the nodes and edges, a coal field knowledge graph is obtained.
[0069] To illustrate by way of example, if the entities in the coal field are coal resources, coal mines, and coal products, then there is a corresponding relationship between coal resources and coal mines: coal resources are the objects of coal mining, and coal mines are the places where coal resources are mined; there is a corresponding relationship between coal mines and coal products: coal mines produce coal products through mining and processing activities.
[0070] S304, obtaining user input information, and determining prompt information of the AIGC model based on the input information, the coal field knowledge base and the coal field knowledge graph.
[0071] In the embodiment of the present application, the implementation method of step S304 can be implemented by any method in the embodiments of the present application, which is not limited here and will not be repeated.
[0072] S305, inputting the prompt information into the AIGC model, and the AIGC model generates a target application in the coal field based on the prompt information.
[0073] In the embodiment of the present application, the implementation method of step S305 can be implemented by any method in the embodiments of the present application, which is not limited here and will not be repeated.
[0074] In the method for generating an application provided in the embodiment of the present application, by acquiring knowledge information in the coal field, and based on the knowledge enhancement framework in the coal field, determining the knowledge summary of the knowledge information, and then based on the knowledge summary and the knowledge information, a knowledge base in the coal field can be constructed. Further, according to the corresponding relationship between the entities in the knowledge base, a knowledge graph in the coal field is constructed. Then, the coal field knowledge base and the coal field knowledge graph can be retrieved according to the user's input information to obtain the prompt information of the AIGC model. By inputting the prompt information into the AIGC model, the target application can be generated by the AIGC model. The present application can automatically understand and generate the intelligent target application required by the user based on the information provided by the user, which reduces the development threshold, reduces manual work, reduces the development cost and maintenance threshold of the application, and helps to form an intelligent application ecology in the coal field and assist in the intelligent construction of coal mines.
[0075] Figure 4 is a flow chart of a method for generating an application according to an exemplary embodiment. Figure 4 As shown, the method for generating an application program in the embodiment of the present application includes but is not limited to the following steps:
[0076] S401, obtaining knowledge information in the coal field, and inputting the knowledge information into a knowledge enhancement framework in the coal field to construct a knowledge base and a knowledge graph in the coal field.
[0077] In the embodiment of the present application, the implementation method of step S401 can be implemented by any method in the embodiments of the present application, which is not limited here and will not be repeated.
[0078] S402, obtaining user input information, and determining prompt information of the AIGC model based on the input information, the coal field knowledge base and the coal field knowledge graph.
[0079] In the embodiment of the present application, the implementation method of step S402 can be implemented by any method in the embodiments of the present application, which is not limited here and will not be repeated.
[0080] S403, inputting the prompt information into the AIGC model, and the AIGC model generates the engineering code required to build the application based on the prompt information, and the engineering code consists of candidate codes of multiple components.
[0081] In some implementations, the AIGC model can generate candidate codes for multiple components required to build an application based on the prompt information, and combine the candidate codes to obtain engineering codes. Optionally, the AIGC model can generate multiple candidate codes using code generation capabilities.
[0082] Optionally, the AIGC model can also generate engineering codes required by the target application according to prompt information by calling the code generation platform component and using the code generation platform component.
[0083] S404, compile the engineering code to build a target application.
[0084] In some implementations, in order to ensure the accuracy of the code and the integrity of the generated application, the accuracy of the engineering code can be detected before the engineering code is compiled. In other words, the engineering code can be detected, and after the error information is detected, the engineering code can be optimized according to the error information to obtain the target engineering code.
[0085] Optionally, the type and location of the error can be identified based on the error information to determine the code segment where the error occurs in the project code, and the code segment can be modified to optimize the code to obtain the target project code, and then the target application can be built based on the target project code. That is, the target project code is compiled to obtain the target application.
[0086] In some implementations, after the target application is generated, the performance of the AIGC model can be verified based on the target application, by inputting input information into the target application, obtaining the output result of the target application, and obtaining a reference result corresponding to the input information. By judging whether there is a deviation between the output result and the reference result, it is determined whether the performance of the AIGC model has passed the verification.
[0087] Optionally, if there is no deviation between the output result and the reference result, it is determined that the AIGC model has passed the verification; if there is a deviation, it is determined that the AIGC model has not passed the verification, and the AIGC model is adjusted, and the components of the target application are improved using the adjusted AIGC model.
[0088] Optionally, the loss function of the AIGC model may be determined based on the output result and the reference result, and the model parameters of the AIGC model may be adjusted based on the loss function.
[0089] Optionally, the adjusted AIGC model can be used to improve the components of the target application. For example, if there is a "confirm" button in the interface of the target application, the button can be improved based on the AIGC model, and the text, color, style, etc. of the button can be changed to improve the target application.
[0090] In the method for generating an application provided in the embodiment of the present application, by acquiring knowledge information in the coal field and based on the knowledge enhancement framework in the coal field, a knowledge base in the coal field and a knowledge graph in the coal field are constructed. Then, the coal field knowledge base and the coal field knowledge graph can be retrieved according to the user's input information to obtain the prompt information of the AIGC model. By inputting the prompt information into the AIGC model, the engineering code of the application can be generated by the AIGC model, and the engineering code can be compiled to obtain the target application. The present application can automatically understand and generate the intelligent target application required by the user based on the information provided by the user, thereby lowering the development threshold, reducing manual work, and reducing the development cost and maintenance threshold of the application, which is conducive to forming an intelligent application ecology in the coal field and assisting the intelligent construction of coal mines.
[0091] Figure 5 Shown is a structural diagram for generating a target application. The structural diagram includes: data layer, model layer, platform layer, and application layer. Among them, the data layer consists of two layers. The bottom layer is basic knowledge data, including knowledge information in the coal field, such as knowledge documents and charts, coding specifications and requirements, industry production database tables, industry code bases, and low-code platform component libraries. The upper layer is the processing and abstraction of the underlying data, including the coal field knowledge base and coal field knowledge graph processed in accordance with the coal field knowledge enhancement framework, providing coal field knowledge. The model layer includes the AIGC model, which can receive the needs issued by users at the application layer, that is, input information, combined with the data layer domain knowledge, and respond to user needs to generate the target application. The platform layer includes a low-code platform, which receives the engineering code output by the model layer and finally generates the target application.
[0092] Figure 6 The flowchart for generating the target application is shown. In the offline preparation stage, by obtaining coal domain knowledge documents and diagrams, coding specifications and requirements, coal mine production database tables, coal domain code bases, low-code platform components and other information, and using the knowledge enhancement framework in the coal domain, the knowledge summary of the indication information is extracted, and the knowledge information and knowledge summary are combined to build a coal domain knowledge base, and the coal domain knowledge base is vectorized and stored. Further, the entity information in the coal domain knowledge base and the corresponding relationship between entities are identified. According to the entity information and the corresponding relationship, the coal domain knowledge graph can be constructed, and the entities in the coal domain knowledge graph are vectorized and stored.
[0093] In the application generation stage, the coal field knowledge base and coal field knowledge graph can be used as a knowledge search engine. By obtaining the user's input information and guiding the user to complete the input information through multiple rounds of dialogue, the knowledge search engine is searched using the vector representation of the improved input information to obtain the target search results, and the target search results and the improved input information are input into the prompt word assembler to obtain the prompt information of the AIGC model. By inputting the prompt information into the AIGC model, the AIGC model can call the low-code platform to generate the engineering code required to build the application, and use the code self-tester to test the engineering code. When an error is detected, the AIGC model optimizes the engineering code to obtain the target engineering code, and generates the target application based on the low-code platform and the target engineering code. After obtaining the target application, the target application and the AIGC model can also be verified based on the user's input information.
[0094] In order to implement the above embodiment, the present application also proposes a device for generating an application program.
[0095] Figure 7 A schematic diagram of the structure of a device for generating an application program provided in an embodiment of the present application.
[0096] like Figure 7 As shown, the application generating device 700 includes:
[0097] A construction module 701 is used to obtain knowledge information in the coal field and input the knowledge information into a knowledge enhancement framework in the coal field to construct a coal field knowledge base and a coal field knowledge graph;
[0098] A determination module 702 is used to obtain user input information, and determine prompt information of a generative artificial intelligence AIGC model based on the input information, the coal field knowledge base and the coal field knowledge graph;
[0099] The generation module 703 is used to input the prompt information into the AIGC model, and the AIGC model generates a target application in the coal field based on the prompt information.
[0100] In a possible implementation of an embodiment of the present application, the determination module 702 is also used to: search the coal field knowledge base based on the input information to obtain a first search result; search the coal field knowledge graph based on the input information to obtain a second search result; obtain a target search result based on the first search result and the second search result; obtain a reference template, and input the target search result and the input information into the reference template to obtain the prompt information.
[0101] In a possible implementation of an embodiment of the present application, the determination module 702 is also used to: obtain a first vector representation of the input information; obtain a second vector representation of the knowledge summary in the coal field knowledge base; based on a first similarity between the first vector representation and the second vector representation, obtain a first candidate retrieval result in the coal field knowledge base that matches the input information, the first candidate retrieval result including multiple candidate text blocks; based on the second similarity between the input information and the candidate text blocks, determine the first retrieval result from the first candidate retrieval results.
[0102] In a possible implementation of an embodiment of the present application, the determination module 702 is also used to: perform entity recognition on the input information, and vectorize the identified entities to obtain a third vector representation; obtain a fourth vector representation of the candidate entities in the coal field knowledge graph; based on the third similarity between the third vector representation and the fourth vector representation, determine the target entity from the candidate entities, obtain the entity subgraph of the target entity, and textualize the entity subgraph to obtain the second search result.
[0103] In a possible implementation of an embodiment of the present application, the construction module 701 is also used to: extract a summary of the knowledge information by the knowledge enhancement framework to obtain a knowledge summary of the knowledge information; construct the coal field knowledge base based on the knowledge information and the knowledge summary; obtain the correspondence between entities in the coal field, and construct the coal field knowledge graph based on the coal field knowledge base and the correspondence.
[0104] In a possible implementation of an embodiment of the present application, the generation module 703 is also used for: the AIGC model generates engineering code required to build an application based on the prompt information, and the engineering code is composed of candidate codes of multiple components; and the engineering code is compiled to build the target application.
[0105] In a possible implementation of an embodiment of the present application, the generation module 703 is also used to: detect the engineering code, and after detecting error information, optimize the engineering code according to the error information to obtain a target engineering code; and build the target application based on the target engineering code.
[0106] In a possible implementation of an embodiment of the present application, the generation module 703 is further used to: input the input information into the target application, obtain the output result of the target application, and obtain the reference result corresponding to the input information; determine whether there is a deviation between the output result and the reference result; if there is a deviation, determine that the AIGC model has not passed the verification, adjust the AIGC model, and use the adjusted AIGC model to improve the components of the target application.
[0107] In the generation device of the application provided in the embodiment of the present application, by acquiring knowledge information in the coal field and based on the knowledge enhancement framework in the coal field, a knowledge base in the coal field and a knowledge graph in the coal field are constructed. Then, the coal field knowledge base and the coal field knowledge graph can be retrieved according to the user's input information to obtain the prompt information of the AIGC model. By inputting the prompt information into the AIGC model, the target application can be generated by the AIGC model. The present application can automatically understand and generate the intelligent target application required by the user based on the information provided by the user, which lowers the development threshold, reduces manual work, reduces the development cost and maintenance threshold of the application, and helps to form an intelligent application ecology in the coal field and assist in the intelligent construction of coal mines.
[0108] It should be noted that the above explanation of the embodiment of the method for generating an application is also applicable to the device for generating an application in this embodiment, and will not be repeated here.
[0109] In order to implement the above embodiments, the present application also proposes an electronic device, comprising: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method provided by the above embodiments.
[0110] The collection, storage, use, processing, transmission, provision and application of user personal information involved in this application are in compliance with relevant laws and regulations and do not violate public order and good morals.
[0111] It should be noted that personal information from users should be collected for legitimate and reasonable purposes and should not be shared or sold outside of these legitimate uses. In addition, such collection / sharing should be carried out after receiving the user's informed consent, including but not limited to notifying the user to read the user agreement / user notice and sign the agreement / authorization including authorization of relevant user information before the user uses the function. In addition, any necessary steps should be taken to protect and safeguard access to such personal information data and ensure that others who have access to personal information data comply with its privacy policy and procedures.
[0112] This application is expected to provide an implementation scheme for users to selectively block the use or access of personal information data. That is, this application is expected to provide hardware and / or software to prevent or block access to such personal information data. Once the personal information data is no longer needed, risks can be minimized by limiting data collection and deleting data. In addition, when applicable, personal identifiers are removed from such personal information to protect the privacy of users.
[0113] In the description of the aforementioned embodiments, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0114] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0115] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0116] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute the instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0117] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0118] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0119] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0120] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. A method for generating an application, characterized in that: The method comprises: Acquire knowledge information in the coal field, and input the knowledge information into a knowledge enhancement framework in the coal field to construct a coal field knowledge base and a coal field knowledge graph; Obtain user input information, and determine prompt information of the generative artificial intelligence AIGC model based on the input information, the coal field knowledge base and the coal field knowledge graph; The prompt information is input into the AIGC model, and the AIGC model generates a target application in the coal field based on the prompt information.
2. The method according to claim 1, characterized in that The step of determining prompt information of a generative artificial intelligence AIGC model based on the input information, the coal field knowledge base and the coal field knowledge graph includes: Based on the input information, searching the coal field knowledge base to obtain a first search result; Based on the input information, searching the coal field knowledge graph to obtain a second search result; Obtaining a target search result based on the first search result and the second search result; A reference template is obtained, and the target search result and the input information are input into the reference template to obtain the prompt information.
3. The method according to claim 2, characterized in that The process of obtaining the first search result includes: Obtaining a first vector representation of the input information; Obtaining a second vector representation of the knowledge summary in the coal field knowledge base; Based on a first similarity between the first vector representation and the second vector representation, obtaining a first candidate search result matching the input information in the coal field knowledge base, wherein the first candidate search result includes a plurality of candidate text blocks; Based on a second similarity between the input information and the candidate text block, the first search result is determined from the first candidate search results.
4. The method according to claim 2, characterized in that: The process of obtaining the second search result includes: Performing entity recognition on the input information, and vectorizing the recognized entities to obtain a third vector representation; Obtaining a fourth vector representation of the candidate entity in the coal field knowledge graph; Based on the third similarity between the third vector representation and the fourth vector representation, a target entity is determined from the candidate entities, an entity subgraph of the target entity is obtained, and the entity subgraph is textualized to obtain the second search result.
5. The method according to claim 1, characterized in that The step of inputting the knowledge information into the knowledge enhancement framework in the coal field to construct a coal field knowledge base and a coal field knowledge graph includes: The knowledge enhancement framework extracts a summary of the knowledge information to obtain a knowledge summary of the knowledge information; Based on the knowledge information and the knowledge summary, construct the coal field knowledge base; The corresponding relationships between entities in the coal field are obtained, and based on the coal field knowledge base and the corresponding relationships, the coal field knowledge graph is constructed.
6. The method according to claim 1, characterized in that The AIGC model generates a target application in the coal field based on the prompt information, including: The AIGC model generates engineering code required to build the application based on the prompt information, wherein the engineering code is composed of candidate codes of multiple components; The engineering code is compiled to build the target application.
7. The method according to claim 6, characterized in that The compiling of the engineering code to build the target application includes: Detecting the engineering code, and after detecting error information, optimizing the engineering code according to the error information to obtain a target engineering code; Based on the target engineering code, the target application is constructed.
8. The method according to claim 1, characterized in that After the AIGC model generates a target application in the coal field based on the prompt information, the method further includes: Inputting the input information into the target application, obtaining an output result of the target application, and acquiring a reference result corresponding to the input information; Determining whether there is a deviation between the output result and the reference result; If there is a deviation, it is determined that the AIGC model has not passed the verification, and the AIGC model is adjusted, and the components of the target application are improved using the adjusted AIGC model.
9. A device for generating an application, characterized in that: The device comprises: A construction module is used to obtain knowledge information in the coal field and input the knowledge information into a knowledge enhancement framework in the coal field to construct a coal field knowledge base and a coal field knowledge graph; A determination module, used to obtain user input information, and determine prompt information of a generative artificial intelligence AIGC model based on the input information, the coal field knowledge base and the coal field knowledge graph; A generation module is used to input the prompt information into the AIGC model, and the AIGC model generates a target application in the coal field based on the prompt information.
10. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 8.
Citation Information
Cited By
Data generation method and device, computer equipment, readable storage medium and program product
CN120144116A
Data generation method and device, computer device, readable storage medium and program product
CN120144116B
Target embedded code generation method and device, electronic equipment and storage medium
CN120704694A
