Project cost data query method and device and medium

By adopting layered storage and intelligent matching technology in the engineering cost data query system, the problem of low query efficiency in massive data is solved, efficient and accurate data query is achieved, and user experience is improved.

CN119719129AInactive Publication Date: 2025-03-28SHENZHEN YONGDAXIN ENG COST CONSULTING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411570431.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-06
Publication Date
2025-03-28
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional OLAP technology is less efficient when facing massive engineering cost data, especially when query requirements are frequently changed, it is difficult to respond quickly and provide accurate results.

Method used

Using hierarchical storage and intelligent matching technology, the historical semantic query statements are matched by the temperature storage area to quickly obtain the results of commonly used or high-frequency queries, and match unmatched queries in the cold storage area to ensure that all queries can obtain target data.

Benefits of technology

It significantly improves the efficiency and accuracy of engineering cost data query, shortens response time, maximizes the utilization rate of system resources, and improves user experience and satisfaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119719129A_ABST
    Figure CN119719129A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of semantic retrieval, and provides a project cost data query method and device and a medium, and the project cost data query method comprises the following steps: matching a historical semantic query statement consistent with a current semantic query statement in a plurality of historical semantic query statements; if the current semantic query statement is consistent with the historical semantic query statement, taking a query result corresponding to the historical semantic query statement as target data corresponding to the current semantic query statement; if the current semantic query statement is not consistent with the historical semantic query statement, matching target data corresponding to the current semantic query statement in a cold storage area; calculating analysis data according to the target data; and taking the target data and the analysis data corresponding to the target data as a retrieval result. According to the scheme, quick matching, accurate results and efficient calculation are realized, so that the retrieval efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of semantic retrieval, and in particular relates to a method, device and medium for querying engineering cost data. Background Art

[0002] The query of engineering cost data plays a vital role in the fields of construction engineering, project management, etc. Accurate and timely acquisition of engineering cost information not only helps cost control, but also improves the overall efficiency of the project. With the increasing scale of engineering construction and the increasing technical complexity, the need for efficient query of engineering cost data has become increasingly urgent. In order to meet this demand, exploring new query methods has become the focus of researchers.

[0003] Existing methods for querying engineering cost data mainly include big data search technology based on databases and manual query based on historical data records. The former relies on a powerful database system to support efficient data retrieval operations, and is usually suitable for fast query of cost data of large-scale and highly complex projects; the latter is a traditional approach, usually relying on manual review of historical project records to obtain relevant information, and is suitable for situations with small data volumes and limited project scales. Although these methods have demonstrated certain value in practical applications, they still have obvious limitations.

[0004] For database-based big data search technology, when faced with massive engineering cost data, especially when the query requirements change frequently, it is often difficult to respond quickly and provide accurate results; for manual queries based on historical data records, although they have high flexibility, they are highly dependent on human participation, low in efficiency and prone to errors. In actual application, these two methods are difficult to ensure query efficiency and accuracy at the same time, especially in scenarios with high query frequency and large data volumes. Summary of the invention

[0005] In view of this, the embodiments of the present invention provide a method, device and medium for querying engineering cost data to solve the technical problem that traditional OLAP technology often has low query efficiency in the face of today's explosive data growth.

[0006] A first aspect of an embodiment of the present invention provides a method for querying construction cost data. The method for querying construction cost data is applied to a terminal device, the terminal device includes a warm storage area and a cold storage area, and the method for querying construction cost data includes:

[0007] Acquire a current semantic query statement input by a user and a plurality of historical semantic query statements in the warm storage area;

[0008] Matching a historical semantic query statement that is consistent with the current semantic query statement among the plurality of historical semantic query statements;

[0009] If the current semantic query statement is consistent with the historical semantic query statement, the query result corresponding to the historical semantic query statement is used as the target data corresponding to the current semantic query statement;

[0010] If the current semantic query statement is inconsistent with the historical semantic query statement, matching the target data corresponding to the current semantic query statement in the cold storage area; wherein the warm storage area stores part of the data and the cold storage area stores all the data;

[0011] The target data is taken as the search result.

[0012] Furthermore, the step of matching a historical semantic query statement that is consistent with the current semantic query statement among the plurality of historical semantic query statements includes:

[0013] Constructing a current feature vector corresponding to the current semantic query statement;

[0014] Inputting the current feature vector into a conversion function to obtain a target feature vector;

[0015] Calculating the distance between the target feature vector and a plurality of preset feature vectors;

