Method, device, electronic device and program product for determining target graph

By using language models and chart indexing in the data analysis platform, combining text matching and vector matching technologies, the inefficiency problem of chart search is solved, and more accurate and efficient chart positioning is achieved.

CN119149714BActive Publication Date: 2025-03-25BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411657800.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2025-03-25
Estimated Expiration
2044-11-19

AI Technical Summary

Technical Problem

In the data analysis platform, it becomes difficult to quickly and accurately search a large number of charts. Traditional browsing methods are inefficient, making it difficult for users to quickly find the information they need.

Method used

By obtaining user's natural language input, using the language model to generate query text and filter conditions, combining pre-constructed chart indexes, calculating text matching scores and vector matching scores, determining candidate chart sets, and reordering through weighting processing, and finally determining the target chart based on the filter conditions.

Benefits of technology

It improves the accuracy and efficiency of chart search, ensures that the query results are more in line with the actual needs of users, and enables users to find the required charts effectively and accurately in massive charts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119149714B_ABST
    Figure CN119149714B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure relate to methods, devices, electronic devices, and program products for determining a target chart. The method includes obtaining user input, and based on the user input, using a language model to generate a query text and a filtering condition. The method also includes determining, based on the query text, a text matching score for each chart in the data platform and a vector matching score for each chart in a neighbor chart set using a pre-built chart index. The method also includes determining a candidate chart set from a neighbor chart set. The method includes reordering the candidate chart set by weighted processing. In addition, the method also includes determining a target chart from a reordered candidate chart set based on the filtering condition. Therefore, according to the solution of the embodiments of the present disclosure, users can effectively and accurately find the required charts in a large number of charts, effectively improving the user's chart search experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and more particularly to a method, a device, an electronic device, and a computer program product for determining a target graph. Background Art

[0002] With the advent of the big data era, the rapid growth and complexity of data volume has made data analysis platforms increasingly important in all walks of life. Through efficient processing and analysis of massive data, data analysis platforms can help companies deeply explore the value of data, optimize decision-making processes, and improve operational efficiency. Therefore, the importance of data analysis platforms is constantly rising, becoming an indispensable core tool for modern enterprises.

[0003] In data analysis platforms, with the explosive growth of data volume and the increasing demand for data visualization, the importance of fast and accurate chart search has become increasingly prominent. Faced with a large number of charts, traditional browsing methods are inefficient and users find it difficult to quickly find the information they need. Effective chart search functions can greatly improve the efficiency of data analysis, help users quickly locate and use key data to make decisions, thereby optimizing business processes and decision quality. Summary of the invention

[0004] Embodiments of the present disclosure provide a method, an apparatus, an electronic device, and a computer program product for determining a target graph.

[0005] According to a first aspect of the present disclosure, a method for determining a target chart is provided. The method includes obtaining user input, the user input indicating a desired chart in a data platform in a natural language form. The method also includes generating a query text and a filtering condition related to the desired chart indicated by the user input using a language model based on the user input, the query text including keywords related to the user input. The method also includes determining a text matching score for each chart in the data platform and a vector matching score for each chart in a neighbor chart set based on the query text using a pre-built chart index, the neighbor chart set being determined from the data platform by the chart index through a nearest neighbor search method based on the query text. The method also includes determining a candidate chart set from the neighbor chart set based on the text matching score and the vector matching score. The method also includes reordering the candidate chart set by weighted processing based on the text matching score and the vector matching score. In addition, the method also includes determining a target chart from the reordered candidate chart set based on the filtering condition.

[0006] According to a second aspect of the present disclosure, a device for determining a target chart is provided. The device includes a user input acquisition module configured to acquire user input, wherein the user input indicates a desired chart in a data platform in a natural language form. The device also includes a text condition generation module configured to generate a query text and a screening condition related to the desired chart indicated by the user input using a language model based on the user input, wherein the query text includes keywords related to the user input. The device also includes a matching score determination module configured to determine a text matching score for each chart in the data platform and a vector matching score for each chart in a neighbor chart set based on the query text using a pre-built chart index, wherein the neighbor chart set is determined from the data platform by the chart index based on the query text through a nearest neighbor search method. The device also includes a candidate chart determination module configured to determine a candidate chart set from the neighbor chart set based on the text matching score and the vector matching score. The device also includes a weighted processing rearrangement module configured to reorder the candidate chart set by weighted processing based on the text matching score and the vector matching score. In addition, the device also includes a target chart determination module configured to determine a target chart from the reordered candidate chart set based on the screening condition.

[0007] According to a third aspect of the present disclosure, an electronic device is provided, comprising a processor and a memory coupled to the processor, wherein the memory has instructions stored therein, and when the instructions are executed by the processor, the electronic device executes the method according to the first aspect.

[0008] In a fourth aspect of the present disclosure, a computer program product is provided, which is tangibly stored on a non-transitory computer readable medium and includes computer executable instructions, which when executed cause a computer to perform the steps of the method of the first aspect of the present disclosure.

[0009] The purpose of this Summary is to introduce a selection of concepts in a simplified form that are further described in the Detailed Description below. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to limit the scope of the claimed subject matter. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:

[0011] Figure 1 A schematic diagram showing an example environment in which devices and / or methods according to embodiments of the present disclosure may be implemented;

[0012] Figure 2 A flowchart of a method for determining a target graph according to an embodiment of the present disclosure is shown;

[0013] Figure 3 A schematic diagram showing a process of searching for a chart in a data platform according to an embodiment of the present disclosure is shown;

[0014] Figure 4 A block diagram showing an apparatus for determining a target graph according to some embodiments of the present disclosure; and

[0015] Figure 5 A block diagram of an electronic device according to an embodiment of the present disclosure is shown.

[0016] Throughout the drawings, the same or similar reference numbers denote the same or similar elements. DETAILED DESCRIPTION

[0017] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the type, scope of use, usage scenarios, etc. of the personal information (such as voice) involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0018] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0019] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc. may refer to different or the same objects, unless explicitly stated. Other explicit and implicit definitions may also be included below.

