Search

CN-121979509-A - Intelligent coding method, device and equipment for calling private domain component based on large model

CN121979509ACN 121979509 ACN121979509 ACN 121979509ACN-121979509-A

Abstract

The application discloses an intelligent coding method, device and equipment for calling a private domain component based on a large model. The method comprises the steps of responding to an input coding request, extracting keywords of the coding request based on a large model, searching each component matched with the keywords in a component vector library to obtain identifications corresponding to each component, and calling domain-specific language files corresponding to each component from a component file library based on each identification to generate codes. By the method, the retrieval efficiency and accuracy of the large model to the component can be improved, and the large model can read and understand the component document like a human developer by constructing the standardized domain-specific language file which can be understood, parsed and called for the component, and complete component information is reserved, so that a solid data base is provided for the large model to understand and call the private domain component.

Inventors

  • LU WANBING

Assignees

  • 广东华之源信息工程有限公司
  • 佳都科技集团股份有限公司
  • 广州佳都智通科技有限公司
  • 广州华佳软件有限公司

Dates

Publication Date
20260505
Application Date
20251203

Claims (10)

  1. 1. An intelligent encoding method for calling a private domain component based on a large model is characterized by comprising the following steps: responding to an input coding request, and extracting keywords of the coding request based on a big model; retrieving each component matched with the keyword from a component vector library to obtain a corresponding identifier of each component; And calling the domain-specific language files corresponding to the components from the component file library based on the identifications to generate codes.
  2. 2. The intelligent coding method based on the large model calling private domain component as claimed in claim 1, wherein the component at least comprises a source code file, and the domain specific language file construction process comprises the following steps: extracting core meta-information in the source code file based on the large model; and mapping the core meta information to a corresponding field of a preset domain-specific language structure to obtain an initial domain-specific language file so as to construct the domain-specific language file.
  3. 3. The intelligent encoding method based on large model call private domain component according to claim 2, wherein the component further comprises an explanatory document and a type definition file, and further comprising, after obtaining the initial domain-specific language file: Based on the large model, carrying out semantic extraction and structuring on the description text file to obtain structured description information; Analyzing the type labels in the type definition file based on the large model to obtain type information; Mapping the specification information and the type information to corresponding fields of the initial domain-specific language file to construct the domain-specific language file.
  4. 4. The intelligent encoding method based on large model call private domain component according to claim 2, further comprising, after obtaining the initial domain-specific language file: in response to the component including an example code file, based on the large model, extracting the example code file and mapping to corresponding fields of the initial domain-specific language file to construct the domain-specific language file; in response to the component not including an example code file, generating example code corresponding to the core meta information based on the core meta information and the large model, and mapping the example code to a corresponding field of the initial domain-specific language file to construct the domain-specific language file.
  5. 5. The intelligent encoding method based on large model call private domain component according to claim 2, comprising, after constructing the domain-specific language file: establishing index mapping between the identification of each component and the corresponding domain-specific language file, and constructing a component file library; vectorizing each domain-specific language file to obtain domain-specific language vectors, and constructing the component vector library.
  6. 6. The intelligent encoding method based on large model call private domain component of claim 5, further comprising: And updating the domain-specific language file and the domain-specific language vector corresponding to the component based on an incremental update mechanism in response to the source code file change of the component.
  7. 7. The intelligent encoding method based on large model call private domain component according to claim 1, further comprising, after generating the code: validating the code based on the large model and each of the invoked domain-specific language files; In response to the verification failure, the large model corrects the code based on the returned error information and re-verifies until the verification is successful.
  8. 8. An intelligent encoding device for calling a private domain component based on a large model is characterized by comprising: the extraction module is used for responding to the input coding request and extracting keywords of the coding request based on a large model; the retrieval module is used for retrieving each component matched with the keyword in the component vector library to obtain the identification corresponding to each component; and the generation module is used for calling the domain-specific language files corresponding to the components from the component file library based on the identifications and generating codes.
  9. 9. A computer device comprising a memory, a processor and a computer program stored on the memory, characterized in that the processor executes the computer program to implement the steps of the intelligent encoding method of a large model-based calling private domain component of any of claims 1-7.
  10. 10. A storage medium having stored thereon a computer program, which when executed by a processor implements the steps of the large model call private component based intelligent encoding method of any of claims 1-7.

Description

Intelligent coding method, device and equipment for calling private domain component based on large model Technical Field The application relates to the field of intelligent coding, in particular to an intelligent coding method, device and equipment for calling a private domain component based on a large model. Background With the rapid development of large model (Large Language Model, LLM) technology, AI-assisted coding has become a dominant trend in software development. However, knowledge of large models comes primarily from generic training data (e.g., open source code and publications), and code based on generic frameworks (e.g., vue, act, ANT DESIGN, etc.) can be generated. However, there is a key problem in the actual development scenario of enterprises, that is, the enterprises will generally package a large number of service component libraries (such as components based on the frameworks of Vue and practice) according to their own service characteristics. These privacy components carry business logic, design specifications, and best practices for the enterprise project and are an important component of the enterprise digital asset. However, to allow the large model to use these business components, the large model is able to understand which components can be invoked and how to invoke correctly. At present, the main stream of understanding the private domain component by the large model is that the related files (source codes and documents) of the component are subjected to knowledge base slicing, vectorized and stored, and related information is obtained through vector retrieval when in use. However, this slicing scheme has the following problems: 1. The information splitting and losing, namely the complete information (source code, type, document and example) of a component can be split into 20-30 fragments, and when a large model is searched, only Top-K (e.g. 5-10) related slices can be usually obtained, and key information can be scattered in the slices which are not searched, so that the information is incomplete; 2. Context fracture, namely breaking original coherent context relation by slicing, wherein Props definitions, use examples and notes are dispersed in different slices, correlation is lost, and a large model needs to 'reasoning and splice' contents of a plurality of slices, so that understanding deviation is easy to generate; 3. The retrieval accuracy is low, namely, the user natural language description and the semantic matching of the slice content have deviation, the wrong components can be retrieved or the correct components are omitted, and when the number of the components is large (hundreds), the retrieval noise is larger; 4. Information redundancy and noise, namely, a large amount of implementation details (such as internal functions and style codes) are contained in source codes, so that the source codes are not helpful to large-model calling components, the token is wasted, a large amount of example screenshot and long description can be contained in a document, and the efficiency is low after slicing; 5. The maintenance cost is high, the document and the code are possibly inconsistent due to the need of re-slicing and indexing after the component source code is updated, the slicing management of the multi-component library is complex, and the version confusion is easy to occur. Therefore, how to make a large model quickly and accurately find the correct component and obtain complete and accurate call information under the conditions of huge component quantity, scattered information and numerous files becomes a key problem to be solved urgently. Disclosure of Invention The application mainly provides an intelligent coding method, device and equipment based on a large model calling private domain component, which are used for solving the problems of low retrieval efficiency and accuracy and incomplete component information acquisition when the existing large model calling private domain component codes. In order to solve the technical problems, the technical scheme adopted by the application is to provide an intelligent coding method for calling a private domain component based on a large model. The method comprises the following steps: responding to an input coding request, and extracting keywords of the coding request based on a big model; retrieving each component matched with the keyword from a component vector library to obtain a corresponding identifier of each component; And calling the domain-specific language files corresponding to the components from the component file library based on the identifications to generate codes. In an optional implementation manner of the embodiment of the present application, the component at least includes a source code file, and the domain-specific language file construction process includes: extracting core meta-information in the source code file based on the large model; and mapping the core meta information to a corresponding fie