Text retrieval method and device, equipment, storage medium and program product

By employing text vectorization processing and multi-dimensional query methods, the problem of low accuracy in engineering cost text retrieval was solved, achieving precise fusion of multi-dimensional results and high-accuracy retrieval.

CN121658637APending Publication Date: 2026-03-13BEIJING CTJ SOFTWARE
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202610171766.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-02-06
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing engineering cost text retrieval methods have limited query dimensions and low retrieval accuracy.

Method used

The system employs text vectorization and multi-dimensional query methods, including full-text search, business tag matching search, and vector semantic search. By setting differentiated weights, it achieves accurate fusion of multi-dimensional results and selects the target query result with the highest comprehensive score.

Benefits of technology

It improves the accuracy of engineering cost text retrieval, ensures that the query results match the core content of the target needs, and enhances the business adaptability and practicality of the query results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121658637A_ABST
    Figure CN121658637A_ABST
Patent Text Reader

Abstract

The invention provides a text retrieval method and device, equipment, a storage medium and a program product, and relates to the technical field of artificial intelligence. In some embodiments of the invention, a to-be-queried project cost text is obtained; vectorizing the project cost text to obtain a text vector; performing multi-dimensional query according to the text vector to obtain a plurality of candidate query results; selecting a target query result from the plurality of candidate query results according to the matching score of each candidate query result under the plurality of query dimensions; according to the method and the device, the text query is performed from multiple dimensions, and the target query result with relatively high accuracy is selected from the plurality of candidate query results, so that the retrieval accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of artificial intelligence technology, and in particular to a text retrieval method, apparatus, device, storage medium, and program product. Background Technology

[0002] Construction cost review is a core component of investment control and cost management in construction projects, spanning the entire process from project initiation, design, bidding, construction to completion. In practice, reviewers frequently need to search historical cost cases, standard quota clauses, bill of quantities descriptions, material and equipment specifications, and other professional texts to support price reasonableness assessments, comparison of engineering features, and citation of pricing bases. With the increasing complexity of construction projects and the surge in data volume, traditional methods relying on manual review and experience-based judgment are no longer sufficient to meet the demands for efficient and accurate reviews. Therefore, building an intelligent text retrieval system capable of understanding the professional semantics of construction cost estimates, integrating industry knowledge, and supporting multi-dimensional matching has become a key technological direction for improving the intelligence level of cost review.

[0003] Currently, text queries in the field of engineering cost mainly rely on two types of technical solutions: one is traditional keyword matching, which is based on complete or fuzzy matching of string literals (such as wildcards and substring inclusion). For example, if a user enters "Bailey Lighting Vehicle Installation", the system will only return documents containing the complete phrase or part of the characters. Its core logic is limited to the overlap at the character level and lacks an understanding of the meaning of the words. The other is general full-text search technology, which establishes a keyword-document mapping after segmenting the text through an inverted index mechanism, and matches relevant documents based on the segmentation results during the query.

[0004] Currently, the query dimensions for engineering cost text retrieval are limited, resulting in low retrieval accuracy. Summary of the Invention

[0005] This disclosure provides a text retrieval method, apparatus, device, storage medium, and program product to at least solve the problems of existing engineering cost text retrieval having a single query dimension and low retrieval accuracy.

[0006] The technical solution disclosed herein is as follows: This disclosure provides a text retrieval method, including: Retrieve the project cost document to be queried; The engineering cost text is vectorized to obtain a text vector; Perform multi-dimensional queries based on the text vector to obtain multiple candidate query results; The target query result is selected from the candidate query results based on the matching scores of each candidate query result across multiple query dimensions.

[0007] Optionally, the vectorization of the engineering cost text to obtain a text vector includes: The project cost text is preprocessed to obtain preprocessed text; The preprocessed text is input into the pre-trained language model to obtain text vectors.

[0008] Optionally, the multiple candidate query results include: a first query result, a second query result, and a third query result; the step of performing a multi-dimensional query based on the text vector to obtain multiple candidate query results includes: Keyword and business tag extraction is performed on the engineering cost text to obtain the keywords and business tags of the engineering cost text; A full-text search is performed based on the keywords in the engineering cost text to obtain the first query result; Based on the business tags of the engineering cost text, a business tag matching retrieval is performed to obtain the second query result; Vector semantic retrieval is performed based on the text vector to obtain the third query result.