[0020] As mentioned above, data platforms (e.g., business intelligence (BI) platforms) are becoming increasingly important. As the number of charts on data platforms grows rapidly, it is becoming increasingly important to accurately search for target charts on data platforms. In the scenario of searching for charts on relevant data platforms, there is usually only a simple keyword matching search. Users must enter accurate keywords to search for results, and often have to combine manual browsing to find the required charts, which is very inefficient when faced with a large number of charts with complex content.

[0021] For example, when faced with the business scenario requirements of massive information search, the solution usually adopted is to use search engine technology. These search tools usually use complex algorithms, such as PageRank, TF-IDF, etc., to analyze and process the content of web pages or documents, and then calculate the scores of each item based on the user's query and return the result with the highest score. However, these methods have significant defects in the graph search scenario of the data platform. Unlike web pages or documents, the graph itself does not contain a lot of text content and lacks structured information such as hyperlinks, so it is difficult to build an effective search database. Since the metadata of the graph (such as the graph name, folder name, etc.) is usually short and may not fully reflect the content and characteristics of the graph, metadata-based search may not meet the needs of users. In addition, search engines usually process user queries based on keyword matching, which cannot meet the needs of intelligent data platforms for conversation-based search. In the data platform, users are expected to find graphs through conversational descriptions, which are difficult to convert into effective keywords through simple natural language processing technology. Therefore, although search engine technology is very effective in many scenarios, in the graph search scenario of the data platform, such technology cannot provide a satisfactory solution.

[0022] To this end, an embodiment of the present disclosure proposes a scheme for performing graph search on a data analysis platform. The scheme first obtains a query request input by a user in natural language, and then uses a language model to parse the user input to determine the query text and the corresponding filtering conditions. Next, the text matching score and vector matching score of each graph in the data platform are calculated respectively through a pre-built graph index. Based on these scores, a set of candidate graphs can be determined. Then, the candidate graph set is re-ranked by weighting it. Finally, based on the filtering conditions, the target graph that best meets the user's needs is determined and selected from the re-ranked candidate graph set.

[0023] Therefore, according to the solution of the embodiment of the present disclosure, the application of the language model allows users to query through flexible and varied natural language input, and combines the text matching and vector matching methods to improve the accuracy of search results, and by re-ranking and screening the candidate chart set, it is ensured that the query results are more in line with the actual needs of users. Therefore, users can effectively and accurately find the required charts in a large number of charts, effectively improving the user's chart search experience.

[0024] Figure 1 Schematic diagram of an example environment in which the device and / or method according to an embodiment of the present disclosure may be implemented. Figure 1As shown, the example environment 100 may include a data platform 110, which may be deployed on a user terminal, a mobile device, a computer, etc. It may also be a computing system, a single server, a distributed server, or a cloud-based server. For example, the data platform may be a BI platform (business intelligence platform) for collecting, processing, and displaying enterprise data, and helping users to analyze data through visualization methods such as charts and reports. As the amount of data increases, the BI platform may contain a large number of charts (e.g., chart library 160), so efficient retrieval of charts becomes particularly critical.

[0025] The data platform 110 may receive user input 120, where the user input 120 indicates in natural language the chart in the data platform that the user desires to query. The language model 130 may generate a query text 140 and a filter condition 150 based on the user input 120, wherein the query text 140 includes keywords related to the user input 120. It should be understood that the language model 130 may be deployed together with the data platform 110, or may be deployed in other locations (e.g., in a cloud environment), and the present disclosure is not limited thereto.

[0026] The graph index 170 may receive the query text 140, and determine the text matching score of each graph in the graph library 160 and the vector matching score of each graph in the neighbor graph set according to the query text. The neighbor graph set is automatically determined from the graph library 160 by the graph index 170 through the nearest neighbor search method according to the query text 140, that is, the neighbor graph set is a group of graphs in the graph library 160 that have a high similarity with the query text 140.

[0027] The data platform 110 can determine the candidate chart set 180 from the neighbor chart set of the chart library 160 according to the text matching score and the vector matching score. For example, assuming that the neighbor chart set contains one thousand charts, the data platform 110 can calculate the score of each chart according to the matching degree between these charts and the query text 140, and select the chart with a higher matching score as the candidate chart.

[0028] In addition, the data platform 110 can reorder the candidate chart set 180 through weighted processing according to the text matching score and the vector matching score. For example, different weights can be set for the text matching score and the vector matching score, respectively, or the sum of the two can be weighted and adjusted to achieve a more flexible reordering strategy, so that the most relevant charts can be displayed preferentially according to specific query requirements. Then, the data platform 110 can determine the target chart 190 from the reordered candidate chart set 180 according to the filtering conditions 150. For example, the language model 130 can generate the filtering conditions 150 according to the user input 120, and the filtering conditions 150 may include the type, creator, creation time, etc. of the chart, and the candidate chart set 180 can be filtered according to these conditions to determine the target chart 190.

[0029] Therefore, according to the solution of the embodiment of the present disclosure, the application of the language model allows users to query through flexible and varied natural language input, and combines the text matching and vector matching methods to improve the accuracy of search results, and by re-ranking and screening the candidate chart set, it is ensured that the query results are more in line with the actual needs of users. Therefore, users can effectively and accurately find the required charts in a large number of charts, effectively improving the user's chart search experience.

[0030] It should be understood that the architecture and functions in the example environment 100 are described for exemplary purposes only and do not imply any limitation on the scope of the present disclosure. Embodiments of the present disclosure may also be applied to other environments with different structures and / or functions.

[0031] The following will combine Figures 2 to 5 The process according to the embodiment of the present disclosure is described in detail. For ease of understanding, the specific data mentioned in the following description are exemplary and are not intended to limit the scope of protection of the present disclosure. It is understood that the embodiments described below may also include additional actions not shown and / or the actions shown may be omitted, and the scope of the present disclosure is not limited in this respect.

[0032] Figure 2 A flow chart of a method 200 for determining a target chart according to an embodiment of the present disclosure is shown. The method may be performed by a data platform, which may be deployed in a cloud server, a distributed server, a single physical server, or a virtualized environment. At block 202, user input may be obtained, the user input indicating a desired chart in the data platform in a natural language form. For example, referring to Figure 1, the data platform 110 may obtain user input 120, which indicates a desired chart in the data platform 110 in natural language. At block 204, a query text and a filter condition related to the desired chart indicated by the user input may be generated by using a language model based on the user input, wherein the query text includes keywords related to the user input. For example, referring to Figure 1 The data platform 110 may generate a query text 140 and a filter condition 150 related to a desired chart indicated by the user input 120 based on the user input 120 by using the language model 130 . The query text 140 may include keywords related to the user input 120 .