[0016] Obtain the cluster corresponding to the preset feature vector corresponding to the minimum distance;

[0017] Traversing historical feature vectors consistent with the current feature vector in the cluster;

[0018] The semantic query statement corresponding to the historical feature vector is used as a historical semantic query statement consistent with the current semantic query statement.

[0019] Furthermore, the step of inputting the current feature vector into a conversion function to obtain a target feature vector includes:

[0020] Input the current feature vector into the following conversion function to obtain the target feature vector;

[0021] The conversion function is as follows:

[0022]

[0023] Among them, x represents the current eigenvector, y represents the target eigenvector, A represents a preset reversible matrix, and t is a preset coefficient.

[0024] Furthermore, before the step of constructing the current feature vector corresponding to the current semantic query statement, the method further includes:

[0025] Obtain multiple initial cluster centers;

[0026] Obtaining a first historical feature vector;

[0027] Calculating a first similarity between the first historical feature vector and a plurality of initial cluster centers;

[0028] If the first similarity is greater than a first threshold, adjusting the initial cluster center corresponding to the first similarity according to the first historical characteristic vector corresponding to the first similarity to obtain a current initial cluster center;

[0029] If the first similarity is not greater than a first threshold, taking the first historical feature vector as a new initial clustering center;

[0030] Substituting the current initial cluster center or the new initial cluster center into a conversion function to obtain the preset feature vector.

[0031] Furthermore, the step of obtaining a plurality of initial cluster centers includes:

[0032] Acquire a plurality of second historical feature vectors, and randomly select a preset number of second historical feature vectors from the plurality of second historical feature vectors as first cluster centers;

[0033] Calculating a second similarity between a plurality of the first cluster centers;

[0034] If the second similarity is greater than a first threshold, merging the first cluster centers corresponding to the second similarity to obtain a first number of second cluster centers;

[0035] Calculating a third similarity between the remaining historical feature vectors and the plurality of second cluster centers; the remaining historical feature vectors refer to the second historical feature vectors other than the preset number of second historical feature vectors in all the historical feature vectors;

[0036] If the third similarity is greater than the second threshold, taking the remaining historical feature vectors corresponding to the third similarity as the cluster cluster of the second cluster center corresponding to the third similarity;

[0037] The mean of all feature vectors in the cluster is calculated to obtain the initial cluster center.

[0038] Furthermore, the step of constructing a current feature vector corresponding to the current semantic query statement includes:

[0039] Encoding the current semantic query sentence to obtain an encoding sequence;

[0040] According to the coding sequence, a coding matrix corresponding to each word is formed;

[0041] Inputting the encoding matrix into a preset recognition model to obtain a confidence level output by the preset recognition model;

[0042] Filtering key words in the current semantic query statement according to the confidence of each word;

[0043] The codes corresponding to the key words are constructed as the current feature vector.

[0044] Furthermore, the step of forming a coding matrix corresponding to each word according to the coding sequence includes:

[0045] Get a preset number of adjacent words before and after each current word;

[0046] A coding matrix is ​​constructed according to the codes corresponding to the current word and a plurality of the adjacent words; wherein the code corresponding to the current word is located at the center of the coding matrix.

[0047] A second aspect of an embodiment of the present invention provides a device for querying construction cost data, including:

[0048] An acquisition unit, configured to acquire a current semantic query statement input by a user and a plurality of historical semantic query statements in the warm storage area;

[0049] A matching unit, configured to match a historical semantic query statement consistent with the current semantic query statement among the plurality of historical semantic query statements;

[0050] A first judgment unit is used to use the query result corresponding to the historical semantic query statement as the target data corresponding to the current semantic query statement if the current semantic query statement is consistent with the historical semantic query statement;

[0051] a second judgment unit, configured to match the target data corresponding to the current semantic query statement in the cold storage area if the current semantic query statement is inconsistent with the historical semantic query statement; wherein the warm storage area stores part of the data and the cold storage area stores all of the data;

[0052] The confirmation unit is used to take the target data as a search result.

[0053] A third aspect of an embodiment of the present invention provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in the first aspect when executing the computer program.

[0054] A fourth aspect of an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.

