Knowledge retrieval method, system and computer device based on multi-dimensional label
By combining a multidimensional retrieval method with manual tags and large model tags, the problem of low retrieval efficiency of traditional single tags in construction industry documents is solved, efficient and accurate knowledge retrieval is achieved, the retrieval needs of different scenarios are adapted, and the user experience is improved.
Patent Information
- Application Number
- CN202511028298.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-25
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2045-07-25
AI Technical Summary
Traditional single-label classification methods are unable to meet the needs of fast and accurate knowledge retrieval in the complex and ever-changing construction industry documents. Manual labeling is inefficient and lacks unified standards for manual labeling, resulting in inaccurate and inefficient retrieval results.
A knowledge retrieval method based on multidimensional labels is adopted, combining manual labels with labels automatically generated by large models for combined retrieval. The optimal result is selected by calculating the relevance score, or when manual labels are lacking, labels are automatically generated by the large model for retrieval.
It improves the precision and efficiency of knowledge retrieval, ensures the accuracy and stability of retrieval results, adapts to the retrieval needs of different scenarios, and provides a better user experience.
Smart Images

Figure CN120541194B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, in particular to a knowledge retrieval method and system based on multi-dimensional labels and a computer device. BACKGROUND
[0002] The statements in this section merely provide background technology related to the present application and do not necessarily constitute prior art.
[0003] With the rapid development of large model technology, its application in the field of document analysis and knowledge management is increasingly widespread and in-depth. With powerful language understanding and generation capabilities, large models can efficiently process massive amounts of document data and mine the knowledge information hidden therein, providing strong support for enterprise knowledge management and decision support. However, in actual application, in order to ensure that the required information can be quickly and accurately obtained during knowledge retrieval, the traditional single label classification method has gradually shown its limitations and cannot meet the current complex and changing needs.
[0004] For example, in the construction industry, the knowledge slices of construction industry documents have high diversity and complexity. From the feasibility study report in the project planning stage, design drawings, to the construction log, quality inspection report during the construction process, to the acceptance file, operation and maintenance manual after completion, etc., various document formats are diverse and the content covers multiple dimensions such as technology, management, and economy. Moreover, as the construction project progresses, new documents are continuously generated and the knowledge system is continuously updated.
[0005] The traditional method of manually adding labels by users has the following problems when dealing with such a large number of documents and the need for quick and accurate retrieval: manually adding labels is inefficient and requires a lot of manpower and time cost. In the face of massive amounts of documents, manually adding labels one by one not only has a large workload, but also is prone to omissions or errors, affecting the accuracy and completeness of the labels; manual labeling lacks uniform standards, and different personnel may have different understandings and annotations of the same document, making it difficult to ensure the consistency of the labels, which makes it difficult to quickly locate accurate information based on the labels during subsequent knowledge retrieval, and the retrieval results may contain a large amount of irrelevant content or miss critical information. SUMMARY
[0006] In order to solve the problem that the traditional one-dimensional label cannot meet the accuracy of knowledge retrieval in complex situations, the present application provides a knowledge retrieval method and system based on multi-dimensional labels and a computer device. When there is an artificial label, the artificial label and the label automatically generated by the large model are combined for combined retrieval, improving the retrieval accuracy; when there is no artificial label, only the label automatically generated by the large model is used for retrieval, ensuring the stable operation of the retrieval process.
[0007] In order to achieve the above purpose, the present application adopts the following technical solutions:
[0008] In a first aspect, the present application provides a knowledge retrieval method based on multi-dimensional labels.
[0009] A knowledge retrieval method based on multi-dimensional labels comprises the following processes:
[0010] Obtaining a retrieval question of a user, and cutting knowledge content to be retrieved into multiple knowledge slices;
[0011] When the knowledge slice corresponds to an artificial label, a large language model generates a corresponding large model label according to the knowledge slice, calculates a relevance score according to the retrieval question, the large model label and the artificial label, and takes the knowledge slice with the largest relevance score as a retrieval result corresponding to the retrieval question;
[0012] When the knowledge slice has no artificial label, the large language model generates a corresponding large model label according to the knowledge slice, calculates a relevance score according to the retrieval question and the large model label, and takes the knowledge slice with the largest relevance score as a retrieval result corresponding to the retrieval question.
[0013] In a second aspect, the present application provides a knowledge retrieval system based on multi-dimensional labels.
[0014] A knowledge retrieval system based on multi-dimensional labels comprises:
[0015] A knowledge slice generation unit configured to obtain a retrieval question of a user, and cut knowledge content to be retrieved into multiple knowledge slices;
[0016] A multi-dimensional label retrieval unit configured to, when the knowledge slice corresponds to an artificial label, generate a corresponding large model label according to the knowledge slice by a large language model, calculate a relevance score according to the retrieval question, the large model label and the artificial label, and take the knowledge slice with the largest relevance score as a retrieval result corresponding to the retrieval question;
[0017] A large model label retrieval unit configured to, when the knowledge slice has no artificial label, generate a corresponding large model label according to the knowledge slice by a large language model, calculate a relevance score according to the retrieval question and the large model label, and take the knowledge slice with the largest relevance score as a retrieval result corresponding to the retrieval question.
[0018] In a third aspect, the present application provides a computer device comprising a processor and a computer readable storage medium.
[0019] The processor is adapted to execute a computer program.
[0020] A computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and the computer program, when executed by a processor, implements the knowledge retrieval method based on multi-dimensional labels according to the first aspect of the present application.
[0021] Compared with the prior art, the present application has the following advantages:
[0022] 1. The present application innovatively proposes a knowledge retrieval method based on multi-dimensional labels. In the case that knowledge slices have artificial labels, the combination retrieval mode of artificial labels and automatically generated labels by a large model is used to improve the retrieval accuracy. Artificial labels condense the knowledge and experience of professionals, have high accuracy and pertinence, but may have limited coverage. The labels generated by a large language model can deeply mine potential information in knowledge slices, capture details and correlations that artificial labels cannot cover, and select the optimal knowledge slice as the result by calculating the relevance scores of the two, thereby fully utilizing the advantages of the two and making the retrieval result more accurate and comprehensive, greatly meeting the user's demand for high-quality retrieval. When knowledge slices lack artificial labels, the method can still operate stably. The large language model automatically generates labels according to the keywords of the knowledge slices and calculates the relevance scores to determine the retrieval result. This process does not require human intervention, effectively avoids retrieval obstacles caused by the absence of artificial labels, and ensures the continuity and stability of retrieval services.
[0023] 2. The present application innovatively proposes a knowledge retrieval method based on multi-dimensional labels. The similarity between the large model labels and the retrieval problem is calculated to obtain the large model label score, and the artificial label score is obtained according to the artificial label weight. The two are weighted and summed as the relevance score, which comprehensively considers the professionalism of artificial labels and the intelligence of large model labels. The artificial label weight can be flexibly adjusted according to actual needs, making the result more suitable for specific scenarios. The large model label score fully utilizes the powerful semantic understanding ability of the large model to accurately capture the correlation between knowledge slices and retrieval problems. The combination of the two can more comprehensively and accurately measure the relevance of knowledge slices and retrieval problems. Whether the knowledge slices have artificial labels or not, it can provide a reliable basis for selecting the optimal knowledge slice, effectively improve the accuracy and efficiency of knowledge retrieval, and bring users a better retrieval experience.
[0024] 3. The application innovatively proposes a knowledge retrieval method based on multi-dimensional labels, which sets the preset weight of the artificial label score to be greater than the preset weight of the large model label score, has a unique technical effect, the artificial label is usually annotated by professional personnel based on rich experience and professional knowledge, has high accuracy and pertinence, and giving it a greater weight can ensure that the retrieval result is more in line with professional logic and actual needs, and guarantees the reliability of the result, while the large model label can excavate potential information with the help of the powerful semantic analysis capability of the large language model, but there may be some errors, through this weight setting, the professional leading role of the artificial label is highlighted while fully utilizing the intelligent analysis capability of the large model, making the calculation of the relevance score more scientific and reasonable, and thus improving the accuracy of knowledge retrieval, so that the finally selected knowledge slice can more accurately match the user's retrieval problem, and provide the user with better and more reliable retrieval results.
[0025] 4. The application innovatively proposes a knowledge retrieval method based on multi-dimensional labels, when there is a professional term in the preset professional term library in the retrieval problem, the problem is more professional, at this time, the preset weight of the artificial label score is increased, the accuracy and authority of the artificial label in the professional field annotation can be fully utilized, and the retrieval result is more in line with professional needs; if there is no professional term, the preset weight of the large model label score is increased, the powerful semantic understanding and analysis capability of the large language model can be better utilized to excavate the potential association between the knowledge slice and the general retrieval problem, and the calculation of the relevance score is more in line with the characteristics of different retrieval problems in this way of dynamically adjusting the weight, whether the problem is professional or not, the knowledge slice matched with the problem can be more accurately selected, the accuracy and adaptability of retrieval are improved, and better retrieval service is provided for the user.
[0026] 5. The application innovatively proposes a knowledge retrieval method based on multi-dimensional labels, when the knowledge slice has no artificial label, the large model label score obtained by calculating the similarity between the large model label and the retrieval problem is directly used as the relevance score, the large language model has powerful semantic understanding and analysis capability, can accurately capture the large model label generated by the key information of the knowledge slice, and performs similarity calculation with the retrieval problem, so that the semantic association between the two can be effectively excavated, this way of directly using the large model label score avoids the complex calculation and uncertainty caused by the lack of artificial label, simplifies the calculation process, improves the retrieval efficiency, and at the same time, with the help of the capability of the large language model, the relevance score can accurately reflect the matching degree of the knowledge slice and the retrieval problem to a certain extent, so as to quickly and accurately screen out suitable retrieval results for the user, and ensure that the retrieval process is stable and efficient.
[0027] 6、The application innovatively proposes a knowledge retrieval method based on multi-dimensional labels, for any current knowledge slice, when there are multiple artificial labels and each artificial label corresponds to a weight score, the mean of all weight scores is taken as the artificial label score, since the importance of different artificial labels in reflecting the characteristics of the knowledge slice and the relevance to the retrieval problem may be different, setting their respective weight scores can more finely reflect their value, and taking the mean comprehensively considers the influence of each label, avoiding the deviation caused by the excessively high or low weight of a single label, so that the artificial label score can more comprehensively and objectively represent the characteristics of the knowledge slice based on artificial labeling, which helps to more accurately measure the matching degree of the knowledge slice and the retrieval problem when calculating the relevance score subsequently, thereby improving the accuracy of the retrieval result and providing more reliable and valuable knowledge retrieval services for users.
[0028] 7、The application innovatively proposes a knowledge retrieval method based on multi-dimensional labels, for any current knowledge slice, when there are multiple artificial labels and each artificial label corresponds to a weight score, the mean of all weight scores is taken as the artificial label score, since the importance of different artificial labels in reflecting the characteristics of the knowledge slice and the relevance to the retrieval problem may be different, setting their respective weight scores can more finely reflect their value, and taking the mean comprehensively considers the influence of each label, avoiding the deviation caused by the excessively high or low weight of a single label, so that the artificial label score can more comprehensively and objectively represent the characteristics of the knowledge slice based on artificial labeling, which helps to more accurately measure the matching degree of the knowledge slice and the retrieval problem when calculating the relevance score subsequently, thereby improving the accuracy of the retrieval result and providing more reliable and valuable knowledge retrieval services for users.
[0029] Advantages of the additional aspects of the application will be in part apparent from the following description, from the accompanying drawings, or from the practice of the application. BRIEF DESCRIPTION OF DRAWINGS
[0030] The accompanying drawings, which form a part of the specification, are included to provide a further understanding of the application and are incorporated herein by reference. The illustrations are shown for the purpose of enabling those skilled in the art to implement the application, and are not intended to limit the scope of the application.
[0031] Figure 1 A principle diagram of the knowledge retrieval method based on multi-dimensional labels provided for an exemplary embodiment of the application is shown;
[0032] Figure 2 A principle diagram of the knowledge retrieval method based on multi-dimensional labels provided for an exemplary embodiment of the application is shown;
[0033] Figure 3A flowchart of a weight adjustment method provided by an exemplary embodiment of the present invention;
[0034] Figure 4 A schematic diagram of a multi-dimensional tag-based knowledge retrieval system provided by an exemplary embodiment of the present invention;
[0035] Figure 5 A schematic diagram of a computer device is provided for an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0036] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0037] It should be noted that the following detailed descriptions are exemplary and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present invention belongs.
[0038] This implementation proposes a knowledge retrieval method based on multi-dimensional tags, such as Figure 1 As shown, the following process is included:
[0039] S101: Obtain the user's search question and divide the knowledge content to be retrieved into multiple knowledge slices;
[0040] S102: When manual labels are set for knowledge slices, the large language model generates corresponding large model labels based on the knowledge slices, calculates a relevance score based on the search question, the large model labels, and the manual labels, and takes the knowledge slice with the largest relevance score as the search result corresponding to the search question;
[0041] S103: When the knowledge slice does not have a manual label, the large language model generates a corresponding large model label based on the knowledge slice, calculates the relevance score based on the retrieval question and the large model label, and takes the knowledge slice with the largest relevance score as the retrieval result corresponding to the retrieval question.
[0042] In this implementation, preferably, Figure 2 As shown, the knowledge content to be retrieved is the original document, and the original document is subjected to multimodal analysis. Based on the BERT model, the text in the knowledge content to be retrieved is parsed, and the keywords in the text are extracted; based on the feature extraction network model (for example, combining OCR extraction and CNN network), the drawings in the knowledge content to be retrieved are parsed, and the drawing features are extracted. Knowledge slices are obtained based on the keywords and drawing features, and multiple knowledge slices are obtained based on the keywords or keyword extraction results and the feature recognition results. The knowledge slices are manually labeled to obtain artificial labels, and the large model is used to automatically generate labels (that is, large model labels), and finally a component hybrid (that is, a mixture of manual labels and large model labels) weighted indexing is achieved.
[0043] More specifically, the text in the knowledge content to be searched is cleaned to remove special characters, punctuation marks, stop words (such as "of", "is", "in" and other words without actual meaning) and other interference information, the text is processed by word segmentation to divide the continuous text string into individual words or phrases, the preprocessed text is input into the pre-trained BERT model, the BERT model encodes each word in the text to generate word vectors containing rich semantic information, these word vectors can capture the semantic relationship of words in the context, each word in the text is marked as a keyword or a non-keyword, thereby directly extracting the keywords.
[0044] The drawing in the knowledge content to be searched is converted in format to ensure that the drawing can be correctly read by the feature extraction network model, for example, drawings in different formats are converted into a general format supported by the model; the drawing is normalized to adjust the size, color space and the like of the drawing to meet the input requirements of the model; a suitable feature extraction network model is selected according to the type of the drawing (such as mechanical drawing, architectural drawing, etc.), common models include convolutional neural network (CNN) and its variants (such as ResNet, VGG, etc.), or OCR+CNN is used for recognition (OCR recognizes characters and extracts character features, CNN extracts features of image regions); the preprocessed drawing is input into the selected feature extraction network model, the model gradually extracts the low-level features (such as edges, textures, etc.) and high-level semantic features of the drawing through multiple layers of convolution, pooling and other operations, finally, the model outputs a fixed-length feature vector, which can represent the main feature information of the drawing.
[0045] In this implementation, the keyword information extracted from the text and the feature vector extracted from the drawing are fused. A simple splicing method can be used to connect the vector representation of the keyword (which can be obtained by word vector averaging, etc.) with the drawing feature vector to form a comprehensive feature representation; more complex fusion methods such as weighted fusion, attention mechanism-based fusion, etc. can be used to better combine the information of the text and the drawing; the fused features are divided according to certain rules to generate knowledge slices. For example, it can be divided according to the theme, chapter, etc. of the knowledge content, each slice corresponds to a specific theme or part, or it can be clustered according to the similarity of the features to combine similar features to form a knowledge slice; or, for example, in the building specification document, the splitting point is the "chapter theme change" (such as from the "material requirements" chapter to the "construction process" chapter), and the keywords extracted by the BERT model are clustered (such as "concrete strength" related content is clustered into a slice), and the knowledge slice is split; for example, in the CAD drawing, the splitting basis is the "component type" (beam, column, node), combined with the text label (such as "KZ1 column seismic structure") extracted by OCR and the graphic features recognized by CNN, the CAD drawing is split into "column structure slice", "beam structure slice", etc.
[0046] In this implementation, preferably, the user can manually create and manage artificial labels, and the user can manually add labels on the knowledge management page.
[0047] In this implementation, preferably, when searching, if the entire knowledge content has been manually labeled by the user (i.e. artificial labels are set), the artificial labels manually labeled by the user will have a greater weight, for example, the weight coefficient of the artificial label is in the interval [0.7, 1.0], and the weight coefficient of the large model label is in the interval [0.3, 0.6].
[0048] When the knowledge slice corresponds to an artificial label, the relevance score is calculated according to the search question, the large model label and the artificial label, including:
[0049] (1);
[0050] Wherein, α is the weight coefficient of the artificial label (which can be set to 0.7 by default), is the sum of the weights of all artificial labels of a certain knowledge slice, for example, a knowledge slice has three label weights (0.8, 0.9 and 1.0 respectively), the total is 2.7, represents the number of artificial labels; β is the weight coefficient of the large model label (the default value is set to 0.3), which is automatically generated according to the knowledge slice, represents the query question Similarity score (between 0-1) with large model tags .
[0051] The present implementation provides a search example as follows:
[0052] User's search question: "seismic requirements of concrete structure";
[0053] Artificial tags: ["GB50011 specification" (weight 0.9), "seismic design" (weight 0.8)];
[0054] Large model tags: ["concrete strength", "beam-column joint"].
[0055] According to the above search question, artificial tags and large model tags, the correlation score is calculated, specifically including:
[0056] (1) Artificial tag score: ;
[0057] (2) Large model tag score:
[0058] When calculating the similarity between the large model tags and the search question, the semantic correlation between the two can be more accurately grasped, and compared with traditional similarity calculation methods, the similarity score can be more accurately given, thereby providing a more reliable data basis for the large model tag score and the subsequent correlation score calculation, specifically including:
[0059] ("concrete structure seismic requirements", "concrete strength") = 0.72;
[0060] ("concrete structure seismic requirements", "beam-column joint") = 0.35;
[0061] Take the maximum value 0.72, and multiply it by β to get the large model tag score: 0.3 x 0.72 = 0.216;
[0062] (3) The correlation score is: 0.595 + 0.216 = 0.811.
[0063] The correlation score of each knowledge slice is calculated in turn, and the knowledge slice with the maximum correlation score is taken as the search result corresponding to the search question.
[0064] In this implementation, the artificial label can ensure accurate matching of professional knowledge, and the large model label can effectively extract the main content, for example, mapping the user's search "anti-seismic requirements" to "beam-column joint". When the knowledge is not manually added with a label, automatically switch to the pure AI mode (i.e., the large model mode), and ensure that the label function can still play a role in document search.
[0065] In this implementation, a method for adaptive adjustment of weight coefficients is also proposed, as shown in Figure 3 The user initiates a query (i.e., proposes a search problem), first determines whether the search problem input by the user includes an accurate professional term (i.e., whether an accurate professional term exists in the preset professional term library), if the search problem includes an accurate professional term, the weight coefficient of the artificial label is increased to 0.8; if the search problem does not include a professional term, the weight coefficient of the large model label is increased to 0.6, according to the adjusted weight coefficients, the relevance (Relevance) is calculated according to formula (1) to determine the relevance ranking of the search results, and the calculated search results are displayed to the user, and the user's click on the search results is recorded as feedback information, according to the user's click feedback, the values of the parameters a and β are dynamically adjusted to optimize the subsequent search result relevance calculation, this process adjusts the parameters by judging the query content type, and dynamically optimizes in combination with the user feedback, aiming to improve the relevance of the search results and the user satisfaction.
[0066] Optionally, in other implementations, the label weight is dynamically updated according to the search hit frequency of the knowledge slice and user feedback, so that the search is more in line with the actual use requirements, specifically including:
[0067] (2);
[0068] (3);
[0069] wherein, represents the updated weight of the artificial label, represents the weight of the artificial label before updating, represents the weight iteration rate (default is 0.1), and H represents the historical search hit frequency of the knowledge slice, represents the user feedback coefficient (good for 1, bad for -1, and no feedback for 0).
[0070] Optionally, in other implementations, the click, collection and other behaviors of the historical search results are used to optimize the relevance score calculation in reverse, to improve the long-term search accuracy, specifically including:
[0071] (4);
[0072] wherein, represent the enhanced correlation score, represent the original correlation score, i.e., the result of formula (1), represent the feedback enhancement coefficient (default 0.2), represent the user behavior coefficient (0.5 for clicking, 1.0 for collecting, and 0 for no action), represent the number of historical behavior records.
[0073] Figure 4 A knowledge retrieval system based on multi-dimensional tags is shown, comprising:
[0074] A knowledge slice generation unit 401 configured to: acquire a user's retrieval question, and divide the knowledge content to be retrieved into multiple knowledge slices;
[0075] A multi-dimensional tag retrieval unit 402 configured to: when the knowledge slice corresponds to an artificial tag, the large language model generates a corresponding large model tag according to the knowledge slice, calculates a correlation score according to the retrieval question, the large model tag, and the artificial tag, and takes the knowledge slice with the largest correlation score as the retrieval result corresponding to the retrieval question;
[0076] A large model tag retrieval unit 403 configured to: when the knowledge slice has no artificial tag, the large language model generates a corresponding large model tag according to the knowledge slice, calculates a correlation score according to the retrieval question and the large model tag, and takes the knowledge slice with the largest correlation score as the retrieval result corresponding to the retrieval question.
[0077] It can be understood that the above-mentioned units can be combined into one or several other units respectively or all, or some of them can be further split into a plurality of units with smaller functions to constitute, which can realize the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions, and in actual application, the functions of one unit can also be realized by multiple units, or the functions of multiple units can be realized by one unit. In other embodiments of the present application, the system can also include other units, and in actual application, these functions can also be realized by other units, and can be realized by multiple units in cooperation.
[0078] According to another embodiment of the present application, the system described in the embodiment can be constructed by running a computer program (including program codes) capable of performing each step involved in the corresponding method of the present application on a general computing device such as a computer including processing elements and storage elements such as a Central Processing Unit (CPU), a Random Access Memory (RAM), a Read Only Memory (ROM), etc., the computer program can be recorded on a computer readable recording medium and loaded into the above-mentioned computing device through the computer readable recording medium and run therein.
[0079] Figure 5 A computer device is shown, which includes a processor 501, a communication interface 502, and a computer readable storage medium 503. Among them, the processor 501, the communication interface 502, and the computer readable storage medium 503 can be connected through a bus or other means.
[0080] Among them, the communication interface 502 is used to receive and send data, the computer readable storage medium 503 can be stored in the memory of the electronic device, the computer readable storage medium 503 is used to store a computer program, the computer program includes program instructions, and the processor 501 is used to execute the program instructions stored by the computer readable storage medium 503.
[0081] The processor 501 is the computing core and control core of the electronic device, which is suitable for implementing one or more instructions, and is particularly suitable for loading and executing one or more instructions to implement a corresponding method flow or a corresponding function.
[0082] The processor 501 is configured to perform the following process:
[0083] Obtain a search question of a user, and divide knowledge content to be searched into multiple knowledge slices;
[0084] When the knowledge slice corresponds to a manually labeled label, the large language model generates a corresponding large model label according to the knowledge slice, calculates a relevance score according to the search question, the large model label, and the manually labeled label, and takes the knowledge slice with the largest relevance score as the search result corresponding to the search question;
[0085] When the knowledge slice has no manually labeled label, the large language model generates a corresponding large model label according to the knowledge slice, calculates a relevance score according to the search question and the large model label, and takes the knowledge slice with the largest relevance score as the search result corresponding to the search question.
[0086] The application further provides a computer readable storage medium, which is a memory device in an electronic device and is used for storing programs and data. It can be understood that the computer readable storage medium herein can include a built-in storage medium in the electronic device and can also include an extended storage medium supported by the electronic device. The computer readable storage medium provides a storage space, and the storage space stores a processing system of the electronic device.
[0087] In addition, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space, and the instructions can be one or more computer programs (including program codes). It should be noted that the computer readable storage medium herein can be a high-speed RAM memory or a non-volatile memory such as at least one disk memory; optionally, the computer readable storage medium can also be at least one computer readable storage medium located away from the aforementioned processor.
[0088] In one embodiment, the computer readable storage medium stores one or more instructions; the processor loads and executes the one or more instructions stored in the computer readable storage medium to implement the following process:
[0089] obtaining a search question of a user, and dividing knowledge content to be searched into a plurality of knowledge slices;
[0090] when the knowledge slice corresponds to a manually labeled label, the large language model generates a corresponding large model label according to the knowledge slice, calculates a relevance score according to the search question, the large model label and the manually labeled label, and takes the knowledge slice with the largest relevance score as a search result corresponding to the search question;
[0091] when the knowledge slice has no manually labeled label, the large language model generates a corresponding large model label according to the knowledge slice, calculates a relevance score according to the search question and the large model label, and takes the knowledge slice with the largest relevance score as a search result corresponding to the search question.
[0092] The application further provides a computer program product or a computer program, which includes computer instructions stored in a computer readable storage medium. The processor of the electronic device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to enable the electronic device to perform the following process:
[0093] obtaining a search question of a user, and dividing knowledge content to be searched into a plurality of knowledge slices;
[0094] When the knowledge slice corresponds to a manually labeled artificial label, the large language model generates a corresponding large model label according to the knowledge slice, calculates a relevance score according to the retrieval question, the large model label, and the artificial label, and takes the knowledge slice with the largest relevance score as the retrieval result corresponding to the retrieval question.
[0095] When the knowledge slice does not have an artificial label, the large language model generates a corresponding large model label according to the knowledge slice, calculates a relevance score according to the retrieval question and the large model label, and takes the knowledge slice with the largest relevance score as the retrieval result corresponding to the retrieval question.
[0096] Those skilled in the art can appreciate that the units and algorithm steps of the examples described in combination with the embodiments disclosed in the present application can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0097] In the above embodiments, all or part can be realized by software, hardware, firmware, or any combination thereof. When realized by software, all or part can be realized in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions according to the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. Computer instructions can be stored in a computer-readable storage medium or transmitted by a computer-readable storage medium. Computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wired (e.g., coaxial cable, optical fiber, digital line) or wireless (e.g., infrared, wireless, microwave, etc.) methods. The computer-readable storage medium can be any available medium that the computer can access or a data processing device such as a server, data center, etc. that includes one or more available media sets. The available media can be magnetic media (e.g., floppy disk, hard disk, magnetic tape), optical media (e.g., DVD), or semiconductor media (e.g., solid state disk), etc.
[0098] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method of knowledge retrieval based on multi-dimensional tags, characterized by, The method comprises the following steps: obtaining a search question of a user, and dividing knowledge content to be searched into multiple knowledge slices; when the knowledge slice corresponds to an artificial label, a large language model generates a corresponding large model label according to the knowledge slice, and calculates a relevance score according to the search question, the large model label and the artificial label, comprising: ; wherein a is a weight coefficient of the artificial label, is a sum of weights of all artificial labels of a certain knowledge slice, represents the number of artificial labels; β is a weight coefficient of the large model label, represents a query question and the similarity score of the large model label , and the knowledge slice with the largest correlation score is taken as the retrieval result corresponding to the retrieval question. analyzing the search question to determine whether there is a professional term in a preset professional term library in the search question, if there is a professional term, increasing a preset weight of the artificial label score by a first preset amount, and if there is no professional term, increasing a preset weight of the large model label score by a second preset amount; when the knowledge slice has no artificial label, the large language model generates a corresponding large model label according to the knowledge slice, and calculates a relevance score according to the search question and the large model label, and takes the knowledge slice with the largest relevance score as the search result corresponding to the search question; based on a BERT model, analyzing text in the knowledge content to be searched to extract keywords in the text, and based on a feature extraction network model, analyzing drawings in the knowledge content to be searched to extract drawing features, and obtaining the knowledge slice according to the keywords and the drawing features.
2. The knowledge search method based on multi-dimensional labels according to claim 1, wherein the relevance score is calculated according to the search question, the large model label and the artificial label, comprising: calculating the similarity between the large model label and the search question as the large model label score, obtaining the artificial label score according to the weight of the artificial label, and taking the weighted sum of the large model label score and the artificial label score as the relevance score.
3. The knowledge search method based on multi-dimensional labels according to claim 2, wherein the preset weight of the artificial label score is greater than the preset weight of the large model label score.
4. The knowledge search method based on multi-dimensional labels according to claim 2, wherein the relevance score is calculated according to the search question and the large model label, comprising: calculating the similarity between the large model label and the search question as the large model label score, and directly taking the large model label score as the relevance score.
5. The knowledge search method based on multi-dimensional labels according to any one of claims 2-4, wherein for any one current knowledge slice, there are multiple artificial labels, each artificial label corresponds to a weight score, and the artificial label score is the average of all weight scores in the current knowledge slice.
6. The knowledge search method based on multi-dimensional labels according to any one of claims 2-4, wherein for any one current knowledge slice, there are multiple large model labels, the similarity between each large model label and the search question is calculated, and the maximum value of the similarity is taken as the large model label score. The method comprises the following steps: a knowledge slice generation unit configured to obtain a search question of a user, and divide knowledge content to be searched into multiple knowledge slices; a multi-dimensional label search unit configured to, when the knowledge slice corresponds to an artificial label, a large language model generates a corresponding large model label according to the knowledge slice, and calculates a relevance score according to the search question, the large model label and the artificial label, and takes the knowledge slice with the largest relevance score as the search result corresponding to the search question; 7. A multi-dimensional tag-based knowledge retrieval system employing the multi-dimensional tag-based knowledge retrieval method according to any one of claims 1 to 6, characterized by, The large model label retrieval unit is configured to: when the knowledge slice has no manual label, a large language model generates a corresponding large model label according to the knowledge slice, calculates a correlation score according to the retrieval question and the large model label, and takes the knowledge slice with the largest correlation score as the retrieval result corresponding to the retrieval question.
8. A computer device, comprising: Comprise: A processor and a computer readable storage medium; A processor adapted to execute a computer program; A computer readable storage medium having a computer program stored therein, wherein the computer program, when executed by the processor, implements the multi-dimensional label-based knowledge retrieval method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Information pushing method, device and system and medium
CN114817703A
Document processing method and device and information retrieval method and device
CN119577080A