[0033] At block 206, a text matching score for each graph in the data platform and a vector matching score for each graph in a set of neighboring graphs may be determined based on the query text using a pre-built graph index, where the set of neighboring graphs is determined from the data platform by the graph index using a nearest neighbor search method based on the query text. Figure 1 Based on the query text 140, the data platform 110 can use the pre-built graph index 170 to determine the text matching score for each graph in the data platform 100 and the vector matching score for each graph in the neighbor graph set, which is determined from the data platform 110 by the graph index 170 based on the query text 140 through the nearest neighbor search method.

[0034] At block 208, a candidate graph set may be determined from the neighbor graph set based on the text matching score and the vector matching score. Figure 1 , the data platform 110 can determine the candidate graph set 180 from the neighbor graph set based on the text matching score and the vector matching score. At block 210, the candidate graph set can be reordered by weighting based on the text matching score and the vector matching score. Figure 1 , the data platform 110 can reorder the candidate graph set 180 by weighting based on the text matching score and the vector matching score. At block 212, a target graph can be determined from the reordered candidate graph set based on the screening condition. For example, referring to Figure 1 The data platform 110 may determine a target chart 190 from the reordered candidate chart set 180 based on the filter condition 150 .

[0035] Therefore, according to method 200 of an embodiment of the present disclosure, the application of the language model allows users to query through flexible and varied natural language input, and at the same time combines text matching and vector matching methods to improve the accuracy of search results, and by reordering and screening the candidate chart set, it ensures that the query results are more in line with the user's actual needs, so that users can accurately find the required charts among massive charts, effectively improving the user's chart search experience.

[0036] Figure 3 FIG. 3 is a schematic diagram of a process 300 for searching a chart in a data platform according to an embodiment of the present disclosure. Figure 3 As shown, process 300 generally includes a process 302 of building an index, a process 304 of input preprocessing, and a process 306 of searching. At box 308, a chart in the data platform can be obtained. For example, the data platform can be an enterprise-level BI platform that can integrate data from different data sources and present them visually in the form of charts. The data platform may include multiple data dashboards, each of which contains several charts. These charts may include, but are not limited to, bar charts, line charts, pie charts, scatter charts, etc., for displaying various data analysis results. For example, the data platform may include a dashboard for inventory analysis, displaying multiple charts related to inventory. These charts may include "monthly inventory bar chart", "regional inventory distribution pie chart", and "product inventory trend line chart". Each chart in the data platform is usually associated with one or more data sets, for example, "monthly inventory bar chart" can be associated with one or more data sets for storing inventory data (for example, "inventory data set"). For example, the "monthly inventory bar chart" can be drawn through the data in the "inventory data set".

[0037] At box 310, chart-related text can be constructed. In some embodiments, the chart-related text of each chart in the data platform can be obtained, wherein the chart-related text includes information related to one or more of the following: the chart, the kanban where the chart is located, the project where the chart is located, and the data set associated with the chart. For example, for a "monthly inventory bar chart", the chart-related text can include the name of the chart "monthly inventory bar chart", the name of the kanban to which the chart belongs "inventory analysis kanban", and the name of the project associated with the chart "inventory data analysis". In addition, the chart-related text can also include the data set name of the "inventory data set" associated with the chart to identify the data source on which the chart depends. It should be understood that the use of related names to construct chart-related text is only for illustrative purposes, and the embodiments of the present disclosure do not limit the way to construct chart-related text. In some embodiments, the chart-related text can also include more information associated with the chart, kanban, project, and data set. For example, a descriptive label of the chart, other charts of the project, field information of the data set, and the like. In addition, the chart can also belong to a multi-level project, and the information of each level of the project can be used to construct the chart-related text.

[0038] At box 312, the language model can be used to optimize the chart-related text. In some embodiments, the language model can be used to generate chart-optimized text for each chart in the data platform based on the chart-related text. Since the previously constructed chart-related text may contain some content that is irrelevant to the chart or repeated, these low-quality information may interfere with the subsequent vector matching and text matching processes. In addition, the original text lengths of different charts may vary greatly, and this length difference may affect the adaptability and final effect of the search process. To this end, in some embodiments, the language model can be used to generate chart-optimized text for each chart in the data platform based on the chart-related text. For example, the language model can be used to summarize the chart-related text.

[0039] In some embodiments, a system prompt word of a language model may be obtained, and the system prompt word instructs the language model to generate a chart-optimized text. For example, a fixed template may be used in the system prompt word to instruct the language model to summarize the chart-related text. Then, the chart-related text may be added to the user prompt word, and the language model processes the user prompt word to generate the chart-optimized text. In this way, redundant or irrelevant information in the chart-related text can be effectively removed, the text length can be unified, and key information that is crucial to chart retrieval can be retained, thereby improving the accuracy and efficiency of subsequent search and matching processes.

[0040] At box 314, a text index can be built. In some embodiments, a text index associated with the data platform can be built based on the chart optimization text for each chart in the data platform. For example, the optimized text of each chart in the data platform can be used as input to generate a text index using a search and analysis engine (e.g., ElasticSearch). After the text index is built, the user can perform a query operation from the text index by entering a query text. For example, when a user enters a query request related to a specific chart in the data platform, the system uses the query text to search the text index to find charts similar to the query text.

[0041] At box 316, a vector index can be constructed. In some embodiments, a chart vector for each chart in the data platform can be generated using a language model-based vector interface based on the chart optimized text for each chart. For example, a vector representation associated with the text can be generated by inputting the optimized text of each chart into a language model-based vector interface. These vector representations can capture the semantic features of the text so that the semantic similarity between different charts can be quantified by the distance of the vectors. The language model-based vector interface can convert natural language text into a vector representation of fixed dimensions, and the interface usually relies on pre-trained language models that are trained with a large amount of text data and can understand and process complex natural language structures. Using these vector representations, similarity retrieval and matching operations can be efficiently performed in the vector space, thereby significantly improving the accuracy of chart search.