[0009] Optionally, selecting the target query result from the multiple candidate query results based on the matching scores of each candidate query result across multiple query dimensions includes: Calculate the comprehensive score of each candidate query result based on the matching score and weight of each candidate query result across multiple query dimensions; Select the target query result whose comprehensive score meets the set score conditions from multiple candidate query results.

[0010] Optionally, calculating the comprehensive score of each candidate query result based on its matching score and weight across multiple query dimensions includes: The matching scores of each candidate query result under multiple query dimensions are normalized to obtain a normalized score. Based on the score threshold, the normalized score is subjected to threshold filtering to obtain the filtered matching score; Based on the filtered matching score and the weight, a comprehensive score is calculated for each candidate query result.

[0011] Optionally, the business tags include: subject term tags, keyword tags, proper noun tags, engineering quantity calculation tags, machinery, materials and equipment tags, application scenario tags, and relevant specification tags.

[0012] This disclosure also provides a text retrieval device, including: The acquisition module is used to retrieve the engineering cost text to be queried; The vector module is used to vectorize the engineering cost text to obtain a text vector. The query module is used to perform multi-dimensional queries based on the text vector to obtain multiple candidate query results; The selection module is used to select the target query result from multiple candidate query results based on the matching scores of each candidate query result under multiple query dimensions.

[0013] This disclosure also provides an electronic device, including: processor; Memory used to store processor-executable instructions; The processor is configured to execute instructions to implement the steps in the above method.

[0014] This disclosure also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.

[0015] This disclosure also provides a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps of the method described above.

[0016] The technical solutions provided by the embodiments of this disclosure have at least the following beneficial effects: In some embodiments of this disclosure, the engineering cost text to be queried is obtained; the engineering cost text is vectorized to obtain a text vector; a multi-dimensional query is performed based on the text vector to obtain multiple candidate query results; based on the matching score of each candidate query result under multiple query dimensions, the target query result is selected from the multiple candidate query results; this disclosure performs text query from multiple dimensions and selects the target query result with higher accuracy from the multiple candidate query results, thereby improving retrieval accuracy.

[0017] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.

[0019] Figure 1 A flowchart illustrating a text retrieval method provided as an exemplary embodiment of this disclosure; Figure 2 A schematic diagram of the structure of a text retrieval device provided for an exemplary embodiment of this disclosure; Figure 3 A schematic diagram of the structure of an electronic device provided for an exemplary embodiment of this disclosure. Detailed Implementation

[0020] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0021] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure.

[0022] It should be noted that the user information involved in this disclosure includes, but is not limited to, user device information and user personal information; the collection, storage, use, processing, transmission, provision and disclosure of user information in this disclosure all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0023] To address the aforementioned technical issues, in some embodiments of this disclosure, the following steps are taken: obtaining the engineering cost text to be queried; vectorizing the engineering cost text to obtain a text vector; performing multi-dimensional queries based on the text vector to obtain multiple candidate query results; and selecting the target query result from the multiple candidate query results based on the matching scores of each candidate query result under multiple query dimensions. This disclosure performs text queries from multiple dimensions and selects the target query result with higher accuracy from the multiple candidate query results, thereby improving retrieval accuracy.

[0024] The technical solutions provided by the embodiments of this disclosure are described in detail below with reference to the accompanying drawings.

[0025] Figure 1 This is a flowchart illustrating a text retrieval method provided as an exemplary embodiment of this disclosure. Figure 1 As shown, the method includes: S101: Retrieve the engineering cost text to be queried; S102: Vectorize the engineering cost text to obtain a text vector; S103: Perform multi-dimensional queries based on text vectors to obtain multiple candidate query results; S104: Select the target query result from multiple candidate query results based on the matching scores of each candidate query result across multiple query dimensions.

[0026] In this embodiment, the subject executing the above method is a terminal device or a server.