[0055] Compared with the prior art, the embodiments of the present invention have the following beneficial effects: by matching historical semantic query statements in the warm storage area, the results of common or high-frequency queries can be quickly obtained, reducing the time required for searching all the data for each query. The warm storage area stores part of the data, and the amount of data is less than that of the cold storage area, and the query speed is faster, thereby greatly shortening the response time. By matching historical semantic query statements, the consistency and reliability of the query results are guaranteed, thereby improving the accuracy of the query results. For queries that are not matched in the warm storage area, the system will automatically match them in the cold storage area, ensuring that all queries can obtain the corresponding target data, even low-frequency or newly emerging queries, can accurately obtain results. The warm storage area and the cold storage area have clear division of labor, the warm storage area handles high-frequency queries, and the cold storage area is responsible for comprehensive data storage and low-frequency queries, maximizing the utilization of system resources. By storing historical query results in the warm storage area, the overhead of repeated calculations and data acquisition is reduced, and the overall operation efficiency of the system is improved. The system can quickly respond to user query requests, provide timely engineering cost data and analysis data, and improve the user experience and satisfaction. In short, this technical solution significantly improves the efficiency and accuracy of engineering cost data query through hierarchical storage and intelligent matching technology, while optimizing the utilization of system resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0057] Figure 1 A schematic flow chart of a method for querying engineering cost data provided by the present invention is shown;

[0058] Figure 2 A schematic diagram of a device for querying engineering cost data provided by an embodiment of the present invention is shown;

[0059] Figure 3 A schematic diagram of a terminal device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0060] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.

[0061] The embodiments of the present invention provide a method, device and medium for querying engineering cost data to solve the technical problem that traditional OLAP technology often has low query efficiency in the face of today's explosive data growth.

[0062] First, the present invention provides a method for querying engineering cost data, which is applied to a terminal device, wherein the terminal device includes a warm storage area and a cold storage area. Figure 1 , Figure 1 FIG. 1 is a schematic flow chart of a method for querying engineering cost data provided by the present invention. Figure 1 As shown, the method for querying the engineering cost data may include the following steps:

[0063] Step 101: Acquire a current semantic query statement input by a user and a plurality of historical semantic query statements in the warm storage area.

[0064] This application is different from traditional OLAP technology and adopts a conversational semantic search mode, that is, the user performs semantic search by entering a conversation in an input box, rather than the traditional OLAP technology where the user continuously screens conditions for mechanical search.

[0065] Among them, warm storage refers to the storage of relatively active data that does not need to be accessed in real time. This data may be accessed regularly, but it does not need to be ready to respond to user requests at any time. Typically, warm storage uses medium-performance storage media such as high-speed hard drives or flash storage. Since warm storage provides faster read and write speeds, it can retrieve and process data more easily, so it is suitable for data that needs to be accessed faster than cold storage. Cold storage refers to a storage method for long-term preservation of data that is not frequently accessed. This data may be outdated, no longer frequently used, or only viewed when needed. Cold storage usually uses low-cost storage media such as tape libraries or optical disks, which have slower read and write speeds. Since data is rarely accessed, reliability and durability are important considerations for cold storage. Choosing warm or cold storage depends on the needs and access patterns of the data. For critical data that needs to be accessed quickly, warm storage provides better performance and lower latency. For data that is not frequently used or needs to be stored at a lower cost, cold storage is a cost-effective option.

[0066] In order to improve the search efficiency, the application stores the historical search statements and the search results corresponding to the historical search statements in the warm storage area, and stores all the data in the cold storage area. The warm storage area is not a permanent storage area. The data will be deleted after the preset storage period, and the new search results will be stored in the warm storage area.

[0067] It is understandable that, since the historical search statements and the search results corresponding to the historical search statements are stored in the warm storage area, there is no need to traverse and search all the data, thus avoiding redundant searches and improving the overall search efficiency.

[0068] Step 102: Match a historical semantic query statement that is consistent with the current semantic query statement among the multiple historical semantic query statements.

[0069] Specifically, step 102 specifically includes steps 1021 to 1026:

[0070] Step 1021: construct a current feature vector corresponding to the current semantic query statement;

[0071] The specific step 1021 specifically includes step A1 to step A5:

[0072] Step A1: Encode the current semantic query sentence to obtain an encoding sequence;

[0073] The current semantic query statement entered by the user is cleaned and standardized, including removing special characters and stop words, etc. It is then encoded using the embedding model Word2Vec to obtain a coded sequence.

[0074] Step A2: forming a coding matrix corresponding to each word according to the coding sequence;

[0075] In order to fully extract the semantic features of each word and thus improve the recognition rate, this application provides a new encoding matrix, as follows:

[0076] Specifically, step A2 specifically includes steps A21 to A22:

[0077] Step A21: Obtain a preset number of adjacent words before and after each current word;

[0078] In order to fully understand the semantics of the words, a preset number of adjacent words before and after each current word are obtained.

[0079] Step A22: construct a coding matrix according to the codes corresponding to the current word and a plurality of adjacent words; wherein the code corresponding to the current word is located at the center of the coding matrix.

[0080] According to the order of each word in the sentence, the codes corresponding to the current word and multiple adjacent words are arranged in a blank matrix to obtain a coding matrix, wherein the code corresponding to the current word is located at the center of the coding matrix.

[0081] In this embodiment, the adjacent words before and after the current word are obtained according to a preset number. It can help provide context information to better understand the context of the current word in the entire sentence. The encoding matrix is ​​constructed by splicing or arranging the codes corresponding to the current word and its multiple adjacent words. The size of the encoding matrix will depend on the number of the current word and its adjacent words. The code corresponding to the current word will be located at the center of the encoding matrix. It helps to highlight the importance of the current word and makes the encoding matrix more accurate in depicting the context information of the current word.

[0082] Step A3: inputting the encoding matrix into a preset recognition model to obtain the confidence output by the preset recognition model;

[0083] The preset recognition model is a pre-trained deep learning model. The preset recognition model can output the confidence level corresponding to the current word according to the encoding matrix. Different confidence levels correspond to different key word types, including but not limited to product, region, or time. The confidence level corresponding to non-key words is 0.

[0084] Step A4: Filtering key words in the current semantic query statement according to the confidence of each word;

[0085] Since different confidence levels express different types of key words, key words can be filtered in the current semantic query statement according to the confidence levels.

[0086] Step A5: construct the code corresponding to the key word into the current feature vector.

[0087] In this embodiment, the current semantic query statement is encoded to obtain a coding sequence. According to the coding sequence, a coding matrix corresponding to each word is formed. The coding sequence is arranged in the order of the words, and the coding representation of each word is used as a row or a column of the matrix. The coding matrix obtained in this way reflects the numerical characteristics of each word in the semantic query statement. The coding matrix is ​​input into a preset recognition model to obtain the confidence output by the preset recognition model. According to the confidence of each word, the key words in the current semantic query statement are screened. According to the output confidence of the preset recognition model, it can be determined which words play an important role in the current semantic query statement. These key words may be key information or content that requires special attention. The encoding corresponding to the key words is constructed as a current feature vector to obtain a current feature vector containing key information. This feature vector can be used as a numerical representation of the semantic query statement for subsequent retrieval, classification or other tasks. The current feature vector may better capture the key information of the semantic query statement, which helps to improve the performance of subsequent tasks.

[0088] Step 1022: input the current feature vector into a conversion function to obtain a target feature vector;

[0089] In order to further improve the retrieval efficiency, this application uses a conversion function to perform dimensionality reduction and feature extraction on the current feature vector according to the encoding characteristics and vector characteristics of the feature vector to obtain the target feature vector. The specific process is as follows:

[0090] Specifically, step 1022 specifically includes: inputting the current feature vector into the following conversion function to obtain the target feature vector;

[0091] The conversion function is as follows:

[0092]

[0093] Among them, x represents the current eigenvector, y represents the target eigenvector, A represents a preset reversible matrix, and t is a preset coefficient.

[0094] The above formula is based on a large amount of experimental data and verification, but is not limited to the above mathematical expression.

[0095] It is worth noting that the matrix A is a reversible matrix whose size and elements depend on the dimension of the target vector converted by the initial vector, and is used to reduce the dimension of the current eigenvector. The matrix A linearly transforms each component of the current eigenvector so that each component of the target eigenvector has a certain relationship with each component of the current eigenvector.

[0096] Step 1023: Calculate the distance between the target feature vector and a plurality of preset feature vectors;

[0097] In order to improve the search efficiency, the present application obtains preset feature vectors corresponding to multiple clusters, calculates the distance between the target feature vector and multiple preset feature vectors, matches the target feature vector with the most similar cluster, thereby narrowing the search scope and improving the search efficiency.

[0098] Step 1024: Obtain the cluster corresponding to the preset feature vector corresponding to the minimum distance;

[0099] Step 1025: traverse the historical feature vectors consistent with the current feature vector in the cluster;

[0100] Step 1026: The semantic query statement corresponding to the historical feature vector is used as a historical semantic query statement that is consistent with the current semantic query statement.