[0042] In some embodiments, text indexes and vector indexes can be stored as graph indexes in a search and analysis engine, such as ElasticSearch. In actual use, the appropriate index type can be selected for retrieval operations according to specific query requirements. If the input query is of text type, the text index in the graph index is used to perform a search operation to find a graph that matches the query text. If the input query is of vector type, the vector index in the graph index is used to determine the matching result by calculating the similarity between the query vector and the graph vector stored in the vector index.

[0043] The index building process 302 can be completed through the above operations. It should be understood that the present disclosure does not limit the execution time for building the index. In some embodiments, it can be built in real time each time the user searches the chart, so as to ensure that the index always reflects the latest data status to ensure the accuracy and timeliness of the search results. In some embodiments, it can also be pre-built and updated regularly. For example, the index can be updated at preset time intervals, or automatically triggered when the chart in the data platform changes. This can reduce the computational burden of index construction, improve the overall performance and response speed of the system, and still provide high-quality search results in most cases, taking into account both computing efficiency and user experience.

[0044] Continue to refer Figure 3 , at box 318, user input can be obtained. The user can indicate the desired chart in the data platform in the form of natural language. For example, the user input can be "I want to find the inventory trend chart of last month", "Please find a pie chart of regional inventory distribution" or "Help me find a bar chart of inventory created in June". These inputs can directly express the user's query requirements, and subsequent chart search and matching operations will be performed based on this input. At box 320, user intent recognition can be performed. For the conversational interaction scenario, the user can propose different types of requirements to the chatbot provided by the data platform, such as finding a chart, finding data, or querying the usage of a certain function, etc. These requirements are usually presented in the form of natural language text entered in the dialog box (that is, user input). Therefore, the language model can be used to judge the user input. If the language model determines that the user's intention of this input is "query chart", the system will call the corresponding query chart interface and enter the input preprocessing process 304. Otherwise, enter box 322 and enter other links. For example, other corresponding interfaces can be called for processing. In this way, we can ensure that user needs are accurately understood and directed to the appropriate processing flow, thereby improving the efficiency of interaction and user experience.

[0045] At box 324, a language model can be used to generate keywords 326 and filter conditions 328. For example, when a user inputs "I want to find a chart showing the number of daily active users of product A", the language model can extract the keywords "product A" and "number of daily active users". Through the pre-set system prompt words, the language model can automatically identify and extract these keywords from the user input. In addition, in some embodiments, special filter conditions can also be set in the prompt words and formatted output. For example, when the user inputs "help me find a bar chart of the number of daily active users, which was created in June", the language model can extract the chart type as "bar chart" and limit the creation time to "202406", and output the filter condition of "{chart_type: 'bar', create_time: '202406'}", which can be used in the subsequent search process after program parsing. In this way, the system can better understand user needs and provide accurate condition matching for the subsequent search process.

[0046] At box 330, a query text may be generated. In some embodiments, the query text may be generated by splicing the keywords generated by the language model. For example, after the language model is used to generate the keywords "Product A" and "Daily Active Users", these keywords may be spliced ​​together to generate the query text "Product A Daily Active Users". This approach ensures that the core information entered by the user is retained and converted into valid query text for subsequent searches through splicing. In some embodiments, the filtering conditions (such as chart type or time) extracted by the language model may also be added to the query text, such as generating a query text of "Product A Daily Active Users Bar Chart 202406".

[0047] At box 332, a query vector can be generated. In some embodiments, a query vector of the query text can be generated based on the query text using a vector interface based on a language model. For example, when the query text "Daily active users of product A" is generated, the query text can be converted into a query vector through a vector interface based on a language model. The query vector can not only capture the semantic information in the query text, but also reflect the semantic relationship between keywords, thereby measuring the matching degree between the user query and the chart in the data platform in the vector space. The vector interface based on the language model uses a language model trained with a large amount of text data to convert natural language input into a high-dimensional semantic vector. Because the language model has a deep understanding of complex semantics and context, the vector interface not only captures keywords, but also recognizes the deep meaning in the text, so the generated query vector has a high degree of accuracy and semantic consistency, ensuring that the query vector can more accurately reflect the user's intention during the matching process, significantly improving the quality and relevance of the query results.

[0048] At box 334, a text matching score can be determined. In some embodiments, a basic matching score for each graph in the data platform can be determined based on the query text using the text index in the graph index. For example, the TF-IDF method provided by ElasticSearch can be used to match keywords to the query text. TF (Term Frequency) indicates the frequency of a keyword appearing in a document, and IDF (Inverse Document Frequency) is a function that is negatively correlated with the proportion of the number of documents containing keywords. The fewer documents containing keywords, the greater the IDF, which measures the ability of keywords to distinguish in a document collection. Through TF-IDF weighted calculation, the pre-built text index can generate a basic matching score for each graph in the data platform based on the query text. Determining the basic matching score through the TF-IDF method requires word segmentation of the query text, and a word segmenter based on a dictionary and rules (e.g., an IK word segmenter) can be used to better support Chinese word segmentation retrieval. When building a text index, a fine-grained word segmentation method (e.g., using the ik_max_word mode of the IK word segmenter) can be used to maximize the splitting of graph-related text, thereby increasing the number of word segments and improving the hit rate. When determining the basic matching score, a coarse-grained word segmentation method can be used (for example, using the ik_smart mode of the IK word segmenter) to improve the accuracy of the query results and effectively reduce the interference of irrelevant results.

[0049] In some embodiments, based on the basic matching score, a predefined mapping function is used to determine the text matching score for each graph. For example, the basic matching score can be processed using formula (1) as follows:

[0050]

[0051] in OriginScore is the basic matching score, and then can be further processed using formula (2), as follows:

[0052]

[0053] in MappedScore is the score after mapping (i.e., text matching score), k and a It is a configurable parameter. First, the input scores of different intervals are processed by taking the logarithm, and then the text matching score is limited to between 0 and 1 by formula (2). At the same time, various parameters can be adjusted according to the statistical results to make the mapped score have good discrimination.