[0027] The terminal device includes, but is not limited to, mobile stations (MS), mobile terminals, mobile phones, handsets, and portable equipment. This terminal device can communicate with one or more core networks via a radio access network (RAN). For example, the terminal device can be a mobile phone (or "cellular" phone), a computer with wireless communication capabilities, a computer with wireless transceiver capabilities, a virtual reality (VR) terminal device, an AR terminal device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical care, a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, a wireless terminal in a smart home, etc. The operating systems installed on the terminal device include, but are not limited to, iOS, Android, Windows, Linux, and Mac OS. In different networks, terminals may be called by different names, such as: user equipment, mobile station, user unit, station, cellular phone, personal digital assistant, wireless modem, wireless communication device, handheld device, laptop, cordless phone, wireless local loop station, television, etc. For ease of description, this embodiment will simply refer to it as terminal device.

[0028] In this embodiment, the implementation form of the server is not limited. For example, the server can be a conventional server, a cloud server, a cloud host, a virtual center, or other server devices. The server mainly consists of a processor, hard disk, memory, system bus, and other common computer architecture types.

[0029] In this embodiment, the engineering cost text to be queried is obtained; the engineering cost text is vectorized to obtain a text vector; a multi-dimensional query is performed based on the text vector to obtain multiple candidate query results; based on the matching score of each candidate query result under multiple query dimensions, the target query result is selected from the multiple candidate query results; this disclosure performs text query from multiple dimensions and selects the target query result with higher accuracy from multiple candidate query results, thereby improving retrieval accuracy.

[0030] In some embodiments of this disclosure, after obtaining the engineering cost text to be queried, keywords and business tags are extracted from the engineering cost text to obtain the keywords and business tags of the engineering cost text; and the engineering cost text is vectorized to obtain a text vector. It should be noted that the business tags include: subject term tags, keyword tags, proper noun tags, engineering quantity calculation tags, machinery, materials and equipment tags, application scenario tags, and related specification tags.

[0031] In the above embodiments, keyword extraction is performed on the engineering cost text to obtain the keywords of the engineering cost text. One possible approach is to input the engineering cost text into a pre-trained language model for keyword extraction to obtain the keywords of the engineering cost text.

[0032] In the above embodiments, business tags are extracted from the engineering cost text to obtain its business tags. One possible approach is to input the engineering cost text into a large language model to obtain its business tags. Specifically, the engineering cost text is input into the large language model for automatic tag extraction, and preset prompts guide the model to accurately identify and output the business tags. For example, for ambiguous expressions in the engineering cost text (such as "implemented according to the latest electrical installation standards"), the model can automatically match the corresponding specification tag (such as "GB 50303"), ensuring the accuracy and business adaptability of the tag extraction. Considering the characteristics of text in the engineering cost field, a standardized business tag system with seven dimensions is designed to achieve a structured description of text features, providing support for accurate matching of business dimensions. The engineering cost-specific business tag classification system disclosed in this publication is shown in Table 1 below.

[0033]

[0034] Table 1 This disclosure uses seven types of standardized tags to structure engineering cost texts by business dimensions. This allows for quick filtering of texts that are irrelevant to business needs during queries (such as filtering lighting engineering texts that conform to the "GB50303" standard), and also provides a basis for business dimensions for weight allocation in multi-feature fusion queries, thereby improving the business adaptability of query results.

[0035] In the above embodiments, the engineering cost text is vectorized to obtain text vectors. One possible approach is to preprocess the engineering cost text to obtain preprocessed text; the preprocessed text is then input into a pre-trained language model to obtain text vectors. Specifically, specialized preprocessing is performed on engineering cost texts (such as engineering feature descriptions, cost cases, and quota standards), including removing irrelevant special symbols, filtering industry-standard stop words (such as words without distinctiveness like "engineering" and "project"), and using an industry-specific word segmentation dictionary to complete word segmentation, ensuring the complete preservation and accurate splitting of professional terms (such as "machinery, materials" and "list pricing"). Using the pre-trained language model, the preprocessed engineering cost text is converted into a 1024-dimensional fixed-dimensional vector, achieving quantitative capture of text semantics, which can accurately represent the association between semantically similar texts within the industry, such as "lighting vehicle installation" and "lighting equipment deployment." The generated 1024-dimensional vector and corresponding text information are stored in a retrieval engine, utilizing the efficient retrieval capabilities of the retrieval engine to support subsequent vector similarity calculations.