[0101] In this embodiment, a current feature vector corresponding to the current semantic query statement is constructed, and this vector contains the key feature information of the current semantic query statement. The current feature vector is input into a conversion function, and the conversion function performs dimension reduction and feature extraction operations on the input feature vector. The distance between the target feature vector and multiple preset feature vectors is calculated. According to the calculated distance result, the cluster to which the preset feature vector with the smallest distance from the target feature vector belongs is determined. The cluster cluster can be understood as the grouping or classification of feature vectors. In the determined cluster cluster, the historical feature vectors therein are traversed, and the historical feature vectors consistent with the current feature vector are found. The semantic query statement corresponding to the historical feature vector is used as a historical semantic query statement consistent with the current semantic query statement. The above technical scheme can effectively match the historical semantic query statement consistent with the current semantic query statement by constructing feature vectors, calculating distances, clustering and traversing historical feature vectors, thereby providing more accurate search results or related information for the subsequent period.

[0102] Step 103: If the current semantic query statement is consistent with the historical semantic query statement, the query result corresponding to the historical semantic query statement is used as the target data corresponding to the current semantic query statement.

[0103] Step 104: If the current semantic query statement is inconsistent with the historical semantic query statement, the target data corresponding to the current semantic query statement is matched in the cold storage area; wherein the warm storage area stores partial data and the cold storage area stores all data.

[0104] Step 105: taking the target data as the search result.

[0105] In this embodiment, by matching historical semantic query statements in the warm storage area, the results of common or high-frequency queries can be quickly obtained, reducing the time required to search all the data for each query. The warm storage area stores part of the data, and the amount of data is smaller than that of the cold storage area, and the query speed is faster, thereby greatly shortening the response time. By matching historical semantic query statements, the consistency and reliability of the query results are guaranteed, thereby improving the accuracy of the query results. For queries that are not matched in the warm storage area, the system will automatically match them in the cold storage area, ensuring that all queries can obtain the corresponding target data, even low-frequency or newly emerging queries, can accurately obtain results. The warm storage area and the cold storage area have clear division of labor. The warm storage area handles high-frequency queries, and the cold storage area is responsible for comprehensive data storage and low-frequency queries, maximizing the utilization of system resources. By storing historical query results in the warm storage area, the overhead of repeated calculations and data acquisition is reduced, and the overall operation efficiency of the system is improved. The system can quickly respond to user query requests, provide timely engineering cost data and analysis data, and improve user experience and satisfaction. In short, this technical solution significantly improves the efficiency and accuracy of engineering cost data query through hierarchical storage and intelligent matching technology, while optimizing the utilization of system resources.

[0106] Optionally, before step 1021, the following steps B1 to B6 are also included:

[0107] Step B1: Obtain multiple initial cluster centers;

[0108] Specifically, step B1 includes steps B11 to B16:

[0109] Step B11: obtaining a plurality of second historical feature vectors, and randomly selecting a preset number of second historical feature vectors from the plurality of second historical feature vectors as first cluster centers;

[0110] It is worth noting that the second historical feature vector is used to construct the initial cluster center, while the first historical feature vector is used to update the initial cluster center.

[0111] Among the multiple second historical feature vectors, a preset number of second historical feature vectors are randomly selected as first cluster centers.

[0112] Step B12: calculating a second similarity between a plurality of the first cluster centers;

[0113] Since the first cluster centers are randomly selected, there may be relatively similar first cluster centers, so it is necessary to calculate the second similarity between the first cluster centers, and then merge the first cluster centers with higher similarity.

[0114] Step B13: if the second similarity is greater than a first threshold, merging the first cluster centers corresponding to the second similarity to obtain a first number of second cluster centers;

[0115] Step B14: calculating a third similarity between the remaining historical feature vectors and the plurality of second cluster centers; the remaining historical feature vectors refer to the second historical feature vectors other than the preset number of second historical feature vectors in all the historical feature vectors;

[0116] Step B15: if the third similarity is greater than the second threshold, taking the remaining historical feature vectors corresponding to the third similarity as the cluster cluster of the second cluster center corresponding to the third similarity;

[0117] Step B16: Calculate the mean of all feature vectors in the cluster to obtain the initial cluster center.