[0054] At block 336, a vector matching score may be determined. In some embodiments, a vector matching score for each chart in a neighbor chart set may be determined based on the query vector using a vector index in a chart index. When performing vector matching, the vector index may determine a chart set (i.e., a neighbor chart set) that is most similar to the query vector using a nearest neighbor search method based on the query vector. For example, a k-nearest neighbor (k-NN) method may be used, wherein the parameter k represents the number of charts that are closest to the query vector that need to be found, i.e., the size of the neighbor chart set is k. Although calculating the similarity score of the query vector and all vectors in the vector index one by one can ensure the accuracy of the result, this method significantly reduces the matching speed, so by using a nearest neighbor search method, the calculation speed can be significantly improved while ensuring accuracy. After determining the neighbor chart set, the vector matching score of the query vector and each chart in the neighbor chart set may be calculated using cosine similarity, so that the calculated similarity score is between 0 and 1. It should be understood that the present disclosure does not limit the vector matching score calculation method, and other methods other than cosine similarity may also be used for calculation. In addition, as mentioned above, the base match score is mapped to between 0 and 1 to generate a text match score. The purpose is to normalize the text match score and the vector match score to the same numerical range, thereby ensuring that the two match scores have consistent weights and comparability when calculating the combined score, thereby obtaining more accurate search results.

[0055] At block 338, a candidate chart set may be determined. In some embodiments, the candidate chart set may be determined from the neighbor chart set based on the text matching score and the vector matching score. In some embodiments, a combined score for each chart in the neighbor chart set may be determined based on the vector matching score and the text matching score, and based on the combined score, multiple charts with the highest combined scores may be selected from the neighbor chart set as the candidate chart set. For example, the charts in the neighbor chart set may be sorted according to the combined score (which may also be referred to as the sorting score), and multiple charts with the highest combined scores (e.g., Top N) may be selected as the candidate chart set.

[0056] At box 340, the candidate chart set can be reordered. In some embodiments, the candidate charts can be clustered to generate multiple candidate chart clusters, and the reordering can be performed in the multiple candidate chart clusters by determining weights related to the reordering. For example, in order to prevent charts with low text matching from being too high after reordering, the candidate chart set can be clustered using a clustering algorithm to cluster the combined scores to generate multiple candidate chart clusters. Within each cluster, the combined scores are weighted using a first weight and a second weight, so that accurate reordering is performed within the cluster, and at the same time, the relative order between clusters remains unchanged. This ensures that charts with similar scores are reordered more carefully in their respective clusters, thereby further making the search results more in line with the actual needs of users, while avoiding charts with low matching degrees from appearing at the top of the search results.

[0057] In some embodiments, a first weight may be determined based on the number of keywords related to the user input, and a second weight may be determined based on the similarity between the chart query user and the chart creation user, and then re-ranking is performed among the plurality of candidate chart clusters based on the combined score, the first weight, and the second weight. For example, the first weight may be calculated based on the number of keywords input by the user, as shown in formula (3):

[0058]

[0059] in TextMatchWeight The first weight ,TokenNum is the number of keywords input by the user. Meanwhile, the second weight can be calculated based on the similarity between the chart creator and the queryer. In some embodiments, the similarity between the chart creator and the queryer can be calculated based on the departments they are in, as shown in formula (4):

[0060]

[0061] in Similarity is the similarity between the graph creator and the queryer, CreatorDeptDepth is the hierarchical depth of the department to which the creator belongs. UserDeptDepth is the hierarchical depth of the department to which the queryer belongs, MaxCommonDepth The maximum hierarchical depth of the common department to which the creator and the queryer belong.

[0062] For example, the first weight and the second weight can be used to perform weighted processing on the combined score to adjust the combined score, thereby re-ranking the candidate chart set. In this way, not only the matching degree of the query text can be considered, but also factors such as user behavior and the similarity of the chart creator can be combined to ensure that the final ranking result is more in line with the actual needs of the user. In addition, other factors can be introduced, such as the number of chart visits, whether it is created by the user himself, whether the user has recently visited the chart, etc., to further optimize the re-ranking process, and the present disclosure does not limit this.

[0063] At box 342, the filter condition can be processed. For example, the reordered candidate chart set can be processed based on the filter condition 328 to determine the target chart 344. As described above, the filter condition 328 can be "{chart_type: 'bar', create_time: '202406'}", so that charts that do not meet the conditions can be filtered out according to these conditions, such as charts whose chart type is not a bar chart or whose creation time is not 202406. In this way, the reordered candidate chart set can be further accurately filtered, and the charts that meet the conditions are retained as target charts. In addition, in some embodiments, other charts in the reordered candidate charts that do not meet the filter conditions can be used as spare charts, and the spare charts can be displayed after the target chart. For example, charts that do not meet conditions such as creation time or chart type can be arranged after the target chart to avoid missing potentially related results, which helps to increase the diversity of search results while giving priority to displaying charts that meet the conditions.

[0064] Figure 4 4 is a block diagram of an apparatus 400 for determining a target graph according to some embodiments of the present disclosure. Figure 4As shown, the device 400 includes a user input acquisition module 402, which is configured to obtain user input, and the user input indicates the desired chart in the data platform in the form of natural language. The device 400 also includes a text condition generation module 404, which is configured to generate a query text and a screening condition related to the desired chart indicated by the user input using a language model based on the user input, and the query text includes keywords related to the user input. The device 400 also includes a matching score determination module 406, which is configured to determine the text matching score for each chart in the data platform and the vector matching score for each chart in the neighbor chart set based on the query text using a pre-built chart index, and the neighbor chart set is determined from the data platform by the chart index based on the query text through the nearest neighbor search method. The device 400 also includes a candidate chart determination module 408, which is configured to determine a candidate chart set from the neighbor chart set based on the text matching score and the vector matching score. The device 400 also includes a weighted processing reordering module 410, which is configured to reorder the candidate chart set through weighted processing based on the text matching score and the vector matching score. In addition, the apparatus 400 further includes a target chart determining module 412 configured to determine a target chart from the reordered candidate chart set based on a screening condition.

[0065] Figure 5 A block diagram of an electronic device 500 is shown in accordance with some embodiments of the present disclosure. Figure 5 1 shows a block diagram of an electronic device 500 according to some embodiments of the present disclosure, and the device 500 may be a device or apparatus described in an embodiment of the present disclosure. Figure 5 As shown, the device 500 includes a central processing unit (CPU) and / or a graphics processing unit (GPU) 501, which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 502 or loaded from a storage unit 508 to a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the device 500 can also be stored. The CPU / GPU 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504. Although not shown in FIG. Figure 5 As shown in FIG. 5 , device 500 may further include a co-processor.