[0036] This disclosure utilizes three query dimensions—full-text search, business tag matching search, and vector semantic search—and achieves precise fusion of multi-dimensional results through differentiated weight settings.

[0037] In some embodiments of this disclosure, multi-dimensional queries are performed based on text vectors to obtain multiple candidate query results. One possible approach is to perform a full-text search based on keywords in the engineering cost text to obtain a first query result; perform business tag matching retrieval based on business tags in the engineering cost text to obtain a second query result; and perform vector semantic retrieval based on text vectors to obtain a third query result.

[0038] Among them, the full-text search dimension: based on the keywords of the engineering cost text, literal matching is performed, and the search is used to capture the association of keywords on the surface of the text, ensuring the basic coverage of traditional search capabilities.

[0039] Business tag matching dimension: Based on the aforementioned 7 types of engineering cost-specific tags, accurate tag matching is performed to capture the business dimension association of the text and improve the business adaptability of the query results.

[0040] Vector semantic retrieval dimension: Based on the aforementioned 1024-dimensional vector, cosine similarity is calculated to capture deep semantic relationships in the text and solve the problem of matching synonyms and near-synonyms that cannot be covered by literal matching.

[0041] It should be noted that corresponding weights are assigned to each query dimension. Vector semantic retrieval has the highest weight, ensuring that semantically similar engineering cost texts are returned first, addressing the issue of insufficient semantic understanding. Subject terms and keyword / proper noun tags have relatively high weights; these tags directly reflect the core business content of the engineering cost text, and high weighting ensures that query results match the core content of the target requirements. Application scenario and machinery / materials tags have moderate weights, serving as supplementary features to help filter texts that meet specific business scenarios or material requirements, improving the practicality of the results. Full-text search has the basic weight, ensuring basic coverage of keyword literal matching and compatibility with traditional query habits. See Table 2 below for the specific weights of each query dimension and business tag.

[0042]

[0043] Table 2 In some embodiments of this disclosure, duplicate results may exist among the first, second, and third query results. After deduplication of the first, second, and third query results, multiple candidate query results are obtained. Each candidate query result includes a matching score across multiple query dimensions.

[0044] In some embodiments of this disclosure, a target query result is selected from multiple candidate query results based on the matching scores of each candidate query result across multiple query dimensions. One possible approach is to calculate a comprehensive score for each candidate query result based on its matching score and weight across multiple query dimensions; and then select the target query result whose comprehensive score meets a set scoring condition from the multiple candidate query results. It should be noted that the set scoring condition can be to rank the top N query results in descending order of their scores. For example, if there are 5 candidate query results, a weighted sum is used to calculate the comprehensive score of the 5 candidate query results, and then the top N target query results, ranked in descending order of their comprehensive scores, are selected from the 5 candidate query results.

[0045] In one optional embodiment, a comprehensive score for each candidate query result is calculated based on the matching scores and weights of each candidate query result across multiple query dimensions. One possible approach is to normalize the matching scores of each candidate query result across multiple query dimensions to obtain a normalized score; then, based on a score threshold, perform threshold filtering on the normalized score to obtain a filtered matching score; finally, based on the filtered matching score and its weight, calculate the comprehensive score for each candidate query result. For example, suppose there are three candidate query results A, B, and C. Their original matching scores under the three query dimensions of "full-text search," "business tag matching search," and "vector semantic search" are A: (0.8, 0.6, 0.5), B: (0.9, 0.7, 0.4), and C: (0.6, 0.8, 0.9), respectively, with corresponding dimension weights of (0.4, 0.3, 0.3). First, the scores for each dimension are normalized, resulting in normalized scores such as A: (0.67, 0.25, 0.17), B: (1.0, 0.5, 0.0), and C: (0.0, 1.0, 1.0). Then, a score threshold of 0.2 is set, and normalized scores below this threshold are set to zero, resulting in filtered matching scores: A: (0.67, 0.25, 0.17→0), B: (1.0, 0.5, 0.17→0), C: (0.67, 0.25, 0.17→0), and C: (0.67, 0.8, 0.9→0). 0), C: (0, 1.0, 1.0); Finally, the filtered scores are summed with their corresponding weights to calculate the overall score: A is 0.67×0.4 + 0.25×0.3 + 0×0.3 = 0.343, B is 1.0×0.4 + 0.5×0.3 + 0×0.3 = 0.55, and C is 0×0.4 + 1.0×0.3 + 1.0×0.3 = 0.6.