[0118] In this embodiment, multiple second historical feature vectors are obtained, and a specified number of vectors are randomly selected from the multiple second historical feature vectors as the cluster centers of the first iteration. The similarity values ​​between the first cluster centers are calculated using an appropriate similarity measurement method (such as cosine similarity or Euclidean distance). If the similarity value between the two first cluster centers is greater than a preset first threshold, they are merged into a new cluster center to obtain the second cluster center of the first stage. The remaining historical feature vectors refer to all other historical feature vectors except the preset number of second historical feature vectors. The similarity values ​​between these vectors and the second cluster centers are calculated. If the similarity value between a certain remaining historical feature vector and a certain second cluster center is greater than the second threshold, the vector is classified into the corresponding second cluster center. The feature vectors in each cluster cluster are averaged to obtain the mean vector of the cluster cluster, which is the initial cluster center. The above technical scheme generates the initial cluster center by using similarity measurement and threshold screening. It can allocate the historical feature vectors to the appropriate cluster cluster according to the similarity between them. This method can help to quickly construct cluster centers with a certain initial stability, and then carry out subsequent clustering analysis and data mining tasks.

[0119] Step B2: obtaining a first historical characteristic vector;

[0120] Step B3: calculating a first similarity between the first historical characteristic vector and a plurality of initial clustering centers;

[0121] Step B4: if the first similarity is greater than a first threshold, adjusting the initial cluster center corresponding to the first similarity according to the first historical characteristic vector corresponding to the first similarity to obtain a current initial cluster center;

[0122] The first historical feature vector is merged into the cluster corresponding to the initial cluster center, and the mean of all feature vectors in the cluster is calculated to obtain the current initial cluster center.

[0123] Step B5: if the first similarity is not greater than a first threshold, taking the first historical characteristic vector as a new initial clustering center;

[0124] It is worth noting that when the initial cluster center is subsequently updated by the first historical characteristic vector, if the first historical characteristic vector cannot match any initial cluster center, the first historical characteristic vector is used as the new initial cluster center, thereby improving the accuracy of the cluster center.

[0125] Step B6: Substitute the current initial cluster center or the new initial cluster center into the conversion function to obtain the preset feature vector.

[0126] In this embodiment, by matching historical semantic query statements in the warm storage area, the results of common or high-frequency queries can be quickly obtained, reducing the time required to search all the data for each query. The warm storage area stores part of the data, and the amount of data is smaller than that of the cold storage area, and the query speed is faster, thereby greatly shortening the response time. By matching historical semantic query statements, the consistency and reliability of the query results are guaranteed, thereby improving the accuracy of the query results. For queries that are not matched in the warm storage area, the system will automatically match them in the cold storage area, ensuring that all queries can obtain the corresponding target data, even low-frequency or newly emerging queries, can accurately obtain results. The warm storage area and the cold storage area have clear division of labor. The warm storage area handles high-frequency queries, and the cold storage area is responsible for comprehensive data storage and low-frequency queries, maximizing the utilization of system resources. By storing historical query results in the warm storage area, the overhead of repeated calculations and data acquisition is reduced, and the overall operation efficiency of the system is improved. The system can quickly respond to user query requests, provide timely engineering cost data and analysis data, and improve user experience and satisfaction. In short, this technical solution significantly improves the efficiency and accuracy of engineering cost data query through hierarchical storage and intelligent matching technology, while optimizing the utilization of system resources.

[0127] like Figure 2 The present invention provides a device 2 for querying engineering cost data, see Figure 2 , Figure 2 A schematic diagram of a device for querying engineering cost data provided by the present invention is shown. Figure 2 The device for querying engineering cost data includes:

[0128] An acquisition unit 21, configured to acquire a current semantic query statement input by a user and a plurality of historical semantic query statements in the warm storage area;

[0129] A matching unit 22, configured to match a historical semantic query statement consistent with the current semantic query statement among the plurality of historical semantic query statements;

[0130] A first judgment unit 23 is used to use the query result corresponding to the historical semantic query statement as the target data corresponding to the current semantic query statement if the current semantic query statement is consistent with the historical semantic query statement;

[0131] A second judgment unit 24 is configured to match the target data corresponding to the current semantic query statement in the cold storage area if the current semantic query statement is inconsistent with the historical semantic query statement; wherein the warm storage area stores partial data and the cold storage area stores all data;

[0132] The confirmation unit 25 is used to take the target data as a search result.