[0066] A number of components in the device 500 are connected to the I / O interface 505, including: an input unit 506, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a disk, an optical disk, etc.; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0067] The various methods or processes described above may be performed by the CPU / GPU 501. For example, in some embodiments, the methods may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the CPU / GPU 501, one or more steps or actions in the methods or processes described above may be performed.

[0068] In some embodiments, the methods and processes described above may be implemented as a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present disclosure.

[0069] Computer readable storage medium can be a tangible device that can hold and store instructions used by an instruction execution device. Computer readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (non-exhaustive list) of computer readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, for example, a punch card or a convex structure in a groove on which instructions are stored, and any suitable combination thereof. The computer readable storage medium used here is not interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagated by a waveguide or other transmission medium (for example, a light pulse by an optical fiber cable), or an electrical signal transmitted by a wire.

[0070] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0071] The computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, and conventional procedural programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as a separate software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby implementing various aspects of the present disclosure.

[0072] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0073] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0074] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the equipment, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each frame in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the frame can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous frames can actually be executed substantially in parallel, and they can also be executed in the opposite order sometimes, depending on the functions involved. It should also be noted that each frame in the block diagram and / or flow chart, and the combination of frames in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0075] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The choice of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

[0076] Some example implementations of the present disclosure are listed below.

[0077] Example 1. A method for determining a target graph, comprising:

[0078] Obtaining user input, wherein the user input indicates a desired chart in the data platform in a natural language form;

[0079] Based on the user input, using a language model to generate a query text and a screening condition related to the desired chart indicated by the user input, wherein the query text includes keywords related to the user input;

[0080] Based on the query text, determine a text matching score for each graph in the data platform and a vector matching score for each graph in a set of neighbor graphs using a pre-built graph index, wherein the set of neighbor graphs is determined from the data platform by the graph index through a nearest neighbor search method based on the query text;

[0081] determining a candidate graph set from the neighbor graph set based on the text matching score and the vector matching score;

[0082] Re-ranking the candidate graph set by weighting based on the text matching score and the vector matching score; and

[0083] Based on the filter condition, a target chart is determined from the reordered set of candidate charts.

[0084] Example 2. The method according to Example 1, wherein determining the text matching score and the vector matching score comprises:

[0085] Based on the query text, determining a text matching score for each chart in the data platform using a text index in the chart index, the text index being pre-built based on chart-related text related to the charts in the data platform;

[0086] Based on the query text, generating a query vector of the query text using a vector interface based on a language model; and

[0087] Based on the query vector, a vector matching score for each chart in the set of neighboring charts is determined using a vector index in the chart index, wherein the vector index is pre-constructed based on vectors of texts associated with the charts.

[0088] Example 3. The method of any one of Examples 1-2, wherein determining the text matching score for each graph in the data platform comprises:

[0089] Based on the query text, determine a basic matching score for each graph using the text index;

[0090] Based on the basic matching score, the text matching score for each graph is determined using a predefined mapping function, the mapping function mapping the basic matching score to the same numerical range as the vector matching score.

[0091] Example 4. The method according to any one of Examples 1-3, further comprising:

[0092] Obtaining the chart-related text of each chart in the data platform, wherein the chart-related text includes information related to one or more of the following: a chart, a dashboard where the chart is located, a project where the chart is located, and a data set associated with the chart;

[0093] Based on the chart-related text, generating chart-optimized text for each chart in the data platform; and

[0094] The text index associated with the data platform is constructed based on the chart-optimized text for each chart in the data platform.

[0095] Example 5. The method according to any one of Examples 1-4, further comprising:

[0096] generating a chart vector for each chart in the data platform using the language model-based vector interface based on the chart-optimized text for each chart in the data platform; and

[0097] Based on the chart vector for each chart, the vector index associated with the data platform is constructed.

[0098] Example 6. The method according to any one of Examples 1-5, wherein determining the candidate graph set from the neighbor graph set comprises:

[0099] determining a combined score for each graph in the set of neighbor graphs based on the vector matching score and the text matching score;

[0100] Based on the combined scores, a plurality of graphs with the highest combined scores are selected from the neighbor graph set as the candidate graph set.

[0101] Example 7. The method of any one of Examples 1-6, wherein reordering the candidate graphs comprises:

[0102] Generating a plurality of candidate graph clusters by clustering the candidate graphs; and

[0103] Re-ranking is performed among the plurality of candidate graph clusters by determining weights associated with the re-ranking.

[0104] Example 8. The method of any one of Examples 1-7, wherein reordering among the plurality of candidate graph clusters comprises:

[0105] determining a first weight based on the number of the keywords related to the user input;

[0106] determining a second weight based on a similarity between the graph query user and the graph creation user; and

[0107] Re-ranking is performed among the plurality of candidate graph clusters based on the combined score, the first weight, and the second weight.

[0108] Example 9. The method according to any one of Examples 1-8, further comprising:

[0109] Using other charts that do not meet the screening condition in the reordered candidate charts as spare charts; and

[0110] The alternate chart is presented after the target chart.

[0111] Example 10. A device for determining a target graph, comprising:

[0112] A user input acquisition module configured to acquire user input, wherein the user input indicates a desired chart in the data platform in a natural language form;

[0113] a text condition generating module, configured to generate a query text and a screening condition related to the desired chart indicated by the user input by using a language model based on the user input, wherein the query text includes keywords related to the user input;

[0114] a matching score determination module configured to determine, based on the query text, a text matching score for each graph in the data platform and a vector matching score for each graph in a neighbor graph set using a pre-built graph index, wherein the neighbor graph set is determined from the data platform by the graph index through a nearest neighbor search method based on the query text;

[0115] a candidate graph determination module configured to determine a candidate graph set from the neighbor graph set based on the text matching score and the vector matching score;

[0116] a weighted processing re-ranking module, configured to re-rank the candidate graph set by weighted processing based on the text matching score and the vector matching score; and

[0117] The target chart determination module is configured to determine a target chart from the reordered candidate chart set based on the screening condition.