[0046] Figure 2 This is a schematic diagram of the structure of a text retrieval device 20 provided for an exemplary embodiment of this disclosure. For example... Figure 2 As shown, the text retrieval device 20 includes: an acquisition module 21, a vector module 22, a query module 23, and a selection module 24.

[0047] Among them, the acquisition module 21 is used to acquire the engineering cost text to be queried; Vector module 22 is used to vectorize the engineering cost text to obtain text vectors; Query module 23 is used to perform multi-dimensional queries based on text vectors to obtain multiple candidate query results; Selection module 24 is used to select the target query result from multiple candidate query results based on the matching score of each candidate query result under multiple query dimensions.

[0048] Optionally, when vectorizing the engineering cost text to obtain a text vector, the vector module 22 is used for: Perform preprocessing operations on the engineering cost document to obtain a preprocessed document; The preprocessed text is input into the pre-trained language model to obtain text vectors.

[0049] Optionally, the multiple candidate query results include: a first query result, a second query result, and a third query result; when performing a multi-dimensional query based on the text vector to obtain multiple candidate query results, the query module 23 is used to: Keyword and business tag extraction is performed on the engineering cost document to obtain the keywords and business tags of the engineering cost document; A full-text search is performed based on keywords in the engineering cost document to obtain the first query result; Based on the business tags in the engineering cost document, a second query result is obtained by matching and retrieving business tags. Vector semantic retrieval is performed based on the text vector to obtain the third query result.

[0050] Optionally, when selecting the target query result from multiple candidate query results based on the matching scores of each candidate query result across multiple query dimensions, the selection module 24 is used to: Calculate the overall score for each candidate query result based on its matching score and weight across multiple query dimensions. Select the target query result from multiple candidate query results that meets the set score criteria based on the overall score.

[0051] Optionally, when calculating the comprehensive score of each candidate query result based on the matching scores and weights of each candidate query result across multiple query dimensions, the selection module 24 is used for: The matching scores of each candidate query result across multiple query dimensions are normalized to obtain a normalized score. Based on the score threshold, the normalized score is threshold filtered to obtain the filtered matching score; Based on the filtered matching scores and weights, calculate the overall score for each candidate query result.

[0052] Optionally, business tags include: subject term tags, keyword tags, proper noun tags, engineering quantity calculation tags, machinery, materials and equipment tags, application scenario tags, and relevant specification tags.

[0053] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0054] Figure 3This is a schematic diagram of the structure of an electronic device provided as an exemplary embodiment of the present disclosure. For example... Figure 3 As shown, the electronic device includes a memory 31 and a processor 32. Additionally, the electronic device also includes a power supply component 33 and a communication component 34.

[0055] Memory 31 is used to store computer programs and can be configured to store various other data to support operation on the electronic device. Examples of this data include instructions for any application or method used to operate on the electronic device.

[0056] The memory 31 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.

[0057] Communication component 34 is used for data transmission with other devices.

[0058] The processor 32 can execute computer instructions stored in the memory 31 to: obtain the engineering cost text to be queried; perform vectorization processing on the engineering cost text to obtain a text vector; perform multi-dimensional query based on the text vector to obtain multiple candidate query results; and select the target query result from the multiple candidate query results based on the matching score of each candidate query result under multiple query dimensions.

[0059] Accordingly, embodiments of this disclosure also provide a computer-readable storage medium storing a computer program. When the computer-readable storage medium stores a computer program, and the computer program is executed by one or more processors, it causes one or more processors to perform... Figure 1 Each step in the method embodiment.

[0060] Accordingly, embodiments of this disclosure also provide a computer program product, which includes a computer program / instructions that are executed by a processor. Figure 1 Each step in the method embodiment.

