A BI intelligent voice knowledge graph algorithm
By using the BI intelligent voice knowledge graph algorithm, which utilizes speech-to-text conversion and keyword analysis, charts are automatically generated, solving the problems of high cost and poor real-time performance in traditional report production, and achieving fast and accurate data display.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHUHAI AOWEI SOFTWARE TECH CO LTD
- Filing Date
- 2022-07-18
- Publication Date
- 2026-04-21
AI Technical Summary
Traditional PPT report creation requires manual intervention, which is costly and cannot select charts in real time according to the meeting content, thus lacking timeliness.
Employing the BI intelligent voice knowledge graph algorithm, it automatically analyzes voice input to generate charts through speech-to-text conversion and keyword analysis, and then matches and displays the data within the knowledge graph.
It enables the rapid generation of charts via voice input, reducing operational difficulty and improving the timeliness and accuracy of data display.
Smart Images

Figure CN115795041B_ABST
Abstract
Description
[Technical Field]
[0001] This invention relates to the field of intelligent office technology, specifically to a BI intelligent voice knowledge graph algorithm. [Background Technology]
[0002] Traditional PowerPoint reports require specialized personnel to create charts based on data and specific needs. This requires training for these personnel, resulting in high labor costs. Furthermore, for meeting scenarios, participants need to prepare reports in advance, making it impossible to automatically select relevant chart data based on the meeting content, lacking timeliness. Therefore, a method is needed that can automatically generate chart data based on real-time requirements, is easy to operate, and only requires voice input. [Summary of the Invention]
[0003] To achieve the above objectives, the present invention provides the following technical solution: a BI intelligent speech knowledge graph algorithm, comprising a speech-to-text converter and a keyword analyzer, wherein the algorithm steps are as follows:
[0004] 1) Record your voice and convert it into text using a speech-to-text converter;
[0005] 2) Analyze the converted text using a keyword analyzer to obtain keywords;
[0006] 3) Iterate through the view containing the keyword in the context result set, set the corresponding result set as A, and match result set A with the context result set;
[0007] If a match is found, proceed to step 4);
[0008] If there is no match, first search the statement table and check if the statement table exists; if it exists, find the relevant data in the statement table and output the result set A, determine that it does not count as an inherited context, clear the context result set, update the context result set, and directly perform the memory calculation in step 7); if it does not exist, traverse the knowledge graph to find the optimal result and proceed to step 6) to check if the summary field exists.
[0009] 4) Perform a summary check on the obtained result set A.
[0010] If there is a summary, then determine whether it is the same summary as in step 5). If there is no summary, then retrieve the stored context result set, aggregate it with result set A, and proceed to step 7).
[0011] 5) Determine whether the summaries are the same. If they are the same, retrieve the stored context result set, aggregate it with result set A, and proceed to step 7). If they are not the same, it is considered that the context is not inherited. Clear the context result set table and update the context result set. Proceed directly to step 7 based on result set A.
[0012] 6) Determine if a summary field exists. If not, proceed to step 4) for the result set A.
[0013] If it exists, then check whether the summary field is the same as the previous summary. If the same summary field exists, then retrieve the stored result set of the previous sentence, aggregate it with result set A, and proceed to step 7). If the same summary field does not exist, then it is determined that the inherited context is not counted, the context result set is cleared, and result set A is exported, and step 7) is performed.
[0014] 7) Determine if memory calculation is included; if so, remove keywords related to memory calculation.
[0015] 8) Determine the matching table type and store the result set;
[0016] 9) Based on the chart type, generate the display interface and return the data to the interactive interface to complete the calculation.
[0017] Preferably, when matching the result set A with the context result set, it is necessary to remove relevant keywords from the table and memory calculations.
[0018] Preferably, the matching table types include pie charts, bar charts, and summary tables, and are preset with priorities;
[0019] The chart type identification steps are as follows: Step 1: Find the chart type. If the keyword of the input sentence can be found in the statement table, then there is no need to analyze the chart type. That is, the chart type corresponding to each sentence is stored in the statement table in advance.
[0020] If not found, iterate through the chart type table, search for matching keywords, and determine if a matching key chart is found. If no matching chart is found after the iteration, return the default type as a simplified chart. If a matching chart is found, select one based on preset keywords or priorities.
[0021] Preferably, the knowledge graph consists of several views, each view contains several tables, and each table contains several keywords or key words. The optimal result is obtained by traversing and searching all views, finding the optimal view, and processing the keywords into entity type, non-entity type, and time type respectively. Then, the optimal result is obtained by combining row calculation, parent-child dimension recognition, in-memory calculation, and chart type recognition.
[0022] Preferably, the entity type processing method is as follows: Step 1: Determine whether the keyword is an entity type keyword (time, location, organization, etc.); Step 2: If the same entity type exists, find the entity type with the same value in the map table, that is, find all records corresponding to the type by deduplicating the table name corresponding to the entity type keyword; Step 3: Determine whether the record corresponding to the keyword is found. If found, output the keyword result set and continue according to the "result set processing and analysis" process. If not found, search the data source table (t_datasourceview) by the data source ID to find the corresponding view.
[0023] The non-entity type processing method is as follows: Step 1: Find the corresponding table (t_dsvtable) based on the found view ID, and find the table ID; Step 2: Find the field table (t_fields) based on the table ID, and check if there is a matching keyword; Step 3: Determine if there is a keyword match. If there is a match, find the data source table based on the table ID to determine whether it is the fact table or another table. If there is no match, search in the detail table; Step 4: If not found, the result set corresponding to the keyword is empty. If found, find the data source table based on the table ID to determine whether it is the fact table or another table, and output the result set for the keyword, and continue according to the "Result Set Processing and Analysis" process.
[0024] The time type processing method is as follows: Step 1: Perform digital conversion, that is, convert according to the current time and determine whether it is row dimension or filter; the filter is a fixed time word, such as 2018, January 2018 and the first quarter of 2018, etc.; the row dimension is between multiple time periods, such as each year, each quarter and each month, etc.
[0025] Step 2: Find the time schedule (fdsvdata) by finding the view ID.
[0026] Step 3: If the time field is not found in the time schedule, then the time field does not exist in this view, and the result corresponding to the keyword is empty.
[0027] Step 4: Locate the table and field names in the timeline by searching the field table and the detail table.
[0028] Step 5: Output the result set for the keyword and continue according to the "Result Set Processing and Analysis" workflow.
[0029] Preferably, the steps for processing and analyzing the result set are as follows: Step 1: Summarize all keyword result sets to obtain the result set.
[0030] Step 2: Determine whether the result set corresponding to all keywords belongs to the category of all keywords having the same view, only some keywords having the same view, or the search view does not contain the keyword;
[0031] If all keywords have the same view, and each keyword corresponds to a unique view, then there is no ambiguity, and it can be identified as the view we are looking for. If only some keywords have the same view, first find the keywords that are not in the same view as other keywords, and then find the view that has the most similarity. Then, determine whether the keyword in the view that has the most similarity is obtained through traversal. If not, determine whether the view containing the keyword most often contains the keyword. If the search view contains the keyword, then the first view can be identified as the view we are looking for, and the view is determined. If the search view does not contain the keyword, then the keyword is traversed, and the results found by the keyword traversal are marked. Then, it is determined whether the keyword has a next view. This process is repeated until the view where the keyword is stored is found and identified as the view. If the comparison reaches the last view, then the process ends, and it is considered that there is no final result set.
[0032] Preferably, the identification steps for row calculation parent-child dimension identification are as follows: Step 1: Traverse the result string corresponding to each keyword in the determined result set and check whether it is a row dimension field (determine the fdetail field by the two fields in the result set).
[0033] If it is determined to be a row dimension, the search table will look for the fields `fformula` and `forullop`, indicating the existence of a row-calculated dimension. By default, the search table will look for the fields `faccountid`, `fparentid`, and `fnumber`.
[0034] It also updates the output result set of the parent-child dimension related fields corresponding to the keyword, and represents them as parent-child dimensions;
[0035] If not found, search for the record with the table ID in the parent-child dimension table (t_cross_fparentkey). Check if the record exists. If not, a pop-up window will appear on the interactive interface, allowing the user to input the relevant data for the parent-child dimension. This data will then be saved to the parent-child temperature table. If the record exists, update the relevant fields of the parent-child dimension corresponding to the keyword and output the result set as the parent-child dimension.
[0036] Preferably, the knowledge graph is a tree graph, which contains several views, each view contains several tables, and each table contains several fields or keywords. The data source table (t_datasourceview), view correspondence table (t_dsvtable), field table (t_fields), parent-child dimension table (t_cross_fparentkey), and time table (fdsvdata) are all views and / or tables. The knowledge graph is composed of various tables with data content that have been pre-entered.
[0037] Advantages of this invention: This invention pre-enters data into a knowledge graph, and operators input data via voice. The speech-to-text converter and keyword analyzer convert the speech into text and extract keywords. By traversing the keywords, the corresponding data is found in the knowledge graph, and then the corresponding chart is selected for display based on the data type. It is simple and fast, and users do not need training. Data charts can be quickly generated through voice, which has extremely high timeliness.
[0038] This invention also features a context recognition function, which compares the results of the newly input speech with the speech of the previous sentence to determine whether there is a connection between the contexts, thereby extracting more accurate and suitable data and greatly improving the user experience. [Attached Image Description]
[0039] Figure 1 This is a flowchart of the main architecture of the present invention;
[0040] Figure 2 Flowchart for finding the optimal result through traversal in this invention;
[0041] Figure 3 This is the overall flowchart of the present invention.
Detailed Implementation Methods
[0042] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0043] This invention mainly consists of a context algorithm and an algorithm for finding the optimal result through traversal. In this embodiment, the speech-to-text converter and keyword analyzer use Baidu's speech-to-text converter and Baidu's lexical analyzer. The specific algorithm steps are as follows:
[0044] I. Context Algorithm
[0045] After converting the input text into keywords, Baidu's lexical analyzer first performs a context check to determine whether the text is relevant to the surrounding context. There are three scenarios for this check:
[0046] 1. Matches view v1 that existed in the previous result set.
[0047] Step 0: Iterate through the view containing the result set of the previous sentence and find the corresponding result set A.
[0048] Step 1: Determine if there is a perfect match. The matching rule is to remove keywords related to memory calculation from the table.
[0049] Step 2: If there is no match, match according to the scenario of 'matching the statement table that stores complete one-sentence information'. If there is a match, check whether there is a summary, and there are two cases: 1: no summary, 2: summary.
[0050] Step 3: If there is no summary, directly take result set A. If there is a summary, determine whether it is the same summary.
[0051] Step 4: If the summaries are the same, directly retrieve result set A. If they are not the same, it is considered that they are not inheriting the context. Return the result based on the matching result and then update the context result set table. Specifically, clear all the contents of the context result set table and update and store the latest result.
[0052] Step 5: After obtaining result set A, retrieve the result set of the previous statement stored in the context table and aggregate it with the result set found this time.
[0053] Step 6: Determine whether memory calculations are included.
[0054] Step 7: Determine the chart type that matches the table.
[0055] Step 8: Store the results according to different scenarios, and improve the knowledge graph by continuously learning and accumulating data to provide benchmark data for subsequent application scenarios.
[0056] Step 9: Return the results.
[0057] 2. Matching statements in a table that stores complete one-sentence information.
[0058] Step 1: Search the statement table that stores complete one-sentence information, and determine whether the statement table exists based on the search results.
[0059] Step 2: If it does not exist, then match according to the "traverse all views and tables to find a match" scenario.
[0060] Step 3: If the statement is found in the statement list, output it. If it is determined that it is not an inherited context, then clear the records in the context result set and update the new record.
[0061] Step 4: Next, determine whether memory calculations are included.
[0062] Step 5: Determine the chart type to match the table.
[0063] Step 6: Store the results according to different scenarios, and improve the knowledge graph by continuously learning and accumulating data to provide benchmark data for subsequent application scenarios.
[0064] Step 7: Return the results.
[0065] 3. Traverse all views and tables to find matches.
[0066] Step 1: Go through the process to find the optimal result.
[0067] Step 2: After obtaining result set A without aggregation, retrieve the result set of the previous statement stored in the context table and aggregate it with the result set found this time.
[0068] Step 3: If there are summaries, check if the summary field is the same as the previous summary.
[0069] Step 4: For the same summary, retrieve the result set of the previous statement stored in the context table and aggregate it with the result set found this time.
[0070] Step 5: If different summaries are determined not to be inherited contexts, update the context result set (clear previous records and update the latest results).
[0071] Step 6: Next, determine whether memory calculations are included.
[0072] Step 7: Determine the chart type that matches the table.
[0073] Step 8: Store the results according to different scenarios, and improve the knowledge graph by continuously learning and accumulating data to provide benchmark data for subsequent application scenarios.
[0074] Step 9: Return the results.
[0075] II. Algorithm for finding the optimal result through traversal
[0076] The algorithm for finding the optimal result through traversal involves iterating through all views, finding the optimal view, and processing it separately based on keyword type (entity, non-entity, and time type). Then, it combines row calculation, parent-child dimension identification, in-memory computation, and chart type identification to arrive at the optimal result. The steps are as follows:
[0077] 1. For entity types
[0078] Step 1: Determine whether the keyword is an entity type keyword (time, place, organization, etc.).
[0079] Step 2: If entities of the same type exist, find entities of the same type in the atlas table.
[0080] Method: First, find all records corresponding to the entity type keyword by deduplicating the table name. For example, if "Guangzhou" is the keyword, its location entity type can be determined. Then, find records in the keyword table (t_cross_keyword) whose entity type is a location and whose table name is different. For example: 1. Shanghai --- Region table, 2. Beijing --- Customer table, 3. Hangzhou --- Customer table
[0081] Then, removing the same record from the customer table will result in 1 Shanghai --- the region table and 2 Beijing --- the customer table.
[0082] Step 3: Determine if a record corresponding to the keyword is found. If found, output the keyword result set.
[0083] Step 4: If not found, then search the data source table (t_datasourceview) by data source ID to find the corresponding view.
[0084] Step 5: If found, output the result set for that keyword and continue following the "Result Set Processing and Analysis" procedure below.
[0085] 2. Non-entity types
[0086] Step 1: Using the found view ID, locate the corresponding table (t_dsvtable) and find the table ID.
[0087] Step 2: Find the field table (t_fields) by using the table id and check if there are any matching keywords.
[0088] Step 3: Determine if there is a keyword match.
[0089] Step 4: If a match exists, find the data source table based on the table ID to determine whether it is a fact table, that is, to determine whether it is a summary or a row dimension.
[0090] Step 5: If no match is found, search the details table.
[0091] Step 6: If the keyword is not found, the corresponding result set will be empty.
[0092] Step 7: Once found, locate the data source table based on the table ID to determine if it is a fact table, i.e., whether it is a summary or a row dimension.
[0093] Step 8: Output the result set for this keyword and continue following the "Result Set Processing and Analysis" workflow.
[0094] 3. Time type
[0095] Step 1: 1. Number Conversion: Convert based on the current time; 2. Determine whether to use row dimension or filter;
[0096] Examples of filtering scenarios: 2018, last year, the year before last, the previous year, the first quarter, August, etc.
[0097] Examples of row-level dimensions: each year, each quarter, each month, etc.;
[0098] Step 2: Find the time schedule (fdsvdata) by finding the view ID.
[0099] Step 3: If the time field is not found in the time schedule, then the time field does not exist in this view, and the result corresponding to the keyword is empty.
[0100] Step 4: Locate the table and field names in the timeline by searching the field table and the detail table.
[0101] Step 5: Output the result set for the keyword and continue according to the "Result Set Processing and Analysis" workflow.
[0102] 4. Result Set Processing and Analysis
[0103] Step 1: Summarize all keyword result sets to obtain the result set.
[0104] Step 2: Determine which category the result set corresponding to all keywords belongs to.
[0105] Step 3: If all keywords have the same view, and each keyword corresponds to a unique view, then there is no ambiguity, and the view can be confirmed. Figure 1 The view you are looking for.
[0106] Example: Shanghai: v1 v2
[0107] Monthly: v1 v2
[0108] Stores: v1 v3
[0109] Revenue: v1 v3
[0110] Step 4: Only some keywords have the same view. First, find the keywords that are not in the same view as other keywords. Then find the view with the most identical keywords. The view may be 1 or more. In the example of Step 3, the view with the most identical keywords is v1. The keyword that is not in v1 is income.
[0111] Then we get: Shanghai: v1 v2
[0112] Monthly: v1 v2
[0113] Stores: v1 v3
[0114] Revenue: v3
[0115] Step 5: Determine if the income is obtained through a traversal search.
[0116] Step 6: If it is not determined, then determine whether the view containing the most keywords contains the keyword: that is, whether the v1 view contains revenue.
[0117] Step 7: If the view v1 contains the keyword, then v1 is the view we are looking for.
[0118] Step 8: Find the view of v1 that does not contain the keyword.
[0119] Step 9: Iterate through the keyword, for example, find v2, v3, v4;
[0120] The final result is: Shanghai: v1 v2
[0121] Monthly: v1 v2
[0122] Stores: v1 v3
[0123] Revenue: v2, v3, v4.
[0124] Step 10: Mark the results found by the key traversal, and eliminate them one by one. Now there are three views: v2, v3, and v4. Iterate through these three views in a loop.
[0125] Step 11: Determine if the keyword exists in a v2 view.
[0126] Step 12: If all other keywords exist in the v2 view, then we can end the process and consider v2 to be the view we are looking for.
[0127] Step 13: If the keyword does not exist in v2, determine whether the keyword was found through a traversal search.
[0128] Step 14: If the result is not obtained through traversal search, traverse and search for the keyword, update the result set state, and return to Step 11 to continue.
[0129] Step 15: If the result is obtained through traversal, discard v2, search for v3, and determine whether it is the last view to be compared.
[0130] Step 16: If this is not the last view, return to Step 11 to continue.
[0131] Step 17: If this is the last view to be compared, the judgment ends. There is no final result set, meaning there is no view that contains all the keywords. Return the result: No result found.
[0132] 5. Memory Calculation
[0133] Summary of rules for in-memory computing
[0134] a. Same period last year: Revenue compared to the same period last year (defined as the previous year)
[0135] Month-on-month revenue (based on the previous month)
[0136] Last week's revenue (confirmed as last week)
[0137] Revenue for the previous quarter (defined as quarterly)
[0138] Last month's income (determined as monthly)
[0139] b. Recent period: First determine the unit of time, then determine the duration of the time.
[0140] c. Ranking: Overall Bank Ranking, Parent Bank Ranking
[0141] d. Cumulative values: row cumulative, total row cumulative
[0142] e. Percentage: Row percentage, Total row percentage
[0143] f. Cumulative percentage: Row cumulative percentage, Row cumulative total percentage
[0144] Step 1: Iterate through the result fields corresponding to each keyword in the determined result set and check if they are summary fields;
[0145] Step 2: Summarize the fields and check if any keywords match the relevant rules for memory computing on the left. If a keyword matches the rules for memory computing on the left, update the status of the memory computing field corresponding to that keyword in the result set, that is, whether it is memory computing and the category of memory computing.
[0146] Step 3: Summarize the results into a new set that can recognize in-memory computations;
[0147] 6. Row-based parent-child dimension identification
[0148] Step 1: Iterate through the result set corresponding to each keyword, checking if it is a row dimension field. That is, determine the fdetail type by using the two fields in the result set.
[0149] Step 2: Once the dimension is determined to be row-level, check if the fields fformula and forullop exist in the field table.
[0150] Step 3: When there are row-based calculated dimensions, the default behavior is to check if the fields faccountid, fparentid, and fnumber exist in the field table.
[0151] Step 4: If the result set of the parent-child dimension related fields corresponding to the keyword exists, update the result set and represent it as the parent-child dimension;
[0152] Step 5: If not found, then look for the record whose table ID is in the parent-child dimension table (t_cross_fparentkey);
[0153] Step 6: Determine if the record exists;
[0154] Step 7: If the data does not exist, a pop-up window will appear asking the user to enter the relevant data for the parent and child dimensions and save it to the parent and child temperature table.
[0155] Step 8: If the result set of the parent-child dimension related fields corresponding to the keyword exists, update the result set and represent it as the parent-child dimension;
[0156] 7. Chart type recognition
[0157] Step 1: Find the chart type. If the entered sentence can be found in the statement table, there is no need to analyze the chart type. The statement table stores the chart type corresponding to each sentence.
[0158] Step 2: Traverse the chart type table and search for matching keywords;
[0159] Step 3: Determine if a key chart that matches it has been found;
[0160] Step 4: Not found, returns the default type as a short table;
[0161] Step 5: After finding the type, there are several possibilities depending on the number of matching charts: A: If only one matching chart is found, then return that chart; B: If multiple keywords match the chart, such as "percentage" and "status" (e.g., "percentage - pie chart" and "status - bar chart"), then confirm according to the agreed priority rules, such as: pie chart > bar chart > table, then "percentage - pie chart" is preferred.
[0162] refer to Figure 1 The specific steps and numerical values are shown below, illustrating the judgment path when training, analyzing, or recognizing the various scenarios mentioned above using the input text:
[0163] Ⅰ. Input the first sentence
[0164] Voice input: Revenue situation of various stores in Shanghai
[0165] Path: 1, 8, 11, 12, 27, 17, 18, 19, 22
[0166] Output: Result set (Shanghai, Stores, Revenue)
[0167] Add the following to the ignore keyword list
[0168] II. Input the second sentence
[0169] Voice input: Cost situation of various stores in Shanghai
[0170] Path: 1, 3, 6, 18, 19, 20
[0171] Output: Result set (Shanghai, stores, costs)
[0172] III. Input the third sentence
[0173] Input voice: Let's take a look at last year's situation.
[0174] Path: 1, 8, 12, 3, 28, 25, 18, 19, 0
[0175] Output: Result set (Shanghai, last year (2018), stores, costs)
[0176] Check the list of keywords to ignore when adding people
[0177] IV. Input the fourth sentence
[0178] Input voice: Income situation in each region
[0179] Path: 1, 3, 6, 18, 19, 20
[0180] Output: Result set (region, income)
[0181] Enter the following information sequentially in the same way: check year-on-year revenue, check month-on-month revenue, check last week's revenue, check last month's revenue, check last quarter's revenue, check the overall ranking of the downtrend, check the parent ranking of the downtrend, check the cumulative downtrend, check the total cumulative downtrend, check the percentage of the downtrend, check the total percentage of the downtrend, check the cumulative percentage of the downtrend, etc., and make judgments according to the methods described above based on different types.
[0182] When the input "view the cumulative percentage of the downlink" requires basic context, then:
[0183] Path: 1, 3, 28, 25, 18, 19, 20
[0184] Output: Inherited context, increasing memory computation compared to the same period last year.
[0185] Prerequisite: The view stored in the previous result set is v2.
[0186] When the context is coherent, if keywords such as "let's take another look" appear in the following text, they will be handled according to the context. For example:
[0187] Voice input: Revenue situation of various stores in Shanghai
[0188] Path: 1, 8, 9, 10, 18, 19, 21
[0189] Output: Result set (Shanghai, Stores, Revenue)
[0190] Then input voice: Let's take a look at the comparison between revenue and profit.
[0191] Path: 1, 8, 12, 25, 18, 19, 20
[0192] Output: Result set (Shanghai, Stores, Revenue, Profit)
[0193] Compare the keyword ignore table
[0194] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A BI intelligent speech knowledge graph algorithm, comprising a speech-to-text converter and a keyword analyzer, characterized in that: The algorithm steps are as follows: 1) Record your voice and convert it into text using a speech-to-text converter; 2) Analyze the converted text using a keyword analyzer to obtain keywords; 3) Iterate through the view containing the keyword in the context result set, set the corresponding result set as A, and match result set A with the context result set; If a match is found, proceed to step 4). If there is no match, first search the statement table and check if the statement table exists; if it exists, find the relevant data in the statement table and output the result set B, determine that it does not count as the inherited context, clear the context result set, update the context result set, and directly perform the memory calculation in step 7); if it does not exist, traverse the knowledge graph to find the best result, and proceed to step 6) to check if the summary field exists. The statement table is used to store complete sentence information; 4) Perform a summary check on the obtained result set A. If there is a summary, then perform the comparison between the summaries in step 5) and the summaries in step 7). If there is no summary, then retrieve the stored context result set, aggregate it with result set A, and proceed to step 7). 5) Determine if the summaries are the same. If they are the same, retrieve the stored context result set, aggregate it with result set A, and proceed to step 7). If they are not the same, it is considered that the context is not inherited. Clear the context result set table, update the context result set, and directly proceed to step 7 based on result set A. 6) Determine if a summary field exists. If not, proceed to step 4) for the result set A. If it exists, check if the summary field is the same as the previous summary. If the same summary field exists, retrieve the stored result set of the previous sentence, aggregate it with result set A, and proceed to step 7). If the same summary field does not exist, it is determined that the inherited context is not counted, the context result set is cleared, and result set A is exported, then proceed to step 7). 7) Determine whether memory calculation is included. If memory calculation is included, remove keywords related to memory calculation. Memory calculation includes: same period, recent, ranking, cumulative value, percentage and cumulative percentage. 8) Determine the matching table type and store the result set; The matching table types include pie charts, bar charts, and summary tables, and are preset with priorities; The chart type identification steps are as follows: Step 1: Find the chart type. If the keyword of the input sentence can be found in the statement table, then there is no need to analyze the chart type. That is, the chart type corresponding to each sentence is stored in the statement table in advance. If not, iterate through the chart type table, search for matching keywords, and determine whether a key chart that matches it is found. If no match is found after the iteration is complete, return the default type as a simple chart. If a match is found, select according to the preset keywords or priority. 9) Based on the chart type, generate the display interface and return the data to the interactive interface to complete the calculation; The knowledge graph consists of several views, each containing several tables, and each table containing several keywords. The optimal result is obtained by traversing all views, finding the optimal view, and processing the keywords into entity types, non-entity types, and time types respectively. Then, the optimal result is obtained by combining row calculation, parent-child dimension recognition, in-memory calculation, and chart type recognition.
2. The BI intelligent speech knowledge graph algorithm according to claim 1, characterized in that: When matching result set A with the context result set, it is necessary to remove keywords related to in-table and in-memory calculations.
3. The BI intelligent speech knowledge graph algorithm according to claim 1, characterized in that: The entity type processing method is as follows: Step 1: Determine whether the keyword is an entity type keyword, including location and organization; Step 2: If the same entity type exists, find the entity type with the same entity type in the map table, that is, find all records corresponding to the type by deduplicating the table name corresponding to the entity type keyword; Step 3: Determine whether the record corresponding to the keyword is found. If found, output the keyword result set and continue according to the "result set processing and analysis" process. If not found, find the data source table by data source ID and find the corresponding view. The non-entity type processing method is as follows: Step 1: Find the corresponding table of the view using the found view ID, and find the table ID; Step 2: Find the field table using the table ID and check if there is a matching keyword; Step 3: Determine if there is a keyword match. If there is a match, find the data source table based on the table ID to determine whether it is the fact table or another table. If there is no match, search in the detail table; Step 4: If not found, the result set corresponding to the keyword is empty. If found, find the data source table based on the table ID to determine whether it is the fact table or another table, output the result set for the keyword, and continue according to the "Result Set Processing and Analysis" process. The time-type processing method is as follows: Step 1: Perform numerical conversion, that is, convert according to the current time and determine whether it is a row dimension or a filter; the filter is a fixed time word; the row dimension is between multiple time periods; Step 2: Find the timetable using the found view ID; Step 3: If the time field is not found in the time schedule, then the time field does not exist in this view, and the result corresponding to the keyword is empty; Step 4: Locate the table name and field name in the timeline by searching the field table and the detail table; Step 5: Output the result set for this keyword and continue following the "Result Set Processing and Analysis" workflow; The steps for processing and analyzing the result set are as follows: Step 1: Summarize all keyword result sets to obtain the result set; Step 2: Determine whether the result set corresponding to all keywords belongs to the category of all keywords having the same view, only some keywords having the same view, or the search view does not contain the keyword; If all keywords have the same view, and the view corresponding to each keyword is unique, then there is no ambiguity and it can be confirmed as the view we are looking for. If only some keywords have the same view, first find the keywords that are not in the same view as other keywords, and then find the view with the most similar keywords. Then, determine if the keyword of the view with the most identical keywords is obtained through traversal search. If not, determine if the view containing the keyword most often contains the keyword. If the searched view contains the keyword, then the first view can be determined as the view to be found, and the view is determined. If the keyword is not found in the search view, the keyword is iterated through, and the results found by the keyword are marked. Then it is determined whether the keyword exists in the next view. This process is repeated until the view where the keyword is stored is found and identified as the view. If the comparison reaches the last view, the process ends, and it is considered that there is no final result set.
4. The BI intelligent speech knowledge graph algorithm according to claim 1, characterized in that: The identification steps for row calculation parent-child dimension identification are as follows: Step 1: Traverse the result set corresponding to each keyword in the determined result set and check whether it is a row dimension field. The determination is made by two fields in the result set: ftabletype and fdetail. If it is determined to be a row dimension, the search table will look for the fields fformula and forullop, indicating the presence of a row-calculated dimension. By default, the search table will also look for the fields faccountid, fparentid, and fnumber. Update if it exists. The result set of the parent-child dimension related fields corresponding to this keyword is output and represented as the parent-child dimension; If not found, search the parent-child dimension table for a record with the table ID matching that table. Check if the record exists. If not, display a pop-up window prompting the user to input the relevant parent-child dimension data, and save it to the parent-child dimension table. If the record exists, update the parent-child dimension table. The result set of the parent-child dimension related fields corresponding to the keyword is output and represented as the parent-child dimension.
5. The BI intelligent speech knowledge graph algorithm according to claim 1, characterized in that: The knowledge graph is a tree-like graph containing several views, each view containing several tables, and each table containing several fields or keywords. The data source table, view correspondence table, field table, parent-child dimension table, and time table are all views and / or tables. The knowledge graph is composed of various tables with pre-entered data content.
Citation Information
Patent Citations
Dialogue processing method of dialogue robot and device thereof, electronic equipment and medium
CN114064858A
Entity identification method and device in data analysis
CN114138945A