[0118] Example 11. The apparatus of Example 10, wherein the matching score determination module comprises:

[0119] a text matching determination module configured to determine, based on the query text, a text matching score for each chart in the data platform using a text index in the chart index, wherein the text index is pre-built based on chart-related text related to the chart in the data platform;

[0120] A query vector generation module, configured to generate a query vector of the query text based on the query text by using a vector interface based on a language model; and

[0121] The vector matching determination module is configured to determine a vector matching score for each chart in the neighboring chart set based on the query vector by using a vector index in the chart index, wherein the vector index is pre-constructed based on a vector of text related to the chart.

[0122] Example 12. The apparatus according to any one of Examples 10-11, wherein the text matching determination module comprises:

[0123] A basic matching determination module, configured to determine a basic matching score for each graph based on the query text and using the text index;

[0124] The second text matching determination module is configured to determine the text matching score for each graph based on the basic matching score by using a predefined mapping function, wherein the mapping function maps the basic matching score to the same numerical range as the vector matching score.

[0125] Example 13. The apparatus according to any one of Examples 10-12, further comprising:

[0126] A chart text acquisition module is configured to acquire the chart-related text of each chart in the data platform, wherein the chart-related text includes information related to one or more of the following: a chart, a board where the chart is located, a project where the chart is located, and a data set associated with the chart;

[0127] an optimized text generation module, configured to generate a chart optimized text for each chart in the data platform based on the chart related text; and

[0128] The text index building module is configured to build the text index associated with the data platform based on the chart-optimized text for each chart in the data platform.

[0129] Example 14. The apparatus according to any one of Examples 10-13, further comprising:

[0130] a chart vector generation module configured to generate a chart vector for each chart in the data platform based on the chart optimized text and using the language model based vector interface; and

[0131] A vector index building module is configured to build the vector index associated with the data platform based on the chart vector for each chart.

[0132] Example 15. The apparatus according to any one of Examples 10-14, wherein the candidate graph determination module comprises:

[0133] a combination score determination module configured to determine a combination score for each graph in the neighbor graph set based on the vector matching score and the text matching score;

[0134] The second candidate chart determination module is configured to select, based on the combination score, a plurality of charts with the highest combination scores from the neighbor chart set as the candidate chart set.

[0135] Example 16. The apparatus according to any one of Examples 10-15, wherein the weighted processing rearrangement module comprises:

[0136] a chart cluster generation module configured to generate a plurality of candidate chart clusters by clustering the candidate charts; and

[0137] The cluster reordering module is configured to reorder the plurality of candidate graph clusters by determining weights associated with the reordering.

[0138] Example 17. The apparatus of any one of Examples 10-16, wherein the cluster reordering module comprises:

[0139] A first weight determination module, configured to determine a first weight based on the number of the keywords related to the user input;

[0140] A second weight determination module configured to determine a second weight based on a similarity between the chart query user and the chart creation user; and

[0141] A second cluster reordering module is configured to reorder the plurality of candidate graph clusters based on the combined score, the first weight, and the second weight.

[0142] Example 18. The apparatus of any one of Examples 10-17, further comprising:

[0143] a spare chart determining module, configured to use other charts that do not meet the screening condition among the reordered candidate charts as spare charts; and

[0144] The spare chart display module is configured to display the spare chart after the target chart.

[0145] Example 19. An electronic device comprising:

[0146] Processor; and

[0147] A memory coupled to the processor, the memory having instructions stored therein, wherein when the instructions are executed by the processor, the electronic device performs actions, the actions comprising:

[0148] Obtaining user input, wherein the user input indicates a desired chart in the data platform in a natural language form;

[0149] Based on the user input, using a language model to generate a query text and a screening condition related to the desired chart indicated by the user input, wherein the query text includes keywords related to the user input;

[0150] Based on the query text, determine a text matching score for each graph in the data platform and a vector matching score for each graph in a set of neighbor graphs using a pre-built graph index, wherein the set of neighbor graphs is determined from the data platform by the graph index through a nearest neighbor search method based on the query text;

[0151] determining a candidate graph set from the neighbor graph set based on the text matching score and the vector matching score;

[0152] Re-ranking the candidate graph set by weighting based on the text matching score and the vector matching score; and

[0153] Based on the filter condition, a target chart is determined from the reordered set of candidate charts.

[0154] Example 20. The electronic device of Example 19, wherein determining the text matching score and the vector matching score comprises:

[0155] Based on the query text, determining a text matching score for each chart in the data platform using a text index in the chart index, the text index being pre-built based on chart-related text related to the charts in the data platform;

[0156] Based on the query text, generating a query vector of the query text using a vector interface based on a language model; and

[0157] Based on the query vector, a vector matching score for each chart in the set of neighboring charts is determined using a vector index in the chart index, wherein the vector index is pre-constructed based on vectors of texts associated with the charts.

[0158] Example 21. The electronic device of any of Examples 19-20, wherein determining the text matching score for each chart in the data platform comprises:

[0159] Based on the query text, determine a basic matching score for each graph using the text index;

[0160] Based on the basic matching score, the text matching score for each graph is determined using a predefined mapping function, the mapping function mapping the basic matching score to the same numerical range as the vector matching score.

[0161] Example 22. The electronic device according to any one of Examples 19-21, wherein the actions further include:

[0162] Obtaining the chart-related text of each chart in the data platform, wherein the chart-related text includes information related to one or more of the following: a chart, a dashboard where the chart is located, a project where the chart is located, and a data set associated with the chart;

[0163] Based on the chart-related text, generating chart-optimized text for each chart in the data platform; and

[0164] The text index associated with the data platform is constructed based on the chart-optimized text for each chart in the data platform.

[0165] Example 23. The electronic device according to any one of Examples 19-22, wherein the actions further include:

[0166] generating a chart vector for each chart in the data platform using the language model-based vector interface based on the chart-optimized text for each chart in the data platform; and

[0167] Based on the chart vector for each chart, the vector index associated with the data platform is constructed.

[0168] Example 24. The electronic device of any of Examples 19-23, wherein determining the candidate graph set from the neighbor graph set comprises:

[0169] determining a combined score for each graph in the set of neighbor graphs based on the vector matching score and the text matching score;