[0133] The invention provides a query device for engineering cost data. By matching historical semantic query statements in a warm storage area, the results of common or high-frequency queries can be quickly obtained, thereby reducing the time required for searching all data for each query. The warm storage area stores part of the data, and the amount of data is relatively small compared to the cold storage area, and the query speed is faster, thereby greatly shortening the response time. By matching the historical semantic query statement, the consistency and reliability of the query result are guaranteed, thereby improving the accuracy of the query result. For queries that are not matched in the warm storage area, the system will automatically match in the cold storage area, ensuring that all queries can obtain the corresponding target data, even low-frequency or newly emerging queries, can accurately obtain the results. The warm storage area and the cold storage area have clear division of labor. The warm storage area processes high-frequency queries, and the cold storage area is responsible for comprehensive data storage and low-frequency queries, thereby maximizing the utilization rate of system resources. By storing the historical query results in the warm storage area, the overhead of repeated calculations and data acquisition is reduced, and the overall operation efficiency of the system is improved. The system can quickly respond to the user's query request, provide timely engineering cost data and analysis data, and improve the user's experience and satisfaction. In short, this technical solution significantly improves the efficiency and accuracy of engineering cost data query through hierarchical storage and intelligent matching technology, while optimizing the utilization of system resources.

[0134] Figure 3 Schematic diagram of a terminal device provided by an embodiment of the present invention. Figure 3 As shown, a terminal device 3 of this embodiment includes: a processor 30, a memory 31, and a computer program 32 stored in the memory 31 and executable on the processor 30, such as a program for a method for querying engineering cost data. When the processor 30 executes the computer program 32, the steps in the above-mentioned method for querying engineering cost data are implemented, such as Figure 1 Alternatively, when the processor 30 executes the computer program 32, the functions of each unit in the above-mentioned device embodiments are realized, for example, Figure 2 Function of the unit shown.

[0135] Exemplarily, the computer program 32 may be divided into one or more units, which are stored in the memory 31 and executed by the processor 30 to complete the present invention. The one or more units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 32 in the terminal device 3. For example, the computer program 32 may be divided into the following specific functions of each unit:

[0136] An acquisition unit, used to acquire a current semantic query statement input by a user and a plurality of historical semantic query statements in a warm storage area;

[0137] A matching unit, configured to match a historical semantic query statement consistent with the current semantic query statement among the plurality of historical semantic query statements;

[0138] A first judgment unit is used to use the query result corresponding to the historical semantic query statement as the target data corresponding to the current semantic query statement if the current semantic query statement is consistent with the historical semantic query statement;

[0139] A second judgment unit is configured to match the target data corresponding to the current semantic query statement in the cold storage area if the current semantic query statement is inconsistent with the historical semantic query statement; wherein the warm storage area stores part of the data and the cold storage area stores all of the data;

[0140] The confirmation unit is used to take the target data as a search result.

[0141] The terminal device includes but is not limited to a processor 30 and a memory 31. Those skilled in the art will appreciate that Figure 3It is only an example of a terminal device 3 and does not constitute a limitation on the terminal device 3. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device may also include input and output devices, network access devices, buses, etc.

[0142] The processor 30 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0143] The memory 31 may be an internal storage unit of the terminal device 3, such as a hard disk or memory of the terminal device 3. The memory 31 may also be an external terminal device of the terminal device 3, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device 3. Further, the memory 31 may also include both an internal storage unit of the terminal device 3 and an external terminal device. The memory 31 is used to store the computer program and other programs and data required by the roaming control device. The memory 31 may also be used to temporarily store data that has been output or is to be output.

[0144] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0145] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present invention. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0146] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0147] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0148] An embodiment of the present invention provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0149] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the camera / terminal device, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0150] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0151] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0152] In the embodiments provided by the present invention, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0153] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, and may be located in one place or distributed over multiple network units.

[0154] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0155] It should also be understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0156] As used in the present specification and the appended claims, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to monitoring, depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is monitored" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is monitored" or "in response to monitoring [described condition or event]", depending on the context.

[0157] In addition, in the description of the present specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0158] References to "one embodiment" or "some embodiments" etc. described in the present specification mean that one or more embodiments of the present invention include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0159] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. A method for querying engineering cost data, characterized in that: The method for querying engineering cost data is applied to a terminal device, the terminal device includes a warm storage area and a cold storage area, and the method for querying engineering cost data includes: Acquire a current semantic query statement input by a user and a plurality of historical semantic query statements in the warm storage area; Matching a historical semantic query statement that is consistent with the current semantic query statement among the plurality of historical semantic query statements; If the current semantic query statement is consistent with the historical semantic query statement, the query result corresponding to the historical semantic query statement is used as the target data corresponding to the current semantic query statement; If the current semantic query statement is inconsistent with the historical semantic query statement, matching the target data corresponding to the current semantic query statement in the cold storage area; wherein the warm storage area stores part of the data and the cold storage area stores all the data; The target data is taken as the search result.

