Knowledge base cold start method based on BI multi-source data set
Through LLM, the BI multi-source data set is mined and the ChatBI knowledge base is automatically built, which solves the problem of manual sorting during the cold start of the intelligent Q&A product knowledge base, improves the implementation speed and efficiency, and lowers the technical threshold.
Patent Information
- Application Number
- CN202411745692.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2044-12-02
AI Technical Summary
Existing smart Q&A products need to be manually sorted and built during the cold start of the knowledge base, resulting in high technical threshold, slow implementation speed, long development cycle, and data analysts need to have professional skills, which increases the difficulty of implementing data analysis scenarios.
Using the cold start method of knowledge base based on BI multi-source data sets, BI configuration metadata is mined through LLM, and the indicator definition list and general logic list are generated, and the ChatBI knowledge base is integrated to build a ChatBI knowledge base and automate it. Complete the cold start of the knowledge base.
It lowers the technical threshold for knowledge base construction, improves the efficiency and speed of cold start of knowledge base, shortens the development cycle, saves data analysts' time and manpower, and realizes the rapid implementation of intelligent question-and-answer products.
Smart Images

Figure CN119226488A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of BI intelligent question answering technology, and in particular to a knowledge base cold start method based on a BI multi-source data set, a knowledge base cold start device based on a BI multi-source data set, an electronic device and a computer-readable storage medium. Background Art
[0002] The core function of the ChatBI product (an intelligent question-and-answer product) is to respond to users' data analysis needs by using LLM (Large Language Model) and RAG (Retrieval-Augmented Generation) technology based on domain knowledge base.
[0003] In the actual application of ChatBI products, since the domain analysis knowledge mastered by data analysts is often scattered among various data assets already in the enterprise, manual sorting is required to complete the construction of the domain knowledge base from scratch, that is, the knowledge base cold start. The steps of manual sorting and construction of the knowledge base cold start generally involve: Determine the knowledge base topic and scope; Collect information and data in relevant fields; Design the knowledge base structure; Develop data entry specifications; Perform data entry and cleansing; Establish knowledge indexing and retrieval mechanisms; Develop user interfaces and interactive features; Question and answer testing and knowledge base optimization; The knowledge base is online and operational; Regularly update and maintain knowledge base content.
[0004] Therefore, the cold start of the knowledge base requires data analysts to have strong professional skills and technical thresholds. This link will significantly increase the threshold for the implementation of such AI applications, reduce the implementation and application speed of intelligent question-and-answer products, and extend the development cycle.
[0005] Therefore, achieving automated and efficient cold start of the data analysis scenario knowledge base is an important capability for the rapid implementation and application of intelligent question-and-answer products, and it needs to be solved urgently. Summary of the invention
[0006] In order to solve the technical problems existing in the prior art, the present invention provides the following technical solutions: On the one hand, a knowledge base cold start method based on BI multi-source data set is provided, the method is implemented by an electronic device, and the method includes: S1. Input BI configuration metadata; S2. Perform indicator scope mining on the BI configuration metadata based on LLM, obtain the defined indicator scope and generate an indicator definition list; S3. Perform data screening logic mining on the BI configuration metadata based on LLM, obtain the defined data screening logic and generate a general logic list; S4. Integrate the indicator definition list and the general logic list based on LLM to obtain a knowledge list for building the ChatBI knowledge base.
[0007] Preferably, S2, based on LLM, performs indicator caliber mining on the BI configuration metadata, obtains the defined indicator caliber and generates an indicator definition list, including: Obtaining some of the BI configuration metadata and performing preprocessing; According to preset indicator filtering rules, the pre-processed BI configuration metadata is subjected to indicator filtering processing to generate noise reduction configuration metadata; Calling LLM to batch identify and mine the indicator calibers in the metadata of each noise reduction configuration to obtain batch generated indicator calibers; The indicator calibers generated in batches are summarized to generate the indicator caliber list.
[0008] Preferably, the calling of LLM to batch identify the indicator calibers in the noise reduction configuration metadata to obtain batch generated indicator calibers includes: According to the caliber of the indicator to be mined, corresponding mining keywords and the first mining logic are configured, wherein the mining keywords at least include the following keywords: indicator name, alias, type, source and / or time period; Constructing a first LLM prompt word according to the mining keyword and the first mining logic, and inputting the first LLM prompt word into a preset LLM; Through the LLM, the indicator calibers in each of the noise reduction configuration metadata are traversed and identified based on the first LLM prompt word, and the corresponding indicator calibers are output in batches to obtain the batch-generated indicator calibers.
[0009] Preferably, S3, based on LLM, performs data screening logic mining on the BI configuration metadata, obtains the defined data screening logic and generates a general logic list, including: Obtaining some of the BI configuration metadata and performing preprocessing; According to a preset grouping rule, the pre-processed BI configuration metadata is grouped to generate a number of metadata grouping data; Calling LLM to batch identify and mine the data screening logic in each metadata grouping data to obtain batch generated data screening logic; The data screening logic generated in batches is logically summarized to generate the general logic list.
[0010] Preferably, the calling of LLM to batch identify and mine the data screening logic in each metadata group data to obtain the batch generated data screening logic includes: According to the data screening logic to be mined, corresponding logical keywords and second mining logic are configured, wherein the logical keywords at least include the following keywords: indicator proportion, indicator level, indicator quota and / or indicator calculation formula; Constructing a second LLM prompt word according to the logical keyword and the second mining logic, and inputting the second LLM prompt word into a preset LLM; Through the LLM, the data screening logic in each of the metadata grouping data is traversed and identified based on the second LLM prompt word, and the corresponding data screening logic is output in batches to obtain the batch-generated data screening logic.
[0011] Preferably, the grouping rules include: Use the LLM embedding model to vectorize the indicator names of the indicators in the BI configuration metadata; Calculate the vector similarity of different indicator names; The BI configuration metadata is clustered and grouped according to the vector similarity.
[0012] Preferably, S4, integrating the indicator definition list and the general logic list based on LLM to obtain a knowledge list for building a ChatBI knowledge base, including: Integrate the indicator definition list and the general logic list to obtain a knowledge content list; De-duplication processing is performed on each knowledge text in the knowledge content list according to the character string; Use the LLM embedding model to vectorize the indicator name of each knowledge text; Calculating the vector similarity of different knowledge texts; The knowledge content list is clustered and grouped according to the vector similarity to obtain a plurality of knowledge texts, and the knowledge texts are integrated into the knowledge list and used to construct the ChatBI knowledge base.
[0013] On the other hand, a knowledge base cold start device based on a BI multi-source data set is provided, and the knowledge base cold start device based on a BI multi-source data set is used to implement the above-mentioned knowledge base cold start method based on a BI multi-source data set, and the device includes: Data input module, used to input BI configuration metadata; An indicator caliber mining module, used to perform indicator caliber mining on the BI configuration metadata based on LLM, obtain the defined indicator caliber and generate an indicator definition list; A logic mining module, used to perform data screening logic mining on the BI configuration metadata based on the LLM, obtain the defined data screening logic and generate a general logic list; The knowledge integration module is used to integrate the indicator definition list and the general logic list based on LLM to obtain a knowledge list for building the ChatBI knowledge base.
[0014] On the other hand, an electronic device is provided, comprising: a processor; a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, any one of the above-mentioned knowledge base cold start methods based on BI multi-source data sets is implemented.
[0015] On the other hand, a computer-readable storage medium is provided, in which at least one instruction is stored. The at least one instruction is loaded and executed by a processor to implement any one of the above-mentioned knowledge base cold start methods based on BI multi-source data sets.
[0016] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least: The present invention mines the indicator caliber of BI configuration metadata based on LLM, obtains the defined indicator caliber and generates an indicator definition list; mines the data screening logic of BI configuration metadata based on LLM, obtains the defined data screening logic and generates a general logic list; integrates the indicator definition list and the general logic list based on LLM to obtain a knowledge list for building a ChatBI knowledge base. LLM can be used to mine the metadata of existing data assets (including analysis dashboards, chart cards, and related data tables) on the platform, extract relevant knowledge content, including indicator caliber definition, data screening logic, etc., so as to build a ChatBI knowledge base. LLM can replace manual completion of corresponding indicator mining and logical retrieval, and integrate the mined knowledge to build the ChatBI knowledge base, thereby realizing automated and efficient cold start of the data analysis scenario knowledge base, greatly reducing the difficulty of combing asset knowledge and knowledge integration time, reducing the technical threshold of cold start, greatly accelerating the application and landing progress of BI intelligent question and answer products, and shortening the development cycle. In addition, it can also save a lot of time, manpower and energy for data analysts. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0018] Figure 1 This is a flow chart of a knowledge base cold start method based on a BI multi-source data set provided by an embodiment of the present invention; Figure 2 It is a schematic diagram of an indicator filtering for deleting "unnamed" indicator knowledge provided by an embodiment of the present invention; Figure 3 It is a logical schematic diagram of using LLM to summarize indicators for metadata information (Prompt) of multiple chart cards of the same table provided by an embodiment of the present invention; Figure 4 It is a logical schematic diagram of grouping data provided by an embodiment of the present invention; Figure 5 It is a logic diagram of an integrated knowledge list provided by an embodiment of the present invention; Figure 6 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0019] The technical solution of the present invention is described below in conjunction with the accompanying drawings.
[0020] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "example" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "example" is intended to present the concept in a specific way. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or it can be either of the two.
[0021] In the embodiments of the present invention, "image" and "picture" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same. "of", "corresponding, relevant" and "corresponding" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same.
[0022] In the embodiments of the present invention, sometimes a subscript such as W1 may be mistakenly written as a non-subscript such as W1. When the difference is not emphasized, the meanings to be expressed are consistent.
[0023] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0024] The embodiment of the present invention provides a knowledge base cold start method based on BI multi-source data set, which can be implemented by an electronic device, and the electronic device can be a terminal or a server. Figure 1 The flowchart of the knowledge base cold start method based on BI multi-source data set is shown. The processing flow of the method may include the following steps: S1. Input BI configuration metadata; S2. Perform indicator scope mining on the BI configuration metadata based on LLM, obtain the defined indicator scope and generate an indicator definition list; S3. Perform data screening logic mining on the BI configuration metadata based on LLM, obtain the defined data screening logic and generate a general logic list; S4. Integrate the indicator definition list and the general logic list based on LLM to obtain a knowledge list for building the ChatBI knowledge base.
[0025] BI configuration metadata includes metadata of various data assets (including analytical dashboards, chart cards, and related data tables). The specific metadata can be determined based on the type of enterprise data assets.
[0026] The present invention uses LLM to mine knowledge in metadata, including the indicator caliber of knowledge and data screening logic. Finally, LLM integrates the indicator caliber and data screening logic to generate a knowledge list for building the ChatBI knowledge base and complete the cold start of the knowledge base. It realizes automatic and efficient cold start of the data analysis scenario knowledge base, greatly improving the efficiency of knowledge mining and shortening the research and development and application cycle of ChatBI products.
[0027] The following will describe the LLM mining and the entire knowledge process.
[0028] Preferably, S2, based on LLM, performs indicator caliber mining on the BI configuration metadata, obtains the defined indicator caliber and generates an indicator definition list, including: Obtaining some of the BI configuration metadata and performing preprocessing; According to preset indicator filtering rules, the pre-processed BI configuration metadata is subjected to indicator filtering processing to generate noise reduction configuration metadata; Calling LLM to batch identify and mine the indicator calibers in the metadata of each noise reduction configuration to obtain batch generated indicator calibers; The indicator calibers generated in batches are summarized to generate the indicator caliber list.
[0029] The expression of “indicator caliber” knowledge: The knowledge of "indicator caliber" mainly includes indicator names, aliases, and logical definitions. The main source of this knowledge is the configuration items such as Metric, Filters, Sorting, etc. in the BI chart card configuration information, which together define which (or which) fields each indicator in the card is obtained through what processing method. Among them, the specific metadata of Metric is the most complex, including the original field name, indicator name (may be empty), formula definition, value type, and other special value processing logic such as percentage calculation.
[0030] The specific knowledge mining methods are as follows: 1. Rule preprocessing. These metadata need to be preprocessed by rules first. Since the metadata structure design is originally for product function development, there will be some logic that is assisted by code comments and other methods to assist manual understanding and maintenance. In order to reduce the difficulty of understanding, the necessary parts will be uniformly preprocessed and converted directly. For example, "GE" in the filter condition configuration is the abbreviation of "greater than or equal to", which will be replaced by the comparison operator ">=".
[0031] 2. Filtering of special indicators. Not all metric configuration items in metadata need to be summarized as one indicator knowledge, and there will be noise. The situations that need to be filtered include but are not limited to: the formula is a constant, the indicator name has no actual meaning, and the definition is common sense. Figure 2 As shown, the “unnamed” indicator knowledge is deleted.
[0032] Special indicator filtering: Not all metric configuration items in metadata need to be summarized as one indicator knowledge, and there will be noise. Situations that need to be filtered include but are not limited to: formulas are constants, indicator names have no actual meaning, and definitions are common sense. For constants, you can directly use code logic judgment, while other situations require the introduction of LLM Agent to make judgments and complete filtering.
[0033] 3. Small batch summarization. To improve efficiency, when the LLM generation method is called once, the metadata information of multiple chart cards in the same table will be passed in, and repeated or highly similar indicators will be summarized.
[0034] like Figure 3 As shown in the figure, for the metadata information (Prompt) of multiple chart cards in the same table, LLM will be used to summarize the indicators. Note that the LLM agent (Agent) is used here to complete the indicator caliber mining of each metadata, so as to batch mine the indicator caliber in each metadata and summarize it into an indicator definition list.
[0035] Small batch summary: To improve efficiency, when calling the LLM generation method once, the metadata information of multiple chart cards of the same table will be passed in, and the LLM Agent will be required to summarize the indicators that appear repeatedly or are highly similar. Finally, the results of the summary after each call will be merged to obtain the final complete indicator definition list.
[0036] The specific method of using LLM to mine indicator caliber is as follows: Preferably, the calling of LLM to batch identify the indicator calibers in the noise reduction configuration metadata to obtain batch generated indicator calibers includes: According to the caliber of the indicator to be mined, corresponding mining keywords and the first mining logic are configured, wherein the mining keywords at least include the following keywords: indicator name, alias, type, source and / or time period; Constructing a first LLM prompt word according to the mining keyword and the first mining logic, and inputting the first LLM prompt word into a preset LLM; Through the LLM, the indicator calibers in each of the noise reduction configuration metadata are traversed and identified based on the first LLM prompt word, and the corresponding indicator calibers are output in batches to obtain the batch-generated indicator calibers.
[0037] In order to make LLM's knowledge mining more targeted, we construct prompt words here and input them into LLM so that it can learn the knowledge features that need to be mined this time.
[0038] First, we need to clarify the indicator scope to be mined, and configure the mining keywords and the first mining logic corresponding to the indicator scope, wherein the mining keywords include at least the following keywords: indicator name, alias, type, source and / or time period. The specific indicator scope mining keywords and mining logic can be constructed by the user according to the indicator characteristics of the metadata. The above is just an example, and can be expanded by the user to mine the indicator scope with the above mining keywords from the metadata.
[0039] To input the prompt words into the LLM large language model and use it for data mining, you can follow the following steps: Prompt word preparation: Carefully construct the prompt words to ensure that they clearly and accurately reflect the goals and needs of data mining. For details, see the mining keywords and mining logic constructed above, and the metadata configuration description text. For example, you can refer to the attached Figure 2 Business / sales indicators and their calculation logic shown in the metadata structure.
[0040] Prompt words may include keywords, phrases, questions, or instructions to guide the LLM to perform specific data mining tasks.
[0041] Prompt word input: Input the prepared prompt words into the LLM large language model. Specifically: According to the mining keywords and mining logic configured by the user, the indicator metadata and several preset prompt word template components are spliced to form the final complete prompt word, which is input into the LLM.
[0042] This is usually done through an API call, a command line interface, or a graphical user interface.
[0043] Model Processing: After receiving the prompt word, the LLM large language model will use its deep neural network structure and pre-trained knowledge base to process this information.
[0044] The model analyzes the semantics, context, and grammar of the prompt words to understand the user's intentions and needs.
[0045] Data Mining: Based on the understanding of the prompt words, LLM will perform corresponding data mining operations.
[0046] This may include text classification, entity recognition, relation extraction, etc.
[0047] LLM leverages its powerful language processing capabilities and pre-training experience to extract useful information and patterns.
[0048] Result Generation: LLM generates data mining results, which may be presented in text form. The results contain useful information and insights extracted from the input data.
[0049] The following is the use of LLM to mine the "data screening logic" knowledge in metadata. The same can be implemented by referring to the above description.
[0050] Preferably, S3, based on LLM, performs data screening logic mining on the BI configuration metadata, obtains the defined data screening logic and generates a general logic list, including: Obtaining some of the BI configuration metadata and performing preprocessing; According to a preset grouping rule, the pre-processed BI configuration metadata is grouped to generate a number of metadata grouping data; Calling LLM to batch identify and mine the data screening logic in each metadata grouping data to obtain batch generated data screening logic; The data screening logic generated in batches is logically summarized to generate the general logic list.
[0051] In addition to the caliber mining of each specific indicator, the general logic of some indicators of the same scenario / same type also needs to be summarized. The focus at this time is to find the commonality, that is, what query logic needs to be always adopted under which triggering scenarios. If all metadata descriptions are given to LLM at one time, on the one hand, the computing power overhead is very high, and on the other hand, a single round of traversal cannot quickly complete knowledge convergence. Therefore, in order to avoid giving all metadata descriptions to LLM at one time, the present invention adopts the method of grouping or clustering the chart cards in advance, and then giving each group of data to LLM separately, so as to solve this problem.
[0052] The specific grouping rules are as follows: Preferably, the grouping rules include: Use the LLM embedding model to vectorize the indicator names of the indicators in the BI configuration metadata; Calculate the vector similarity of different indicator names; The BI configuration metadata is clustered and grouped according to the vector similarity.
[0053] like Figure 4 As shown in the figure, for indicators, we first generate vectors using the LLM embedding model based on the indicator name and other information, and then perform clustering. For each type of similar indicator, if its calculation depends on similar but different fields, we can let LLM make a more accurate judgment and summarize the knowledge about how to select fields.
[0054] Specifically, for indicators, we first generate vectors based on the indicator name and other information using the LLM embedding model and then perform clustering. For each type of similar indicator, if its calculation relies on similar but different fields, we can let LLM make a more accurate judgment and summarize the knowledge about how to select fields. For the screening conditions, first, we screen out the high-frequency conditions based on metadata statistics, and group the chart cards where each high-frequency condition is located into a group for logical induction; second, we screen out the fields that are frequently selected but the conditions are not always consistent based on metadata statistics, and group the chart cards where different conditions are located into a group for distinguishing and summarizing, so as to finally derive the scope of scenarios where various screening logics should be effective; For sorting, it is usually sufficient to follow common sense (no need to summarize it into a piece of knowledge), but there may be a sorting direction that needs special attention. Therefore, the sorting conditions need to be grouped, and a number of chart cards are retained in each group. Each time, the ascending and descending card metadata of the same field are given to LLM together for judgment and summary.
[0055] The following steps are usually followed to vectorize the indicator names of data using the LLMembedded model: Data Preparation: Collect and organize data sets containing indicator names. These indicator names may be in text form, such as "GDP growth rate", "user satisfaction", etc.
[0056] Data Cleansing: Clean the indicator names, remove irrelevant characters, unify the format, and ensure the integrity and accuracy of the data.
[0057] Word segmentation and preprocessing: Use the word segmentation tool to split the indicator name into smaller text units (such as words or subwords).
[0058] Perform necessary preprocessing, such as stop word removal, lemmatization, or stemming, to simplify the text and reduce noise.
[0059] Load the LLM embedding model: Load a pre-trained LLM embedding model. This typically involves loading the model weights into memory and configuring the necessary model parameters.
[0060] Generate embedding vectors: Input the cleaned and preprocessed indicator names into the LLM embedding model.
[0061] The model outputs an embedding vector corresponding to each indicator name. These vectors are usually high-dimensional (such as hundreds or thousands of dimensions) and can capture the semantic relationship between indicator names.
[0062] Storing and using embedding vectors: Store the generated embedding vectors into an appropriate data structure such as an array, matrix, or database.
[0063] These embedding vectors can be used for subsequent machine learning tasks such as classification, clustering, similarity calculation, etc.
[0064] Vector similarity calculation, for example, using the cosine theorem for calculation, can refer to the description of the principle of similarity calculation using the cosine theorem.
[0065] To cluster data based on vector similarity, the following steps are usually followed: Data Preparation and Vectorization: First, make sure your data has been converted to vector form. This is usually achieved through feature extraction, embedding generation, or other methods, such as using a large language model (LLM) to generate embedding vectors for text data.
[0066] Choose a similarity measure: Determine the metric used to calculate the similarity between vectors. Common similarity metrics include cosine similarity, Euclidean distance, Manhattan distance, etc. The choice of which metric depends on the characteristics of the data and the needs of clustering.
[0067] Build a similarity matrix: Calculate the similarity between all pairs of vectors in the dataset and construct a similarity matrix. Each element of the matrix represents the similarity between the corresponding vectors.
[0068] Choose a clustering algorithm: Choose an appropriate clustering algorithm based on the characteristics of the data and the requirements of clustering. Common clustering algorithms include K-means, Hierarchical Clustering, DBSCAN, Spectral Clustering, etc.
[0069] Execute the clustering algorithm: Use the selected clustering algorithm to cluster the similarity matrix or raw vector data. The algorithm divides the data into different groups or clusters based on the similarity between the vectors.
[0070] Determine the number of clusters: For some clustering algorithms (such as K-means), the number of clusters needs to be specified in advance. The optimal number of clusters can be determined through experiments, domain knowledge, or other methods.
[0071] Evaluate clustering results: Evaluate the quality and effectiveness of clustering results. This can be achieved by calculating clustering metrics (such as silhouette coefficient, Davies-Bouldin index, etc.), visualizing clustering results, or conducting domain expert evaluation.
[0072] Explain and interpret the clustering results to ensure that users can understand their meaning and value. Apply the clustering results to actual business scenarios or research questions to support decision making and action.
[0073] In addition to clustering indicators, Figure 4 As shown, the present invention also has the following grouping: For the screening conditions, first, we screen out the high-frequency conditions based on metadata statistics, and group the chart cards where each high-frequency condition is located into a group for logical induction; second, we screen out the fields that are frequently selected but the conditions are not always consistent based on metadata statistics, and group the chart cards where different conditions are located into a group for distinguishing and summarizing, so as to finally derive the scope of scenarios where various screening logics should be effective; For sorting, it is usually sufficient to follow common sense (no need to summarize it into a piece of knowledge), but there may be a sorting direction that needs special attention. Therefore, the sorting conditions need to be grouped, and a number of chart cards are retained in each group. Each time, the ascending and descending card metadata of the same field are given to LLM together for judgment and summary.
[0074] Preferably, the calling of LLM to batch identify and mine the data screening logic in each metadata group data to obtain the batch generated data screening logic includes: According to the data screening logic to be mined, corresponding logical keywords and second mining logic are configured, wherein the logical keywords at least include the following keywords: indicator proportion, indicator level, indicator quota and / or indicator calculation formula; Constructing a second LLM prompt word according to the logical keyword and the second mining logic, and inputting the second LLM prompt word into a preset LLM; Through the LLM, the data screening logic in each of the metadata grouping data is traversed and identified based on the second LLM prompt word, and the corresponding data screening logic is output in batches to obtain the batch-generated data screening logic.
[0075] To construct the corresponding mining logic prompt words and input them into LLM to mine logical knowledge, you can refer to the aforementioned "indicator caliber" mining principle. I will not go into details here.
[0076] Preferably, S4, integrating the indicator definition list and the general logic list based on LLM to obtain a knowledge list for building a ChatBI knowledge base, including: Integrate the indicator definition list and the general logic list to obtain a knowledge content list; De-duplication processing is performed on each knowledge text in the knowledge content list according to the character string; Use the LLM embedding model to vectorize the indicator name of each knowledge text; Calculating the vector similarity of different knowledge texts; The knowledge content list is clustered and grouped according to the vector similarity to obtain a plurality of knowledge texts, and the knowledge texts are integrated into the knowledge list and used to construct the ChatBI knowledge base.
[0077] After completing the initial knowledge mining, there may be many duplications or even conflicts in the knowledge items. However, it is not possible to directly input all the knowledge into the LLM for sorting. If the knowledge is matched sequentially through retrieval and then given to the LLM, on the one hand, the computing power overhead is very high, and on the other hand, a single round of traversal cannot quickly complete knowledge convergence. Therefore, clustering technology needs to be introduced to solve this problem.
[0078] like Figure 5 As shown in the figure, knowledge items 1, 3, and 4 are grouped together after clustering. It can be clearly observed that the meanings of 1 and 3 are basically similar and are considered "duplicates", while 3 and 4 are suspected to have logical conflicts and different fields are selected for data screening. The next step is to judge the integration based on LLM.
[0079] The specific approach to clustering and grouping is as follows: First, directly deduplicate based on the string (LLM can pre-deduplicate the integrated knowledge list based on the string to improve deduplication efficiency), and then cluster based on the knowledge text, using the LLM embedding model to generate vectors. For knowledge classified into the same category, LLM will further judge and integrate it. If there are logical contradictions in the details of different knowledge, the problem needs to be output so that it can be confirmed and improved by human experts later.
[0080] By integrating the indicator definition list and the general logic list to obtain a knowledge content list, the knowledge in the two lists can be integrated into a knowledge content list according to the knowledge sequence (for example, the frequency of knowledge use by enterprises can be counted and sorted according to frequency). Then, data vectorization and clustering grouping are performed. Specifically, this can be implemented in combination with the description of vectorization and clustering grouping, which will not be repeated here.
[0081] Here, the integration of the knowledge text into the knowledge list can also be completed by LLM. Specifically, LLM can automatically integrate each knowledge text according to the integration logic of the input knowledge text, output the integrated knowledge text in order and generate a knowledge list. For example, LLM writes the entire knowledge into a preset knowledge list in order and automatically constructs a knowledge list. The ChatBI knowledge base can be constructed using the knowledge list according to the database type of the ChatBI knowledge base required by the user.
[0082] In addition to the above-mentioned method of using LLM for knowledge mining in each step, the present invention can also integrate mining, construct prompt words for the caliber and data screening logic, and perform deduplication processing to generate LLM prompt words and input them into LLM. LLM mines and outputs the knowledge of corresponding indicators and logic at one time, greatly improving efficiency. Other operations are described above.
[0083] On the other hand, a knowledge base cold start device based on a BI multi-source data set is provided, and the knowledge base cold start device based on a BI multi-source data set is used to implement the above-mentioned knowledge base cold start method based on a BI multi-source data set, and the device includes: Data input module, used to input BI configuration metadata; An indicator caliber mining module, used to perform indicator caliber mining on the BI configuration metadata based on LLM, obtain the defined indicator caliber and generate an indicator definition list; A logic mining module, used to perform data screening logic mining on the BI configuration metadata based on the LLM, obtain the defined data screening logic and generate a general logic list; The knowledge integration module is used to integrate the indicator definition list and the general logic list based on LLM to obtain a knowledge list for building the ChatBI knowledge base.
[0084] The functions of each module in the above device and their interactions can be understood in conjunction with the above method steps, and will not be described in detail here.
[0085] Figure 6 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, such as Figure 6 As shown, the electronic device 410 may include a first processor 2001 .
[0086] Optionally, the electronic device 410 may further include a memory 2002 and a transceiver 2003 .
[0087] The first processor 2001, the memory 2002 and the transceiver 2003 may be connected via a communication bus.
[0088] Combine the following Figure 6 The components of the electronic device 410 are described in detail: The first processor 2001 is the control center of the electronic device 410, and may be a processor or a general term for multiple processing elements. For example, the first processor 2001 is one or more central processing units (CPUs), or may be application specific integrated circuits (ASICs), or may be one or more integrated circuits configured to implement the embodiments of the present invention, such as one or more microprocessors (digital signal processors, DSPs), or one or more field programmable gate arrays (field programmable gate arrays, FPGAs).
[0089] Optionally, the first processor 2001 can execute various functions of the electronic device 410 by running or executing a software program stored in the memory 2002 and calling data stored in the memory 2002 .
[0090] In a specific implementation, as an embodiment, the first processor 2001 may include one or more CPUs, such as Figure 6 CPU0 and CPU1 are shown in FIG.
[0091] In a specific implementation, as an embodiment, the electronic device 410 may also include multiple processors, such as Figure 6 The first processor 2001 and the second processor 2004 are shown in FIG. Each of these processors may be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). The processor here may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).
[0092] The memory 2002 is used to store the software program for executing the solution of the present invention, and is controlled to be executed by the first processor 2001. The specific implementation method can refer to the above method embodiment, which will not be repeated here.
[0093] Optionally, the memory 2002 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 2002 may be integrated with the first processor 2001, or may exist independently and access the first processor 2001 through the interface circuit ( Figure 6 (not shown) is coupled to the first processor 2001, which is not specifically limited in this embodiment of the present invention.
[0094] The transceiver 2003 is used to communicate with a network device or a terminal device.
[0095] Optionally, the transceiver 2003 may include a receiver and a transmitter ( Figure 6 The receiver is used to implement a receiving function, and the transmitter is used to implement a sending function.
[0096] Optionally, the transceiver 2003 may be integrated with the first processor 2001, or may exist independently and communicate with the first processor 2001 through the interface circuit ( Figure 6 (not shown) is coupled to the first processor 2001, which is not specifically limited in this embodiment of the present invention.
[0097] It should be noted that Figure 6 The structure of the electronic device 410 shown in the figure does not constitute a limitation on the router, and the actual knowledge structure recognition device may include more or fewer components than those shown in the figure, or combine certain components, or arrange the components differently.
[0098] In addition, the technical effects of the electronic device 410 can refer to the technical effects of the knowledge base cold start method based on the BI multi-source data set described in the above method embodiment, which will not be repeated here.
[0099] It should be understood that the first processor 2001 in the embodiment of the present invention may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0100] It should also be understood that the memory in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0101] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0102] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.
[0103] In the present invention, "at least one" means one or more, and "plurality" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0104] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0105] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0106] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0107] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0108] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0109] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0110] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.
[0111] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A knowledge base cold start method based on BI multi-source data set, characterized in that: The method comprises: S1. Input BI configuration metadata; S2. Perform indicator scope mining on the BI configuration metadata based on LLM, obtain the defined indicator scope and generate an indicator definition list; S3. Perform data screening logic mining on the BI configuration metadata based on LLM, obtain the defined data screening logic and generate a general logic list; S4. Integrate the indicator definition list and the general logic list based on LLM to obtain a knowledge list for building the ChatBI knowledge base.
2. The knowledge base cold start method based on BI multi-source data set according to claim 1 is characterized in that: S2. Based on LLM, the indicator caliber is mined for the BI configuration metadata, the defined indicator caliber is obtained and an indicator definition list is generated, including: Obtaining some of the BI configuration metadata and performing preprocessing; According to preset indicator filtering rules, the pre-processed BI configuration metadata is subjected to indicator filtering processing to generate noise reduction configuration metadata; Calling LLM to batch identify and mine the indicator calibers in the metadata of each noise reduction configuration to obtain batch generated indicator calibers; The indicator calibers generated in batches are summarized to generate the indicator caliber list.
3. The knowledge base cold start method based on BI multi-source data set according to claim 2 is characterized in that: The calling of LLM to batch identify the indicator calibers in the noise reduction configuration metadata to obtain batch generated indicator calibers includes: According to the caliber of the indicator to be mined, corresponding mining keywords and the first mining logic are configured, wherein the mining keywords at least include the following keywords: indicator name, alias, type, source and / or time period; Constructing a first LLM prompt word according to the mining keyword and the first mining logic, and inputting the first LLM prompt word into a preset LLM; Through the LLM, the indicator calibers in each of the noise reduction configuration metadata are traversed and identified based on the first LLM prompt word, and the corresponding indicator calibers are output in batches to obtain the batch-generated indicator calibers.
4. The knowledge base cold start method based on BI multi-source data set according to claim 1 is characterized in that: S3. Perform data screening logic mining on the BI configuration metadata based on LLM, obtain the defined data screening logic and generate a general logic list, including: Obtaining some of the BI configuration metadata and performing preprocessing; According to a preset grouping rule, the pre-processed BI configuration metadata is grouped to generate a number of metadata grouping data; Calling LLM to batch identify and mine the data screening logic in each metadata grouping data to obtain batch generated data screening logic; The data screening logic generated in batches is logically summarized to generate the general logic list.
5. The knowledge base cold start method based on BI multi-source data set according to claim 4 is characterized in that: The calling of LLM to batch identify and mine the data screening logic in each metadata group data to obtain the batch generated data screening logic includes: According to the data screening logic to be mined, corresponding logical keywords and second mining logic are configured, wherein the logical keywords at least include the following keywords: indicator proportion, indicator level, indicator quota and / or indicator calculation formula; Constructing a second LLM prompt word according to the logical keyword and the second mining logic, and inputting the second LLM prompt word into a preset LLM; The data screening logic in each metadata group data is traversed and identified based on the second LLM prompt word through the LLM, and the corresponding data screening logic is output in batches to obtain the batch-generated data screening logic.
6. The knowledge base cold start method based on BI multi-source data set according to claim 4 is characterized in that: The grouping rules include: Use the LLM embedding model to vectorize the indicator names of the indicators in the BI configuration metadata; Calculate the vector similarity of different indicator names; The BI configuration metadata is clustered and grouped according to the vector similarity.
7. The knowledge base cold start method based on BI multi-source data set according to claim 1 is characterized in that: S4. Integrate the indicator definition list and the general logic list based on LLM to obtain a knowledge list for building the ChatBI knowledge base, including: Integrate the indicator definition list and the general logic list to obtain a knowledge content list; De-duplication processing is performed on each knowledge text in the knowledge content list according to the character string; Use the LLM embedding model to vectorize the indicator name of each knowledge text; Calculating the vector similarity of different knowledge texts; The knowledge content list is clustered and grouped according to the vector similarity to obtain a plurality of knowledge texts, and the knowledge texts are integrated into the knowledge list and used to construct the ChatBI knowledge base.
8. A knowledge base cold start device based on a BI multi-source data set, the knowledge base cold start device based on a BI multi-source data set is used to implement the knowledge base cold start method based on a BI multi-source data set as claimed in any one of claims 1 to 7, characterized in that: The device comprises: Data input module, used to input BI configuration metadata; An indicator caliber mining module, used to perform indicator caliber mining on the BI configuration metadata based on LLM, obtain the defined indicator caliber and generate an indicator definition list; A logic mining module, used to perform data screening logic mining on the BI configuration metadata based on the LLM, obtain the defined data screening logic and generate a general logic list; The knowledge integration module is used to integrate the indicator definition list and the general logic list based on LLM to obtain a knowledge list for building the ChatBI knowledge base.
9. An electronic device, characterized in that: The electronic device comprises: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program codes, which can be called by a processor to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Knowledge graph and affair graph fusion method, device and system
CN114417004A
Visual component interaction method and system based on retail industry template knowledge base
CN117216243A
Automatic construction method and device of knowledge base, electronic equipment and storage medium
CN118312577A
Artificial intelligence data analysis method and device conforming to business logic, equipment and medium
CN118485160A
Information processing method and apparatus, and electronic device
WO2024087821A1