[0170] Based on the combined scores, a plurality of graphs with the highest combined scores are selected from the neighbor graph set as the candidate graph set.

[0171] Example 25. The electronic device of any of Examples 19-24, wherein reordering the candidate charts comprises:

[0172] Generating a plurality of candidate graph clusters by clustering the candidate graphs; and

[0173] Re-ranking is performed among the plurality of candidate graph clusters by determining weights associated with the re-ranking.

[0174] Example 26. An electronic device according to any of Examples 19-25, wherein reordering among the plurality of candidate graph clusters comprises:

[0175] determining a first weight based on the number of the keywords related to the user input;

[0176] determining a second weight based on a similarity between the graph query user and the graph creation user; and

[0177] Re-ranking is performed among the plurality of candidate graph clusters based on the combined score, the first weight, and the second weight.

[0178] Example 27. The electronic device according to any one of Examples 19-26, wherein the actions further include:

[0179] Using other charts that do not meet the screening condition in the reordered candidate charts as spare charts; and

[0180] The alternate chart is presented after the target chart.

[0181] Example 28. A computer-readable storage medium having one or more computer instructions stored thereon, wherein the one or more computer instructions are executed by a processor to implement the method according to any one of Examples 1 to 9.

[0182] Example 29. A computer program product tangibly stored on a computer-readable medium and comprising computer-executable instructions that, when executed by a device, cause the device to perform the method according to any one of Examples 1 to 9.

[0183] Although the disclosure has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Instead, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A method for determining a target graph, comprising: Obtaining user input, wherein the user input indicates a desired chart in the data platform in a natural language form; Based on the user input, generating a query text and a filtering condition related to the desired chart indicated by the user input using a language model, wherein the query text includes keywords related to the user input, and the filtering condition includes a chart type and a creation time of the desired chart; Based on the query text, determine a text matching score for each graph in the data platform and a vector matching score for each graph in a set of neighbor graphs using a pre-built graph index, wherein the set of neighbor graphs is determined from the data platform by the graph index through a nearest neighbor search method based on the query text; determining a candidate graph set from the neighbor graph set based on the text matching score and the vector matching score; Re-ranking the candidate graph set by weighting based on the text matching score and the vector matching score; as well as Based on the chart type and the creation time in the filter condition, a target chart is determined from the reordered candidate chart set, the target chart matching the chart type and the creation time in the filter condition.

2. The method of claim 1, wherein determining the text matching score and the vector matching score comprises: Based on the query text, determining a text matching score for each chart in the data platform using a text index in the chart index, the text index being pre-built based on chart-related text related to the charts in the data platform; Based on the query text, generating a query vector of the query text using a vector interface based on a language model; as well as Based on the query vector, a vector matching score for each chart in the set of neighboring charts is determined using a vector index in the chart index, wherein the vector index is pre-constructed based on vectors of texts associated with the charts.

3. The method of claim 2, wherein determining the text matching score for each graph in the data platform comprises: Based on the query text, determine a basic matching score for each graph using the text index; Based on the basic matching score, the text matching score for each graph is determined using a predefined mapping function, the mapping function mapping the basic matching score to the same numerical range as the vector matching score.

4. The method according to claim 2, further comprising: Obtaining the chart-related text of each chart in the data platform, wherein the chart-related text includes information related to one or more of the following: a chart, a dashboard where the chart is located, a project where the chart is located, and a data set associated with the chart; Based on the chart-related text, generate chart-optimized text for each chart in the data platform; as well as The text index associated with the data platform is constructed based on the chart-optimized text for each chart in the data platform.

5. The method according to claim 4, further comprising: generating a chart vector for each chart in the data platform using the language model-based vector interface based on the chart-optimized text for each chart in the data platform; as well as Based on the chart vector for each chart, the vector index associated with the data platform is constructed.

6. The method according to claim 1, wherein determining the candidate graph set from the neighbor graph set comprises: determining a combined score for each graph in the set of neighbor graphs based on the vector matching score and the text matching score; Based on the combined scores, a plurality of graphs with the highest combined scores are selected from the neighbor graph set as the candidate graph set.

7. The method according to claim 1, wherein reordering the candidate graphs comprises: Generating a plurality of candidate graph clusters by clustering the candidate graphs; as well as Re-ranking is performed among the plurality of candidate graph clusters by determining weights associated with the re-ranking.

8. The method of claim 7, wherein re-ranking among the plurality of candidate graph clusters comprises: determining a first weight based on the number of the keywords related to the user input; determining a second weight based on a similarity between the graph query user and the graph creation user; as well as Re-ranking is performed among the plurality of candidate graph clusters based on the combined score, the first weight, and the second weight.

9. The method according to claim 1, further comprising: Using other charts that do not meet the screening condition in the reordered candidate charts as spare charts; as well as The alternate chart is presented after the target chart.

10. An apparatus for determining a target graph, comprising: A user input acquisition module configured to acquire user input, wherein the user input indicates a desired chart in the data platform in a natural language form; a text condition generating module, configured to generate a query text and a filtering condition related to the desired chart indicated by the user input by using a language model based on the user input, wherein the query text includes keywords related to the user input, and the filtering condition includes a chart type and a creation time of the desired chart; a matching score determination module configured to determine, based on the query text, a text matching score for each graph in the data platform and a vector matching score for each graph in a neighbor graph set using a pre-built graph index, wherein the neighbor graph set is determined from the data platform by the graph index through a nearest neighbor search method based on the query text; a candidate graph determination module configured to determine a candidate graph set from the neighbor graph set based on the text matching score and the vector matching score; A weighted processing re-ranking module, configured to re-rank the candidate graph set by weighted processing based on the text matching score and the vector matching score; as well as The target chart determination module is configured to determine a target chart from the reordered candidate chart set based on the chart type and the creation time in the filtering condition, wherein the target chart matches the chart type and the creation time in the filtering condition.

11. An electronic device comprising: processor; as well as A memory coupled to the processor, the memory having instructions stored therein, wherein when the instructions are executed by the processor, the electronic device executes the method according to any one of claims 1 to 9.

12. A computer program product tangibly stored on a non-transitory computer readable medium and comprising computer executable instructions for performing the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Chart recommendation system and method based on natural language processing

    CN111460102A