2. The method for querying construction cost data according to claim 1, characterized in that: The step of matching a historical semantic query statement that is consistent with the current semantic query statement among the plurality of historical semantic query statements comprises: Constructing a current feature vector corresponding to the current semantic query statement; Inputting the current feature vector into a conversion function to obtain a target feature vector; Calculating the distance between the target feature vector and a plurality of preset feature vectors; Obtain the cluster corresponding to the preset feature vector corresponding to the minimum distance; Traversing historical feature vectors consistent with the current feature vector in the cluster; The semantic query statement corresponding to the historical feature vector is used as a historical semantic query statement consistent with the current semantic query statement.

3. The method for querying construction cost data according to claim 2, characterized in that: The step of inputting the current feature vector into a conversion function to obtain a target feature vector comprises: Input the current feature vector into the following conversion function to obtain the target feature vector; The conversion function is as follows: Among them, x represents the current eigenvector, y represents the target eigenvector, A represents a preset reversible matrix, and t is a preset coefficient.

4. The method for querying construction cost data according to claim 2, characterized in that: Before the step of constructing the current feature vector corresponding to the current semantic query statement, the method further includes: Obtain multiple initial cluster centers; Obtaining a first historical feature vector; Calculating a first similarity between the first historical characteristic vector and a plurality of initial cluster centers; If the first similarity is greater than a first threshold, adjusting the initial cluster center corresponding to the first similarity according to the first historical characteristic vector corresponding to the first similarity to obtain a current initial cluster center; If the first similarity is not greater than a first threshold, taking the first historical feature vector as a new initial clustering center; Substituting the current initial cluster center or the new initial cluster center into a conversion function to obtain the preset feature vector.

5. The method for querying construction cost data according to claim 4, characterized in that: The step of obtaining a plurality of initial cluster centers comprises: Acquire a plurality of second historical feature vectors, and randomly select a preset number of second historical feature vectors from the plurality of second historical feature vectors as first cluster centers; Calculating a second similarity between a plurality of the first cluster centers; If the second similarity is greater than a first threshold, merging the first cluster centers corresponding to the second similarity to obtain a first number of second cluster centers; Calculating a third similarity between the remaining historical feature vectors and the plurality of second cluster centers; the remaining historical feature vectors refer to the second historical feature vectors other than the preset number of second historical feature vectors in all the historical feature vectors; If the third similarity is greater than the second threshold, taking the remaining historical feature vectors corresponding to the third similarity as the cluster cluster of the second cluster center corresponding to the third similarity; The mean of all feature vectors in the cluster is calculated to obtain the initial cluster center.

6. The method for querying construction cost data according to claim 2, characterized in that: The step of constructing a current feature vector corresponding to the current semantic query statement includes: Encoding the current semantic query sentence to obtain an encoding sequence; According to the coding sequence, a coding matrix corresponding to each word is formed; Inputting the encoding matrix into a preset recognition model to obtain a confidence level output by the preset recognition model; Filtering key words in the current semantic query statement according to the confidence of each word; The codes corresponding to the key words are constructed as the current feature vector.

7. The method for querying construction cost data according to claim 6, characterized in that: The step of forming a coding matrix corresponding to each word according to the coding sequence comprises: Get a preset number of adjacent words before and after each current word; A coding matrix is ​​constructed according to the codes corresponding to the current word and a plurality of the adjacent words; wherein the code corresponding to the current word is located at the center of the coding matrix.

8. A device for querying engineering cost data, characterized in that: The query device for engineering cost data comprises: An acquisition unit, used to acquire a current semantic query statement input by a user and a plurality of historical semantic query statements in a warm storage area; A matching unit, configured to match a historical semantic query statement that is consistent with the current semantic query statement among the plurality of historical semantic query statements; A first judgment unit is used to use the query result corresponding to the historical semantic query statement as the target data corresponding to the current semantic query statement if the current semantic query statement is consistent with the historical semantic query statement; A second judgment unit is configured to match the target data corresponding to the current semantic query statement in the cold storage area if the current semantic query statement is inconsistent with the historical semantic query statement; wherein the warm storage area stores part of the data and the cold storage area stores all of the data; The confirmation unit is used to take the target data as a search result.

9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps in the method for querying engineering cost data as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps in the method for querying construction cost data as described in any one of claims 1 to 7 are implemented.