[0061] The above Figure 3The communication component is configured to facilitate wired or wireless communication between the device containing the communication component and other devices. The device containing the communication component can access wireless networks based on communication standards, such as WiFi, 2G, 3G, 4G / LTE, 5G, or combinations thereof. In one exemplary embodiment, the communication component receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component also includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID), Infrared Data Association (IrDA) technology, Ultra-Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0062] The above Figure 3 The power supply component provides power to the various components of the device in which it resides. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device in which it resides.

[0063] The aforementioned electronic devices also include a display screen and audio components.

[0064] The display includes a screen, which may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can sense not only the boundaries of touch or swipe actions, but also the duration and pressure associated with the touch or swipe operation.

[0065] An audio component may be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC) configured to receive external audio signals when the device containing the audio component is in an operating mode, such as call mode, recording mode, or voice recognition mode. The received audio signals may be further stored in memory or transmitted via a communication component. In some embodiments, the audio component also includes a speaker for outputting audio signals.

[0066] Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, systems, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this disclosure can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0067] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0068] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0069] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0070] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0071] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0072] Computer-readable media include both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0073] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.

[0074] The above are merely specific embodiments of this disclosure, enabling those skilled in the art to understand or implement this disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to these embodiments, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A text retrieval method, characterized in that, include: Retrieve the project cost document to be queried; The engineering cost text is vectorized to obtain a text vector; Perform multi-dimensional queries based on the text vector to obtain multiple candidate query results; The target query result is selected from the candidate query results based on the matching scores of each candidate query result across multiple query dimensions.

2. The method according to claim 1, characterized in that, The process of vectorizing the engineering cost text to obtain a text vector includes: The project cost text is preprocessed to obtain preprocessed text; The preprocessed text is input into the pre-trained language model to obtain text vectors.

3. The method according to claim 1, characterized in that, The multiple candidate query results include: a first query result, a second query result, and a third query result; the multi-dimensional query based on the text vector to obtain multiple candidate query results includes: Keyword and business tag extraction is performed on the engineering cost text to obtain the keywords and business tags of the engineering cost text; A full-text search is performed based on the keywords in the engineering cost text to obtain the first query result; Based on the business tags of the engineering cost text, a business tag matching retrieval is performed to obtain the second query result; Vector semantic retrieval is performed based on the text vector to obtain the third query result.

4. The method according to claim 1, characterized in that, The step of selecting the target query result from multiple candidate query results based on the matching scores of each candidate query result across multiple query dimensions includes: Calculate the comprehensive score of each candidate query result based on the matching score and weight of each candidate query result across multiple query dimensions; Select the target query result whose comprehensive score meets the set score conditions from multiple candidate query results.

5. The method according to claim 4, characterized in that, The step of calculating the comprehensive score of each candidate query result based on the matching score and weight of each candidate query result across multiple query dimensions includes: The matching scores of each candidate query result under multiple query dimensions are normalized to obtain a normalized score. Based on the score threshold, the normalized score is subjected to threshold filtering to obtain the filtered matching score; Based on the filtered matching score and the weight, a comprehensive score is calculated for each candidate query result.

6. The method according to claim 3, characterized in that, The business tags include: subject term tags, keyword tags, proper noun tags, engineering quantity calculation tags, machinery, materials and equipment tags, application scenario tags, and relevant specification tags.

7. A text retrieval device, characterized in that, include: The acquisition module is used to retrieve the engineering cost text to be queried; The vector module is used to vectorize the engineering cost text to obtain a text vector. The query module is used to perform multi-dimensional queries based on the text vector to obtain multiple candidate query results; The selection module is used to select the target query result from multiple candidate query results based on the matching scores of each candidate query result under multiple query dimensions.

8. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to execute instructions to implement the steps of the method as described in any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-6.

10. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Hybrid retrieval method and system for RAG question-answering system

    CN118656482A

  • Hybrid search method and device, equipment and storage medium

    CN119917614A

  • Resource recommendation method and system based on hybrid retrieval RAG

    CN120780916A

  • Method of retrieving document and apparatus for retrieving document

    US20240168984A1