Control method, device and readable storage medium of text retrieval system
By calculating the weights of target nodes in the knowledge graph and optimizing rendering parameters, the limitations in retrieval accuracy caused by the failure to consider differences in node importance in existing technologies are solved, achieving more efficient and accurate information retrieval.
Patent Information
- Application Number
- CN202411118354.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-15
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2044-08-15
AI Technical Summary
Existing text retrieval systems do not consider the differences in importance between nodes at the same level or in the same group when constructing knowledge graphs, which leads to limitations in the accuracy of information retrieval results.
Upon receiving a retrieval command, the system determines the weight of the target node in the initial knowledge graph, calculates the weight based on the total number of nodes and the number of associated nodes, determines the rendering parameters based on the weight, generates retrieval results, accurately identifies the degree of association between entities, and optimizes the visualization effect.
It improves search efficiency and accuracy, enhances the readability of search results, and meets users' personalized search needs.
Smart Images

Figure CN118643123B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a control method, device and readable storage medium of a text retrieval system. Background Art
[0002] In the actual application of knowledge graphs, users can quickly locate specific nodes in the knowledge graph through retrieval, understand the relationship between nodes and more information related to them.
[0003] However, the existing knowledge graph construction method usually finds the same nodes and establishes relationships through string comparison or fuzzy matching, without considering the importance differences between nodes of the same level or group, which will lead to limitations in the accuracy of information retrieval results.
[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of this application is to provide a control method, device and readable storage medium for a text retrieval system, aiming to solve the technical problem that the control method of the existing text retrieval system does not take into account the importance differences between nodes of the same level or group, which will lead to limitations in the accuracy of information retrieval results.
[0006] To achieve the above object, the present application provides a control method for a text retrieval system, the control method for the text retrieval system comprising the following steps:
[0007] Upon receiving a search instruction, determining a target node corresponding to the search instruction in the initial knowledge graph;
[0008] Determine the weight of the target node according to the total number of nodes in the initial knowledge graph and the number of associated nodes of the target node;
[0009] Rendering parameters are determined according to the weights, and retrieval results corresponding to the retrieval instructions are generated and / or determined according to the rendering parameters and the initial knowledge graph.
[0010] Optionally, before the step of determining the target node corresponding to the search instruction in the initial knowledge graph when the search instruction is received, the step further includes:
[0011] Acquire content to be constructed, and extract entity, attribute and relationship information of the content to be constructed;
[0012] determining a term frequency and an inverse document frequency of the entity;
[0013] Determine a TF-IDF value according to the word frequency and the inverse document frequency, and perform initial weight labeling on the entity according to the TF-IDF value;
[0014] Converting the entities, attributes and relationship information annotated with initial weights into initial structured data;
[0015] An initial knowledge graph is generated based on the initial structured data.
[0016] Optionally, the step of determining the weight of the target node according to the total number of nodes in the initial knowledge graph and the number of associated nodes of the target node includes:
[0017] Determine the real-time weight of the target node according to the total number of nodes in the initial knowledge graph and the number of associated nodes of the target node;
[0018] Determine a target weight according to the TF-IDF value, the real-time weight and a preset weight determination method;
[0019] The step of determining rendering parameters according to the weights, and generating and / or determining search results corresponding to the search instructions according to the rendering parameters and the initial knowledge graph includes:
[0020] Rendering parameters are determined according to the target weight, and retrieval results corresponding to the retrieval instruction are generated and / or determined according to the rendering parameters and the initial knowledge graph.
[0021] Optionally, before the step of determining the weight of the target node according to the total number of nodes in the initial knowledge graph and the number of associated nodes of the target node, the step further includes:
[0022] Detecting the data scale of the initial knowledge graph, the data complexity of the target node, and the hierarchical analysis requirements of the target node;
[0023] Standardizing the data scale, the data complexity, and the hierarchical analysis requirements, and calculating a comprehensive impact value based on the standardized values;
[0024] When the comprehensive impact value reaches a preset threshold, determining a community associated with the target node;
[0025] The step of determining the weight of the target node according to the total number of nodes in the initial knowledge graph and the number of associated nodes of the target node comprises:
[0026] The weight of the target node is determined according to the total number of nodes in the community and the number of nodes associated with the target node.
[0027] Optionally, the step of determining rendering parameters according to the weights, and generating and / or determining search results corresponding to the search instructions according to the rendering parameters and the initial knowledge graph includes:
[0028] According to the weight of the target node, weight-label the target node, and convert the weight-labeled target node into structured data;
[0029] Determining rendering parameters according to the structured data;
[0030] Generate a search result corresponding to the search instruction according to the rendering parameters and the initial knowledge graph.
[0031] Optionally, the step of determining rendering parameters according to the structured data includes:
[0032] Detecting the data scale, attribute type and weight distribution of the structured data;
[0033] Determining the number of visual attributes to be displayed according to the data size;
[0034] Determining a visual attribute combination to be applied according to the attribute type and the display quantity;
[0035] According to the weight distribution, rendering parameters of the visual attribute combination to be applied are determined.
[0036] Optionally, the step of determining rendering parameters according to the weights, and generating and / or determining search results corresponding to the search instructions according to the rendering parameters and the initial knowledge graph, further includes:
[0037] According to the weight of the target node, weight labeling is performed on the target node;
[0038] Inputting the weighted labeled initial knowledge graph into a pre-trained relationship graph optimization model, wherein the relationship graph optimization model adjusts the rendering parameters of the target node according to the weighted annotation to output a visual relationship graph;
[0039] The visualized relationship graph output by the pre-trained relationship graph optimization model is obtained, and the visualized relationship graph is determined to be a retrieval result corresponding to the retrieval instruction.
[0040] In addition, to achieve the above-mentioned purpose, the present application also provides a control device for a text retrieval system, the device comprising: a memory, a processor, and a control program for the text retrieval system stored on the memory and executable on the processor, the control program for the text retrieval system being configured to implement the steps of the above-mentioned text retrieval system control method.
[0041] In addition, to achieve the above-mentioned purpose, the present application also provides a readable storage medium, on which a control program of a text retrieval system is stored. When the control program of the text retrieval system is executed by a processor, the steps of the control method of the above-mentioned text retrieval system are implemented.
[0042] In this application, in order to solve the technical problem that the control method of the existing text retrieval system does not take into account the importance difference between nodes of the same level or the same group, which will lead to the limitation of the accuracy of the information retrieval results, this application determines the target node corresponding to the retrieval instruction in the initial knowledge graph when receiving the retrieval instruction; determines the weight of the target node according to the total number of nodes in the initial knowledge graph and the number of associated nodes of the target node; determines the rendering parameters according to the weight, and generates and / or determines the retrieval results corresponding to the retrieval instruction according to the rendering parameters and the initial knowledge graph. It can accurately identify the degree of association between entities, and determine the visualization effect of the retrieval results according to the degree of association, thereby improving the retrieval efficiency and accuracy, and at the same time, it also improves the readability of the retrieval results for users. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 Construct a process diagram for the knowledge graph in the prior art;
[0044] Figure 2 A flowchart of a first embodiment of a control method for a text retrieval system of the present application;
[0045] Figure 3 This is a schematic diagram of the entire process of the first embodiment of the control method of the text retrieval system of the present application;
[0046] Figure 4 A flowchart of a second embodiment of a control method for a text retrieval system of the present application;
[0047] Figure 5 This is a schematic diagram of the structure of a control device of a text retrieval system in a hardware operating environment involved in an embodiment of the present application.
[0048] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0049] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0050] Knowledge Graph is a structured method for organizing and representing knowledge. It presents entities and relations in knowledge in a graphical form, making knowledge more intuitive to users. In practical applications, users can quickly locate specific nodes in the knowledge graph through retrieval, understand the relationships between nodes, and more information related to them.
[0051] However, the control method of existing text retrieval systems is usually to find the same nodes and establish relationships through string comparison or fuzzy matching. Figure 1 , Figure 1 A schematic diagram of the process of constructing a knowledge graph in the prior art. The main application of this method is to threshold the standardized data and perform fuzzy matching on the data with the threshold, clustering similar nodes together to form groups to show the relationship between them. For nodes with large differences, new groups are formed, similar to the clustering method in statistics. However, the importance differences between nodes of the same level or group are not taken into account, which may cause problems in practical applications, such as classifying information with higher importance and information with lower importance as the same level, resulting in limitations in the accuracy of information retrieval results.
[0052] In order to solve the above problems, this application determines the target node corresponding to the search instruction in the initial knowledge graph when receiving the search instruction; determines the weight of the target node according to the total number of nodes in the initial knowledge graph and the number of associated nodes of the target node; determines the rendering parameters according to the weight, and generates and / or determines the search results corresponding to the search instruction according to the rendering parameters and the initial knowledge graph. It can accurately identify the degree of association between entities and determine the visualization effect of the search results according to the degree of association, thereby improving the search efficiency and accuracy, and at the same time, it also improves the readability of the search results for users.
[0053] In order to better understand the above technical solution, exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.
[0054] The present application embodiment provides a control method for a text retrieval system, referring to Figure 2 , Figure 2 This is a flow chart of a first embodiment of a control method for a text retrieval system of the present application.
[0055] In this embodiment, the control method of the text retrieval system includes:
[0056] Step S10: upon receiving a search instruction, determining a target node corresponding to the search instruction in the initial knowledge graph;
[0057] The text retrieval system in this embodiment supports users to retrieve nodes in the initial knowledge graph by inputting retrieval instructions. The retrieval instruction can be a keyword, a phrase, or a natural language expression, etc., which is used to describe the information that the user wants to retrieve. After receiving the retrieval instruction, the text retrieval system parses the retrieval instruction to extract the keywords, attributes, relationships, and other information that may exist in the retrieval instruction. According to the parsed information, the retrieval type corresponding to the retrieval instruction is determined. For example, if the retrieval instruction contains attribute and relationship information, it can be determined as an attribute relationship retrieval; if the retrieval instruction only contains keywords, it can be determined as a keyword retrieval. Determine the target retrieval means according to the retrieval type. For example, for keyword retrieval, the relevance can be calculated by comparing the similarity between the attributes, labels, etc. of the node and the retrieval keyword; for attribute relationship retrieval, the nodes that meet the query conditions can be found by traversing the nodes and edges in the knowledge graph. The most relevant node or the node that meets the query conditions is used as the central node, and it and the nodes associated with it are used as the target nodes.
[0058] For example, there is an initial knowledge graph that contains a lot of astronomical information. The user's search keyword is "star". After the text retrieval system finds the "star" node in the initial knowledge graph, it traverses the edges connected to "star" to extract other related nodes. These related nodes may include entities that have a specific relationship with the target node, such as specific star types. In the above initial knowledge graph, the nodes associated with "star" may include "sun", "North Star", "Sirius", etc. The target nodes obtained in this search include "star", "sun", "North Star" and "Sirius".
[0059] For another example, there is a knowledge graph that contains many nodes such as movies, actors, directors, and the relationships between them. Now, the text retrieval system receives a retrieval instruction: "Find movies directed by director A and with a score higher than 8.0." By parsing the retrieval instruction, the keyword "director A", the attribute "score", and the relationship "director" are extracted. This retrieval instruction contains attribute and relationship information, which can be judged as attribute relationship retrieval, and the target retrieval method is determined to traverse the nodes and edges in the knowledge graph to find nodes that meet the query conditions. Based on the above target retrieval method, find the nodes associated with "director A", and then filter out the nodes with a score higher than 8.0 from these nodes, such as "Work A" and "Work B". "Work A" and "Work B" are the central nodes of this retrieval, and the associated nodes of "Work A" and "Work B" may include directors, actors, and types. These associated nodes are connected to "Work A" and "Work B" through specific relationships. For example, "Work A" has a "director" relationship with director A, a "starring" relationship with actor A, and a "type" relationship with the "plot" type. It can help users to have a more comprehensive understanding of the relevant information of the movies directed by Director A and with a rating higher than 8.0.
[0060] Step S20: determining the weight of the target node according to the total number of nodes in the initial knowledge graph and the number of associated nodes of the target node;
[0061] The weight of each target node is calculated by the formula:
[0062] The denominator is the total number of nodes in the initial knowledge graph, and the numerator is the sum of the number of nodes associated with each target node.
[0063] For example, the target node includes "sun", and the nodes associated with "sun" include "earth", "mercury" and "venus", etc. Assuming that the number of its associated nodes is 20, and assuming that the entire knowledge graph has 400 nodes, the weight of "sun" is:
[0064] For another example, the target node includes "North Star", and assuming that the number of associated nodes of "North Star" is 10, the weight of "North Star" is:
[0065] As an optional implementation method for calculating weights, in order to better reflect the importance of the target node in the local area, the present application detects the data scale of the initial knowledge graph, the data complexity of the target node, and the hierarchical analysis requirements of the target node before calculating the weights, wherein the data scale includes the total number of nodes and the total number of edges in the knowledge graph, reflecting the complexity and scale of the knowledge graph. When the data scale is large, the knowledge graph may have multiple substructures with strong correlations. In this case, community division helps to reduce the computational complexity and improve the efficiency of retrieval and analysis. At the same time, community division can enable users to focus more on specific subcommunities and obtain more accurate information. Data complexity can consider the number of associated nodes and the number of associated relationship types of the target node, reflecting the complexity around the target node. When the target node has a high data complexity, it may be necessary to simplify the structure through community division to facilitate in-depth analysis. In addition, community division can help users better understand the role and status of the target node in the knowledge graph. Hierarchical analysis requirements can be evaluated based on the position and role of the target node in the knowledge graph. For example, when the target node plays an important role in high-level analysis, community division may be required to mine the substructure around the target node. In low-level analysis, there may be no need to perform community division, and it is sufficient to directly analyze the target node and its associated nodes.
[0066] Next, standardize the data size, data complexity, and hierarchical analysis requirements. Standardized values can map values in different ranges to the same range, such as [0, 1]. This makes the values of different indicators comparable. Then calculate the comprehensive impact value based on the standardized values. The comprehensive impact value is used to determine whether community division is necessary and whether local analysis is possible. The calculation method can be weighted average, feature combination, etc.
[0067] When the comprehensive impact value reaches the preset threshold, the community associated with the target node is determined. The preset threshold can be set as a fixed value or dynamically adjusted according to the actual situation. The community can be determined by community detection algorithms (such as Modularity optimization, hierarchical clustering, etc.).
[0068] Finally, the weight of the target node is determined based on the total number of nodes in the community and the number of associated nodes of the target node. The weight reflects the importance of the target node in the associated community.
[0069] In addition, when new information is entered into the initial knowledge graph, if the association of the target node changes, the weight will also be adjusted accordingly. This embodiment can dynamically update the weight mark of the target node so that the search results can be dynamically updated and incremental. For example, when the new entity "Astronomical Observation" is added, the association of "North Star" increases, and its presentation in the visualization will also change accordingly. Through real-time calculation and adjustment of node weights, the structure and content of the knowledge graph can be continuously optimized, and the quality and value of the knowledge graph can be improved. At the same time, this embodiment also supports users to label node weights by themselves. By adjusting the weight determination method and rendering parameters, users can be provided with personalized search result displays according to specific needs and scenarios.
[0070] Step S30: Determine rendering parameters according to the weights, and generate and / or determine search results corresponding to the search instructions according to the rendering parameters and the initial knowledge graph.
[0071] As an optional implementation method for generating the search result corresponding to the search instruction, refer to Figure 3 , Figure 3 This is a full-process schematic diagram of the first embodiment of the control method of the text retrieval system of the present application. First, the target node is weighted according to the weight of the target node, and the weighted target node is converted into structured data. Next, the structured data with the weighted results is imported into an open source relationship diagram drawing tool, such as ECharts or PyECharts, to obtain an RDF (Resource Description Framework) graph whose visual effect is automatically generated and associated with the weighted results. For example, the size of the pre-configured node in the open source relationship diagram drawing tool is associated with the weight. In the above-mentioned weight calculation example, in the RDF visualization relationship diagram generated after retrieving "star", the graphic size of "sun" will be larger than that of "North Star".
[0072] Based on the structured data with weighted results, another optional implementation method for determining rendering parameters is proposed. First, the data scale, attribute type and weight distribution of the structured data are detected. Among them, the data scale reflects the complexity and scale of the structured data; the attribute type represents the characteristics and information contained in the structured data, including entity attributes, such as name, type, description, etc., and relationship attributes, such as relationship type, direction, etc.; the weight distribution reflects the importance of different features in the data. Then, according to the data scale, the display quantity of visual attributes is determined, wherein the visual attribute refers to the attribute used to describe the characteristics of the visual element, which may include node layout, node color, node size, node shape, edge thickness, and edge color. When the data scale is large, the visual effect can be simplified by adjusting the display quantity of the visual attribute to avoid excessive information that makes it difficult for users to understand and analyze. Specifically, a logical function can be designed to calculate an appropriate display quantity according to the data scale, so that the visual effect is neither too complicated nor too complicated. Provide enough information. Then, different attribute types are mapped to corresponding visual attributes. For example, entity attributes can be mapped to visual attributes such as color, size or shape, and relationship attributes can be mapped to visual attributes such as color, width or arrow shape. For another example, hierarchical layouts, such as tree layouts and ring layouts, are used to reflect the hierarchical relationship of nodes; force-directed layouts, such as force-directed graphs and spring layouts, are used to reflect the association strength of nodes. At the same time, an appropriate combination of visual attributes is selected according to the number of displays. Finally, based on the weight distribution, the value range of the rendering parameters of the visual attribute combination to be applied is determined. For example, assume that the visual attribute combination to be applied includes node size. Then determine a suitable step size based on the minimum, maximum and range of the weights of all target nodes, such as one size level for each 0.5% weight value. The rendering parameters include the size level of each target node.
[0073] As another optional implementation method for determining the search result corresponding to the search instruction, the target node is weighted according to the weight of the target node; the initial knowledge graph with weighted annotation is input into a pre-trained relationship graph optimization model, wherein the relationship graph optimization model adjusts the rendering parameters of the target node according to the weighted annotation to output a visual relationship graph; the visual relationship graph output by the pre-trained relationship graph optimization model is obtained, and the visual relationship graph is determined to be the search result corresponding to the search instruction. The relationship graph optimization model is a model based on deep learning, such as a convolutional neural network (CNN), a recurrent neural network (RNN) or a variational autoencoder (VAE). The relationship graph optimization model is trained using a large amount of sample data, i.e., the target node with weighted annotation. During the training process, the loss function can be calculated by comparing the visual relationship graph output by the model with the relationship graph of actual requirements, and the model parameters can be updated using an optimization algorithm, such as gradient descent, to achieve the purpose of optimizing the visual effect of the relationship graph.
[0074] In addition, during user interaction, highlight and animation effects can be used to highlight the nodes and relationships that users are interested in. For example, when a user hovers or clicks a node, the edges and adjacent nodes related to the node can be highlighted to enhance the sense of space and interactivity.
[0075] In this embodiment, when receiving a search instruction, the target node corresponding to the search instruction in the initial knowledge graph is determined; the weight of the target node is determined according to the total number of nodes in the initial knowledge graph and the number of associated nodes of the target node; rendering parameters are determined according to the weight, and the search result corresponding to the search instruction is generated and / or determined according to the rendering parameters and the initial knowledge graph. The degree of association between entities is accurately identified, and the visualization effect of the search result is determined according to the degree of association, thereby improving the search efficiency and accuracy, and at the same time, improving the readability of the search results for users.
[0076] Further, refer to Figure 4 , Figure 4 The second embodiment of the present application is provided as a flow chart of the control method of the text retrieval system of the present application. The second embodiment of the present application is provided. Before step S10, the following steps are included:
[0077] Step S01: Obtain content to be constructed, and extract entity, attribute and relationship information of the content to be constructed;
[0078] Obtain the relevant data for the knowledge graph to be constructed, which can be text, web pages, databases, etc. Clean and tokenize the relevant data, remove stop words and meaningless symbols, and segment the text into basic word units. Identify entities in the preprocessed data. Entities usually refer to words with specific meanings, such as person names, place names, organization names, etc. Named Entity Recognition (NER) technology can be used for entity recognition. And extract attribute information from the text. Attribute information usually refers to the features or characteristics associated with entities, such as the gender of a person's name, the geographical location of a place name, etc. Attribute information can assist in determining the characteristics and relationships of entities. As an alternative implementation for extracting attribute information, use predefined rules, such as regular expressions, templates, etc., to identify the attributes of entities. For example, for a person's name, the template "[person's name]'s gender is [gender]" can be used to extract the gender attribute. As another alternative implementation for extracting attribute information, use the labeled data to train a model to identify the attributes of entities. For example, data of person names with gender labels can be used to train a model, and then this model can be used to identify the genders of person names in new data. At the same time, identify the relationships between entities in the text. Relationship extraction can be achieved through methods such as pattern matching and machine learning. Relationships can usually be represented as entity pairs and relationship types.
[0079] Step S02: Determine the term frequency and inverse document frequency of the entity;
[0080] For each entity, calculate its term frequency (TF) and inverse document frequency (IDF) in the content to be constructed. Term frequency refers to the frequency of an entity appearing in the content to be constructed, and the calculation formula is: TF(t) = (the number of times t appears in the document) / (the total number of words in the document). Inverse document frequency is a measure of how common a word is. If a word appears in many documents in the document set, then it may be a common word, such as "of", "is", etc. To reduce the influence of these common words, we use inverse document frequency to weight them. The calculation formula is: IDF(t) = log_e(total number of documents / (number of documents containing word t + 1)). These two values can help evaluate the importance of an entity in the content to be constructed.
[0081] Step S03: Determine the TF-IDF value according to the term frequency and the inverse document frequency, and perform initial weight annotation on the entity according to the TF-IDF value;
[0082] Multiply the term frequency (TF) and the inverse document frequency (IDF) to get the TF-IDF (Term Frequency-Inverse Document Frequency) value. The larger the TF-IDF value, the more important the term is in the document. The calculation formula is: TF-IDF (t) = TF (t) * IDF (t). According to the TF-IDF value, the entity is initially labeled with the weight. The weight can be labeled as a level or a continuous value for visualization and analysis in subsequent steps.
[0083] Step S04: converting the entity, the attribute and the relationship information annotated with the initial weight into initial structured data;
[0084] The entities, attributes and relationship information that have been annotated with initial weights are integrated together to form initial structured data. The initial structured data can be stored in the form of tables or databases for subsequent processing and analysis.
[0085] Step S05: Generate an initial knowledge graph based on the initial structured data.
[0086] Based on the initial structured data, an initial knowledge graph is generated. The initial knowledge graph contains entity, attribute and relationship information, as well as the initial weight of the entity.
[0087] In the initial knowledge graph including the initial weights, step S20 includes:
[0088] Step S21: determining the real-time weight of the target node according to the total number of nodes in the initial knowledge graph and the number of associated nodes of the target node;
[0089] Step S22: determining a target weight according to the TF-IDF value, the real-time weight and a preset weight determination method;
[0090] As an optional implementation method for determining the target weight, the real-time weight and TF-IDF value are weighted again to evaluate the influence of the two weight values on the result, and then the weighted average is taken. For example, if the real-time weight has a greater influence, it has a higher weight, and vice versa. The specific weight value can be determined according to the actual situation.
[0091] As another optional implementation method for determining the target weight, the real-time weight and TF-IDF value are first normalized to unify the dimensions, and then their coordinated average value is taken as the final target weight value.
[0092] As another optional implementation for determining the target weight, the final target weight value is determined according to the minimum value of the real-time weight and the TF-IDF value, because the minimum value can better reflect possible problems.
[0093] As another optional implementation method for determining the target weight, a prediction model is established using statistical and machine learning methods, which inputs the real-time weight and TF-IDF value and outputs an optimal target weight value. For example, models such as linear regression, decision tree, and neural network can be used.
[0094] Finally, rendering parameters are determined according to the target weight, and based on the rendering parameters and the initial knowledge graph, the search results corresponding to the search instruction are generated and / or determined. The specific implementation method of this step refers to step S30 in the first embodiment, and this embodiment will not be elaborated in detail here.
[0095] In this embodiment, by calculating the real-time weight and target weight of the node, the activity and importance of the node in the knowledge graph are taken into account, which can better reflect the status and value of the node in the knowledge graph. This helps to improve the accuracy and relevance of the retrieval results.
[0096] In addition, an embodiment of the present application also proposes a control device for a text retrieval system.
[0097] Reference Figure 5 , Figure 5 This is a schematic diagram of the control device structure of the text retrieval system in the hardware operating environment involved in the embodiment of the present application.
[0098] like Figure 5 As shown, the control device of the text retrieval system may include: a processor 1001, such as a core processor (Central Processing Unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (WIreless-FIdelity, WI-FI) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) memory, or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0099] Those skilled in the art will understand that Figure 5The structure shown in the figure does not constitute a limitation on the control device of the text retrieval system, and may include more or less components than those shown in the figure, or combine certain components, or arrange the components differently.
[0100] like Figure 5 As shown, the memory 1005 as a readable storage medium may include an operating system, a data storage module, a network communication module, a user interface module and a control program of the text retrieval system.
[0101] exist Figure 5 In the control device of the text retrieval system shown, the network interface 1004 is mainly used for data communication with other devices; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the control device of the text retrieval system of the present application can be set in the control device of the text retrieval system, and the control device of the text retrieval system calls the control program of the text retrieval system stored in the memory 1005 through the processor 1001, and executes the control method of the text retrieval system provided in the embodiment of the present application.
[0102] In addition, an embodiment of the present application also provides a readable storage medium.
[0103] The readable storage medium of the present application stores a control program of the text retrieval system, and when the control program of the text retrieval system is executed by a processor, the steps of the control method of the text retrieval system as described above are implemented.
[0104] Among them, the specific embodiments of the control program of the text retrieval system stored in the readable storage medium of the present application being executed by the processor are basically the same as the embodiments of the control method of the text retrieval system mentioned above, and will not be described in detail here.
[0105] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, the elements defined by the sentence "including a control of a text retrieval system" do not exclude the existence of other identical elements in the process, method, article or system including the element.
[0106] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0107] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product is stored in a readable storage medium (such as ROM / RAM, disk, CD) as described above, including a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the method described in the embodiment of the present application.
[0108] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A control method for a text retrieval system, characterized in that: The control method of the text retrieval system comprises the following steps: Upon receiving a search instruction, determining a target node corresponding to the search instruction in the initial knowledge graph; Determine the weight of the target node according to the total number of nodes in the initial knowledge graph and the number of associated nodes of the target node; Determine rendering parameters according to the weights, and generate and / or determine search results corresponding to the search instructions according to the rendering parameters and the initial knowledge graph; Before the step of determining the weight of the target node according to the total number of nodes in the initial knowledge graph and the number of associated nodes of the target node, the method further includes: Detecting the data scale of the initial knowledge graph, the data complexity of the target node, and the hierarchical analysis requirements of the target node; wherein the data scale includes the total number of nodes and the total number of edges of the initial knowledge graph, the data complexity includes the number of associated nodes and the number of associated relationship types of the target node, and the hierarchical analysis requirements are evaluated according to the position and role of the target node in the initial knowledge graph; Standardizing the data scale, the data complexity, and the hierarchical analysis requirements, and calculating a comprehensive impact value based on the standardized values; When the comprehensive impact value reaches a preset threshold, determining a community associated with the target node, wherein the community is determined by a community detection algorithm; The step of determining the weight of the target node according to the total number of nodes in the initial knowledge graph and the number of associated nodes of the target node comprises: Determining the weight of the target node according to the total number of nodes within the community and the number of associated nodes of the target node; The step of determining rendering parameters according to the weights, and generating and / or determining search results corresponding to the search instructions according to the rendering parameters and the initial knowledge graph, includes: According to the weight of the target node, weight-label the target node, and convert the weight-labeled target node into structured data; Detecting the data scale, attribute type and weight distribution of the structured data; Determining the number of visual attributes to be displayed according to the data size; Determining a visual attribute combination to be applied according to the attribute type and the display quantity; Determining rendering parameters of the visual attribute combination to be applied according to the weight distribution; Generate a search result corresponding to the search instruction according to the rendering parameters and the initial knowledge graph.
2. The control method of the text retrieval system according to claim 1, characterized in that: Before the step of determining the target node corresponding to the search instruction in the initial knowledge graph upon receiving the search instruction, the method further includes: Acquire content to be constructed, and extract entity, attribute and relationship information of the content to be constructed; determining a term frequency and an inverse document frequency of the entity; Determine a TF-IDF value according to the word frequency and the inverse document frequency, and perform initial weight labeling on the entity according to the TF-IDF value; Converting the entities, attributes and relationship information annotated with initial weights into initial structured data; An initial knowledge graph is generated based on the initial structured data.
3. The control method of the text retrieval system according to claim 2, characterized in that: The step of determining the weight of the target node according to the total number of nodes in the initial knowledge graph and the number of associated nodes of the target node comprises: Determine the real-time weight of the target node according to the total number of nodes in the initial knowledge graph and the number of associated nodes of the target node; Determine a target weight according to the TF-IDF value, the real-time weight and a preset weight determination method; The step of determining rendering parameters according to the weights, and generating and / or determining search results corresponding to the search instructions according to the rendering parameters and the initial knowledge graph includes: Rendering parameters are determined according to the target weight, and retrieval results corresponding to the retrieval instruction are generated and / or determined according to the rendering parameters and the initial knowledge graph.
4. The control method of the text retrieval system according to claim 1, characterized in that: The step of determining rendering parameters according to the weights, and generating and / or determining search results corresponding to the search instructions according to the rendering parameters and the initial knowledge graph, further includes: According to the weight of the target node, weight labeling is performed on the target node; Inputting the weighted labeled initial knowledge graph into a pre-trained relationship graph optimization model, wherein the relationship graph optimization model adjusts the rendering parameters of the target node according to the weighted annotation to output a visual relationship graph; The visualized relationship graph output by the pre-trained relationship graph optimization model is obtained, and the visualized relationship graph is determined to be a retrieval result corresponding to the retrieval instruction.
5. A control device for a text retrieval system, characterized in that: The device comprises: a memory, a processor, and a control program of a text retrieval system stored in the memory and executable on the processor, wherein the control program of the text retrieval system is configured to implement the steps of a control method of a text retrieval system as claimed in any one of claims 1 to 4.
6. A readable storage medium, characterized in that: The readable storage medium stores a control program of the text retrieval system, and when the control program of the text retrieval system is executed by the processor, the steps of the control method of the text retrieval system according to any one of claims 1 to 4 are implemented.
