Semantic extension matching method and system based on domain synonym library
By building a domain-specific thesaurus and generating an extended query index, the system solved the response and matching problems of e-commerce search systems when faced with diversified queries, achieving accurate understanding and dynamic adaptation of user intent, and improving the accuracy and intelligence of search results.
Patent Information
- Application Number
- CN202511024629.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-24
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2045-07-24
AI Technical Summary
Existing e-commerce search systems struggle to respond quickly and accurately to diverse and colloquial user queries, especially when dealing with emerging vocabulary and domain-specific expressions, resulting in insufficient comprehensiveness and accuracy of search results.
A domain thesaurus is constructed. By obtaining user query keywords and context information, a query context vector is generated. The pre-built domain thesaurus is used to determine an extended thesaurus set, and an extended query index is generated through weighted processing. Semantic extension matching is performed in conjunction with the platform service category system.
It improves the system's ability to accurately match product and user queries, dynamically adapts to changes in user input, optimizes the accuracy and precision of query results, and enhances the intelligence level of the search system.
Smart Images

Figure CN120910232A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and in particular to a semantic expansion matching method and system based on a domain synonym library. BACKGROUND
[0002] With the rapid development of e-commerce, the number and types of goods on network platforms are increasingly rich, and users have higher requirements for the retrieval accuracy and intelligent level of e-commerce search systems. In actual applications, users often use diversified and colloquial expression methods to query goods, resulting in multiple different expression forms of the same goods. The diversification of user expression methods brings greater understanding and matching challenges to existing search technologies.
[0003] At present, mainstream e-commerce search systems generally rely on keyword matching, static dictionary expansion or semantic models constructed based on general corpora to realize the association of queries and goods information. They can effectively handle standardized expressions or known words, but when facing emerging words, popular network words or domain-specific expressions, they often have difficulty in timely covering and responding, affecting the comprehensiveness and accuracy of search results. In addition, with the continuous changes in goods information and user demand, traditional semantic matching methods still have obvious deficiencies in dynamic adaptability and fine-grained understanding. SUMMARY
[0004] The present application provides a semantic expansion matching method and system based on a domain synonym library, a storage medium, a computer program product and an electronic device to at least solve the problem that e-commerce search systems in the related art cannot better understand the user's true query intent under diversified expression.
[0005] In a first aspect, the present application provides a semantic expansion matching method based on a domain synonym library, which comprises: acquiring a query keyword input by a user, and generating a query context vector according to the query keyword and user context information; if the query keyword does not belong to a category word in a platform service category system, determining a set of expansion synonyms matching the query keyword from a pre-constructed domain synonym library; the domain synonym library contains multiple domain scenarios and corresponding domain synonym tables, each domain synonym table is used to record a plurality of mapping relationships between non-category words and expansion synonyms, and the expansion synonyms are synonyms generated by combining category words matching the non-category words with context information of the corresponding domain scenarios for semantic expansion; for each expansion synonym in the set of expansion synonyms, a correlation score between the expansion synonym and the query context vector is calculated, and a corresponding weighted expansion synonym is obtained through weighted processing; and an expansion query index used for search matching is generated according to each weighted expansion synonym and the query keyword.
[0006] In a second aspect, an embodiment of the present application provides a semantic expansion matching system based on a domain synonym library, the system comprising: an acquisition unit configured to acquire a query keyword input by a user, and generate a query context vector according to the query keyword and user context information; a synonym set determination unit configured to, if the query keyword does not belong to a category word in a platform service category system, determine a set of expansion synonyms matching the query keyword from a pre-constructed domain synonym library; the domain synonym library comprises a plurality of domain scenarios and corresponding domain synonym tables, each of the domain synonym tables is configured to record a plurality of mapping relationships between non-category words and expansion synonyms, the expansion synonyms are synonyms generated by combining a category word matching the non-category word with context information of a corresponding domain scenario for semantic expansion; the category word is a standard vocabulary in the platform service category system; a context analysis unit configured to, for each expansion synonym in the set of expansion synonyms, calculate a relevance score between the expansion synonym and the query context vector, and obtain a corresponding weighted expansion synonym through weighted processing; and an expansion query generation unit configured to generate an expansion query index for search matching according to each weighted expansion synonym and the query keyword.
[0007] In a third aspect, an electronic device is provided, comprising at least one processor, and a memory connected to the at least one processor in communication, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps of the semantic expansion matching method based on the domain synonym library according to any embodiment of the present application.
[0008] In a fourth aspect, an embodiment of the present application provides a storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the steps of the semantic expansion matching method based on the domain synonym library according to any embodiment of the present application.
[0009] In a fifth aspect, an embodiment of the present application provides a computer program product comprising computer programs / instructions, which, when executed by a processor, implement the steps of the semantic expansion matching method based on the domain synonym library according to any embodiment of the present application.
[0010] The semantic expansion matching method and system based on the domain synonym library provided by the present application can at least produce the following technical effects:
[0011] (1) By constructing a field synonym library, combined with the platform service category system, the corresponding expansion synonyms are provided for non-category words, which not only can effectively process standardized query expressions, but also can adapt to colloquial and diversified queries and emerging words, and improve the precision matching ability of the system to commodities and user queries.
[0012] (2) By generating a query context vector according to the query keywords and user context information, the system can dynamically adapt to the changes of user input, and introduces the weighting processing of the correlation score between the expansion synonyms and the query context vector, to ensure that the system can generate accurate expansion query index according to the semantic correlation of different expansion synonyms, and further optimize the accuracy and precision of the query results.
[0013] Through the technical scheme, combined with the dynamic expansion of the field scene and the synonym library, multi-dimensional semantic expansion can be performed when processing complex and non-standardized user queries, and the intelligent level of the system is improved. When facing colloquial, fuzzy, and network popular words and other new queries, the system can quickly respond and provide highly relevant commodity information, significantly enhancing the semantic understanding and processing ability of the search system. BRIEF DESCRIPTION OF DRAWINGS
[0014] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can also obtain other drawings according to these drawings without creative labor.
[0015] Figure 1 A flow chart of an example of a semantic expansion matching method based on a field synonym library according to an embodiment of the present application is shown;
[0016] Figure 2 An operation flow chart of an example of adaptively updating a field synonym library according to an embodiment of the present application is shown;
[0017] Figure 3 An operation flow chart of an example of updating the context information of the field scene according to an embodiment of the present application is shown;
[0018] Figure 4 An interface interaction schematic diagram of an example of dataset management of fine-tuning a large language model according to an embodiment of the present application is shown;
[0019] Figure 5 An interface interaction schematic diagram of an example of fine-tuning task of fine-tuning a large language model according to an embodiment of the present application is shown;
[0020] Figure 6A schematic diagram showing the experimental comparison of simulation results for an example of the quality of synonym expansion under different methods is presented.
[0021] Figure 7 A structural block diagram of an example of a semantic expansion matching system based on a domain thesaurus, according to an embodiment of this application, is shown. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0023] It should be noted that the commonly used semantic matching methods for e-commerce search mainly include the following three categories: keyword matching-based search technology, static thesaurus-based expansion technology, and word vector models trained on general corpora.
[0024] In keyword-based search technologies, the terms are typically segmented from the user query and product text, and then directly matched against a product database. While this method is simple to implement and fast, it inherently relies on literal consistency and cannot effectively identify synonyms, abbreviations, or emerging trending internet terms. This can lead to retrieval omissions or matching errors when there are discrepancies between the user's description and the product information.
[0025] In the extension technology based on static thesaurus, a simple semantic expansion between query terms and product information is achieved by pre-building a thesaurus. Although this technology can improve the semantic coverage to some extent, the thesaurus is not updated in a timely manner, making it difficult to cover rapidly changing hot words, new product category terms, and industry-specific terminology in the e-commerce field. This results in limited responsiveness of the system when facing emerging expressions, and it cannot meet users' dynamic search needs.
[0026] In word vector models trained on general corpora, such as GloVe (Global Vectors for Word Representation), semantic distance relationships between words are obtained through large-scale unsupervised learning, thereby achieving a certain degree of fuzzy matching and semantic expansion. However, such models are often difficult to deeply customize for e-commerce business scenarios, and have limited ability to handle domain-specific expressions, fine-grained product differentiation, and contextual semantic ambiguity. They are prone to semantic generalization or erroneous expansion, affecting actual retrieval performance.
[0027] It should be understood that the above description of the prior art is intended for the purpose of facilitating public understanding of the inventive spirit and motives of the present application and should not be considered as limiting the present application. In addition, the technical solutions described in the above prior art are not prior art and can also be undisclosed technical solutions, such as solutions under research or in the laboratory stage.
[0028] In the technical solutions of the present application, the collection, storage, use, processing, transmission, provision and disclosure of user personal information, etc. comply with relevant laws and regulations and do not violate public order and good customs.
[0029] Figure 1 A flowchart of an example of a semantic expansion matching method based on a domain synonym library according to an embodiment of the present application is shown.
[0030] As for the execution subject of the method of the present application, it can be any controller or processor with computing or processing capability to effectively cope with the needs of diversified expression, rapid change and fine-grained matching in the e-commerce environment, and to realize accurate understanding and dynamic adaptation of user intent and product information.
[0031] In some examples, it can be integrated in an electronic device or terminal in a software, hardware or combination of software and hardware manner, and the type of terminal or electronic device can be diversified, such as mobile phone, tablet computer or desktop computer, etc.
[0032] As Figure 1 As shown in step S110, the query keyword input by the user is obtained, and a query context vector is generated according to the query keyword and user context information.
[0033] It should be noted that the query keyword input by the user can be a standardized product name, a non-standardized colloquial expression, or a query word with a specific context. However, in the modern e-commerce environment, users often use expressions with ambiguity, semantic ambiguity or polysemy for search, so the system needs to understand and analyze the query word from multiple angles.
[0034] Here, the extraction of query keywords can be processed by natural language processing techniques such as word segmentation, named entity recognition (NER), etc. to split the user input query to obtain core query words. For example, for the query "Apple mobile phone price", the two keywords "Apple mobile phone" and "price" can be extracted. The context information can include the user's historical search records, the current page of the commodity category, the user's purchase preferences, and other personalized information. These context information can help the system better understand the user's intention and enhance the accuracy of semantic matching. For example, if the user has recently searched for "running shoes" related goods, then when inputting "shoes", it indicates that the user is more likely to find "running shoes" rather than other types of shoes.
[0035] Further, through word embedding technology (such as Word2Vec, GloVe, etc.), the query keywords input by the user and their context information are converted into a query context vector, which represents the semantic features of the query keywords and the related user intent, realizing the deep understanding of the user query.
[0036] In step S120, if the query keyword does not belong to the category word in the platform service category system, the set of extended synonyms matching the query keyword is determined from the pre-constructed domain synonym library.
[0037] Once the system obtains the query keyword, the next step is to determine whether the query keyword belongs to the category word in the platform service category system. If the query keyword is a keyword in the platform predefined category, it can be directly matched for search. But for keywords that do not belong to the category word, the system can find the extended synonyms from the pre-constructed domain synonym library.
[0038] Here, the domain synonym library contains multiple domain scenarios and corresponding domain synonym tables, each of which is used to record the mapping relationship between multiple groups of non-category words and extended synonyms. The extended synonyms are synonyms generated by combining the category words matching the non-category words with the context information of the corresponding domain scenarios.
[0039] It should be noted that the meaning of the domain scenario can be diverse. Specifically, on the one hand, it can be explicitly defined or pre-configured scenario types, which can refer to various commodity categories or user demand scenarios in the platform, such as sports shoes, student party, business party, home office, outdoor travel, and pet family, etc. labeled crowd or thematic use context. On the other hand, it can also be defined or updated by various feature pattern analysis algorithms to support adaptive updates of new domains or new feature patterns. Thus, when the query word is not clear, more matching words can be provided through semantic expansion.
[0040] In addition, in the synonym library, synonyms of different domain scenarios are managed in separate tables, which can ensure that synonym expansion and query matching in each domain scenario are optimized according to the unique context, without interference of information of different domain scenarios, thereby ensuring the efficiency and accuracy of synonym expansion and query matching.
[0041] In some embodiments, in order to ensure that the expanded synonyms can be better recognized by the search engine and effectively executed, the expanded synonyms can also be category words. In addition, each expanded synonym is not only intended for the standardization of non-category words, but also more suitable for specific domain scenarios. Taking the category of "sports shoes" as an example, "running sports shoes", "jogging sports shoes", and "training sports shoes" can be regarded as different expanded synonyms under the same category. Although they are different, they all belong to a kind of sports shoes in the domain scenario, and thus can be used as effective expansion words in the scenario.
[0042] Further, by matching through the query field, a synonym set semantically similar to the query keyword is found from the domain synonym library, thereby providing more matching options for the search system and enhancing the accuracy of the search.
[0043] For example, when a user queries "all-purpose student shoes", the system first determines that "all-purpose" is an adjectival word, and "student shoes" or "shoes" are the main keywords, which do not directly match the specific category words in the category system. Therefore, various expanded synonyms related to "student shoes" or "shoes" are found through semantic matching, such as "student leather shoes", "sports student shoes", "leisure student shoes", and "running sports shoes". Thus, when processing an incomplete matching query, the query keyword can be expanded to more possible synonym expressions through semantic expansion.
[0044] In step S130, the relevance score between each expanded synonym in the expanded synonym set and the query context vector is calculated, and the corresponding weighted expanded synonym is obtained through weighting processing.
[0045] Here, after obtaining the expanded synonym set, matching calculation needs to be performed on the synonyms and the query context vector to ensure that the expanded synonyms irrelevant to the user preference indicated by the user context can be filtered out. The relevance score is used to express the degree of fit between the expanded synonym and the user context, which can be quantitatively expressed by using various measurement methods, such as cosine similarity, Euclidean distance, dot product, etc., to quantify the relevance between each expanded synonym and the user query intent. The higher the relevance score, the more matched the corresponding expanded synonym and the user query intent.
[0046] Then, the system weights the expanded synonyms according to their relevance scores. Specifically, the expanded synonyms with higher relevance scores are given higher weights, while the expanded synonyms with lower relevance scores are given lower weights, avoiding the interference of redundant or irrelevant synonyms on the final search results.
[0047] As to the implementation details of step S130, in some examples of the embodiments of the present application, the relevance score of the expanded synonym with the query context vector is calculated by a gated network. If the relevance score is less than or equal to a preset relevance threshold, the expanded synonym is filtered out; and if the relevance score exceeds the relevance threshold, the expanded synonym is weighted according to the relevance score to obtain a corresponding weighted synonym. In this way, the gated network is used to evaluate the degree of fit of each expanded synonym with the user input query, filter out irrelevant synonyms, and at the same time, screen the most relevant expanded synonyms and weight them according to the relevance.
[0048] It should be noted that the gated network has the ability to selectively update and pass information, and can adjust the weight of each expanded synonym according to the input feature information, thereby optimizing the matching effect.
[0049] The expanded synonym and the query context vector are both mapped into the same vector space, and the cosine similarity can be used to measure the similarity between them:
[0050]
[0051] In the formula, a is the query context vector, b is the expanded synonym vector, and ‖a‖ and ‖b‖ are the lengths of vectors a and b, respectively.
[0052] By calculating the cosine similarity between the query context vector and the expanded synonym vector, the relevance score of the expanded synonym is obtained, which reflects the matching degree of the query context and the expanded synonym. The higher the score is, the higher the matching degree is.
[0053] On the basis of calculating the relevance score, the expanded synonym is screened and weighted by the gated network. Specifically, by calculating the gating value, the contribution of the expanded synonym to the final result is controlled. The gating value is determined by the relevance score of the query context vector and the expanded synonym, and a Sigmoid function is used to generate a gating value in the range of [0, 1]:
[0054]
[0055] where g(x) is the gating value. x is the relevance score of the extended synonym and the query context vector, which can be given by the corresponding cosine similarity. a is the adjusting parameter of the gating network, which is used to control the sensitivity of the gating mechanism.
[0056] Further, the gating value g(x) can be taken as the corresponding relevance score, and compared with the preset relevance threshold to complete the screening of the extended synonym.
[0057] Specifically, a relevance threshold θ (for example, 0.7) is preset in the system. If the relevance score of the extended synonym and the query context is less than or equal to the preset threshold, it is considered that the synonym has a low degree of fit with the query intent, and should be excluded from the set of extended synonyms to avoid its interference with the search results. At this time, the corresponding extended synonym will be filtered out, thereby effectively eliminating irrelevant or low-relevance extended synonyms, thereby reducing the influence of irrelevant information on the final search results and ensuring that the most relevant synonym or synonyms can participate in search matching in priority.
[0058] Therefore, the influence of user context information on the query is considered in the weighting process. For example, if a user searches for a specific category of goods (such as sports shoes) multiple times in the history search record, the relevant synonyms of this category will be weighted and improved, and irrelevant extended synonyms (such as student party leather shoes) can be filtered out, thereby ensuring that the relevance of the search results matches the long-term interests and behaviors of the user.
[0059] In step S140, an extended query index for search matching is generated according to each weighted extended synonym and the query keyword.
[0060] Here, the extended query index will contain all the weighted synonyms and their weights, and will be used as a query condition for search engine retrieval for search matching. The generated extended query index can ensure that the search engine not only considers the original query keyword when matching the product information, but also searches according to the semantic information extended by the synonym library, ensuring that the search engine can comprehensively and accurately understand the user's query.
[0061] Thus, the search engine can perform efficient product matching based on the extended query index, so that in the case where the keyword input by the user is a network hotword or a keyword that does not belong to the category word, the search engine can also search and match based on more context-related extended synonyms, greatly improving the coverage and accuracy of the search, providing more accurate search results for the user, and enhancing the user experience.
[0062] In some examples of the embodiments of the present application, the various weighted extended synonyms are sorted in descending order according to the relevance scores to form a set of weighted extended synonyms. Then, the query keyword is concatenated with the set of weighted extended synonyms to generate an extended query index for search matching.
[0063] Here, the various weighted extended synonyms are sorted in descending order according to the relevance scores to ensure that the most relevant synonyms have a higher priority in the search process.
[0064] Specifically, the set of weighted extended synonyms includes each extended synonym and its corresponding relevance score, and the set of extended synonyms is sorted in descending order according to the relevance scores to ensure that the synonyms with higher relevance are located in the front. For example, the set of weighted extended synonyms after sorting is: {("leisure student shoes", 0.92), ("sports student shoes", 0.87), ("running sports shoes", 0.80)}.
[0065] Through the descending sorting, the system will preferentially select the extended synonyms highly relevant to the query intent and exclude the synonyms with lower relevance, which can ensure that the system returns the goods most consistent with the user's query requirements as much as possible in the query matching.
[0066] After descending sorting, the system concatenates the query keyword "all-purpose student shoes" with the set of sorted weighted extended synonyms so that the query keyword and all the extended synonyms can be considered simultaneously in the search matching process. The final extended query index generated is as follows:
[0067] "All-purpose student shoes" + {("leisure student shoes", 0.92), ("sports student shoes", 0.87), ("running sports shoes", 0.80)};
[0068] The concatenated query index not only includes the query keyword "all-purpose student shoes", but also includes multiple weighted extended synonyms, which ensures that the search system can fully consider the diversity and semantic extension of the query keyword, the system can cover more potential goods descriptions and categories, and the possibility of search matching is increased, thereby optimizing the coverage of the search results. For example, when the user queries "all-purpose student shoes", it is a non-standard category word, which may make the search engine unable to fully understand the user's query intent. By considering the extended synonyms "leisure student shoes", "sports student shoes", and "running sports shoes" simultaneously, the comprehensiveness and relevance of the search results are improved. In addition, the concatenated query index can also ensure that the goods retrieved based on the synonyms most relevant to the user's context are preferentially displayed based on the descending sorting of the weighted scores, which improves the intelligent level of the search system.
[0069] It should be noted that the domain synonym library in the embodiments of the present application is different from the ordinary synonym dictionary. The ordinary synonym dictionary usually only provides one-to-one or one-to-many keyword replacement, while the domain synonym library is constructed for different domain scenarios (such as specific classification or context construction), and can provide more accurate extended synonyms for a specific commodity category, user group or use scenario. The domain synonym library not only expands the number of synonyms, but also considers the expression needs of the domain scenario, and through comparison and matching with user context information, it can better meet the user query needs, improve the relevance and accuracy of the search results, and avoid the matching deviation and misunderstanding caused by ignoring the context and domain scenario in the ordinary synonym dictionary.
[0070] In addition, unlike the matching search using "matching keywords + user portrait", which mainly relies on the user's historical behavior to infer his preferences, it is usually limited to the user's known expression method, and has weak matching ability for the user's first contact or infrequent query needs. The matching method based on the domain synonym library can actively expand the range of input queries, and combine the context to understand the semantics more accurately, so as to obtain more comprehensive search results without relying too much on historical data in the user portrait. Therefore, it has stronger dynamic adaptability and can respond to changes in new vocabulary and context in real time, while the traditional matching based on user portrait relies on long-term accumulated data and cannot quickly adapt to the user's new needs.
[0071] Regarding the construction of the domain synonym library, on the one hand, it can be a synonym table and domain scenario label manually created or regularly maintained by the operator according to needs, to ensure that the domain synonym library can accurately reflect market demand and user habits. For example, the operator can regularly add and adjust synonyms related to specific commodity categories or user groups according to market trends and user behavior analysis, and manage them according to different domain scenarios (such as sports shoes, electronic products, etc.), so as to continuously update and optimize the synonym library. On the other hand, it can also be a machine learning algorithm and natural language processing technology that automatically mines new vocabulary and industry terms from user behavior, product descriptions, social media or other external data sources, and expands and adjusts them in combination with existing synonyms. In this way, through adaptive updating, the synonym library can respond to emerging vocabulary, internet slang and domain-specific expressions in a timely manner, thereby improving the dynamic adaptability and long-term effectiveness of the domain synonym library.
[0072] Figure 2 An operation flowchart of an example of adaptively updating the domain synonym library according to an embodiment of the present application is shown.
[0073] As shown in Figure 2 In step S210, a set of potential non-category word-category word matching pairs is extracted from a multi-source data set.
[0074] In some embodiments, the multi-source data set can be a complete data sample set for supporting full update of the domain synonym library. However, full update can cause excessive resource consumption and cannot support real-time dynamic iteration, which can cause some popular network jargons to be unable to be quickly included in the domain synonym library. Preferably, the multi-source data set can be incremental data, such as incremental data of the previous day or the previous week, to support quick update of the domain synonym library.
[0075] Here, the multi-source data set contains information sources from different dimensions, which can provide more comprehensive context to enhance the matching degree between the query and the product information. Specifically, the multi-source data set contains at least one of the following dimensions: product title, user historical query record, and user historical comment information. The product title can usually contain the core features of the product, such as brand, type, purpose, etc. The user historical query record can reflect its common expression and potential demand, and often contains a large amount of natural language expressions, such as "light running shoes". The user historical comment information can use some special words or expressions, which can also provide important clues for potential non-category words, for example, the comment may mention "comfortable running shoes".
[0076] Regarding the details of the extraction of the word matching pair, first, the text in the multi-source data set can be preprocessed, including removing stop words, word segmentation, lemmatization, etc., and then useful words are extracted from the original text. Then, whether it belongs to a category word or a non-category word (such as a user input custom query word) is identified through the platform service category system.
[0077] In some embodiments, the potential matching pair can refer to non-category words and category words that appear at the same time in the same query or the same context. For example, if the user's query is "hundred students shoes", and the product category that the user is interested in is "sports shoes", then "light sports shoes"-"sports shoes" can be a potential non-category word-category word matching pair.
[0078] In some examples of the embodiments of the present application, at least one popular non-category word is extracted from the multi-source data set, and the popular non-category word is a word whose frequency of occurrence in a predetermined time period exceeds a preset popular frequency threshold and is not included in the search standard vocabulary.
[0079] In some embodiments, the frequency of each valid word from multiple data sources (such as product title, user query record, user comment, etc.) is counted to identify which words frequently appear in a specific time period, and these words are likely to be words that users often use but have not been included in the standardized vocabulary.
[0080] For example, a new popular term "lazy shoes" may frequently appear in the query records of users, but has not been included in the standard vocabulary table of the platform. In order to ensure the quality of the popular non-category words, the system sets a popular frequency threshold, and screens the words with a frequency exceeding the threshold in a predetermined time period as popular non-category words, so as to ensure that the system can screen out truly representative and potentially valuable words from a large amount of data, and avoid the interference of noise words.
[0081] Further, based on the semantic similarity between the popular non-category words and the category words in the platform service category system, at least one non-category word-category word matching pair with a semantic similarity exceeding a preset semantic threshold is screened out to generate a set of potential non-category word-category word matching pairs.
[0082] Here, the results of semantic similarity calculation are used to roughly screen which popular non-category words have a high enough semantic correlation with the platform category words, so as to be used as potential matching pairs. For example, "lazy shoes" and "leisure shoes" may be highly similar words, while "lazy shoes" and "running shoes" may have a low semantic similarity.
[0083]
[0084] In the formula, N i and C j are the word vectors of the popular non-category word N i and the category word C j , and Sim(N i , C j ) represents the cosine similarity between them.
[0085] Further, the semantic threshold is used to screen the pairing between the non-category words and the category words, so as to be used as potential matching pairs, so as to ensure that only highly matched non-category words and category words are combined, and the introduction of low correlation word pairs is avoided.
[0086] In step S220, the co-occurrence frequency between the non-category words and the category words in each pair of potential non-category word-category word matching pairs is counted, and a candidate word pair subset with a co-occurrence frequency exceeding a preset co-occurrence frequency threshold is screened out.
[0087] Here, the co-occurrence frequency is calculated based on the non-category words and the category words appearing simultaneously in the same query of the user in the multi-source data set. The co-occurrence frequency refers to the number of times the non-category words and the category words appear simultaneously in the same query or the same context. Specifically, if the user repeatedly uses "all-purpose white shoes" and "leisure shoes" in multiple queries, and the two frequently appear in the title or comments of the same commodity, the co-occurrence frequency between "all-purpose white shoes" and "leisure shoes" will be high.
[0088] Specifically, assuming that the co-occurrence frequency of a non-category word N and a category word C in the same query is f(N,C), the co-occurrence frequency CF(N,C) can be expressed as:
[0089]
[0090] In the formula, M 总 represents the total number of queries, which is represented by the total number of all queries in the entire reference data set; f(N,C) is the number of times that the non-category word N and the category word C appear simultaneously.
[0091] After the co-occurrence frequency is counted, the valid candidate word pair subset can be screened according to the set co-occurrence frequency threshold. These candidate word pairs have a high frequency of occurrence in the multi-source data set and have a strong correlation, and usually represent the actual demand and correlation between users and goods. For example, if the co-occurrence frequency of "hundred shoes" and "leisure shoes" is higher than a predetermined threshold, they can be considered as valid matching pairs.
[0092] Specifically, by comparing with the preset co-occurrence frequency threshold T, when the co-occurrence frequency CF(N,C) of a non-category word and a category word is greater than the threshold, the word pair is included in the candidate set. If the co-occurrence frequency is lower than the threshold, the word pair is ignored. Thus, the quality of the candidate word pair subset is ensured, and the noise effect of low-frequency word pairs is avoided.
[0093] In step S230, each word pair in the candidate word pair subset is subjected to fusion processing facing multiple domain scenarios, and the word pair is subjected to semantic expansion based on the context information of each domain scenario, to generate corresponding each expanded synonym.
[0094] Here, the non-category word-category word matching pair is subjected to semantic expansion through the context information of the domain scenario, which ensures that the generated synonym is more consistent with the corresponding domain scenario. Further, the domain scenario can be defined based on a specific commodity category (such as "sports shoes", "running shoes") or a user demand scenario (such as "business shoes", "home shoes"). The selection of the domain scenario can be manually annotated, or can be adaptively generated through a data-driven manner.
[0095] In some embodiments, the semantic expansion can be performed by mapping the word pairs and the context information of the domain scenario to the same semantic space through semantic embedding technology using various deep learning models such as the word vector model Word2Vec, the BERT (Bidirectional Encoder Representations from Transformers) model, etc., which comprehensively considers the semantic information of the word itself and the domain scenario to generate more expanded synonyms that conform to the domain scenario.
[0096] In step S240, a mapping relationship between each expanded synonym and the corresponding non-category word is constructed to update the domain synonym library.
[0097] Specifically, by analyzing the semantic relationship between each expanded synonym and the non-category word, the system will establish a mapping relationship for each pair. In addition, according to the domain scenario adopted by the expanded synonym, it is specifically subdivided into the corresponding domain synonym table to further enrich the content of the synonym library. In addition, by subdividing the domain synonym table, the system can dynamically adjust the synonym library, so that it not only has a wide coverage, but also can provide more accurate semantic matching for specific domain scenarios.
[0098] Through the embodiments of the present application, the semantic relationship between potential non-category words and category words is accurately identified and expanded by combining the actual behavior of the user and the characteristics of the goods. By counting the co-occurrence frequency, the system can filter out high-frequency and actually relevant word pairs to ensure the quality and effectiveness of synonym expansion. These candidate word pairs are further fused for multiple domain scenarios, so that the expanded synonyms are more consistent with the context of different domains, thereby improving the accuracy of semantic expansion. Finally, by constructing the mapping relationship between the expanded synonyms and the non-category words and updating the synonym library, the system can continuously adaptively optimize the content of the synonym library, improve the response ability and accuracy of the search engine to diversified queries, and ensure that the search needs of the user are more accurately satisfied.
[0099] Figure 3 An operation flowchart showing an example of updating the context information of the domain scenario according to an embodiment of the present application is shown.
[0100] As shown in Figure 3 In step S310, based on the BERT model, the text data in the multi-source data set is converted into a semantic vector.
[0101] The BERT model is a deep learning model that can capture contextual information through pre-training, thereby providing high-quality semantic vector representations. Text data often contains rich semantic information, and BERT considers all words in the context through bidirectional encoding and generates vector representations of each word in the sentence, thereby capturing more semantic levels.
[0102] When text data is input into the BERT model, BERT generates a contextual embedding representation of each word, i.e., a semantic vector. Assuming that the input text is a sentence X = {x1, x2,..., x n}, the BERT model maps each word x i to a fixed-dimensional semantic vector v i , i.e.:
[0103] v i = BERT(x i ), equation (5)
[0104] In the equation, v i is the embedding representation of the word in the given context.
[0105] Thus, the BERT model generates a corresponding semantic vector for each piece of text data (such as a product title, query record, or comment), which represents the deep semantic features of the corresponding text data.
[0106] In step S320, the transformed semantic vectors are clustered using an incremental DBSCAN clustering algorithm to update or generate at least one cluster, each cluster uniquely corresponding to a domain scenario.
[0107] Here, the semantic vectors generated by BERT are clustered using an incremental DBSCAN (Density-Based Spatial Clustering of Applications with Noise) clustering algorithm, so that text data with similar semantics are grouped into the same cluster, and each cluster represents a domain scenario. Unlike traditional K-Means clustering, which requires the total number of clusters to be specified in advance, DBSCAN can automatically handle noise data and adaptively generate different numbers of clusters based on density. Specifically, the DBSCAN algorithm clusters by calculating the density between data points. In the data space, areas with high density are clusters, and areas with low density are considered noise points. Each cluster is composed of enough points with connected density.
[0108] More specifically, for each semantic vector v iIncremental DBSCAN will calculate its density relationship with other semantic vectors and cluster according to the set minimum number of points (MinPts) and radius threshold (ε). ε determines the radius of the cluster, and MinPts determines the minimum number of data points required in each cluster. Based on these parameters, DBSCAN clusters by calculating the density of each data point in space. If there are enough other data points in the neighborhood of a data point, these points will be classified into the same cluster. Otherwise, the point will be regarded as a noise point.
[0109] In addition, compared with the traditional DBSCAN, by adopting the incremental DBSCAN algorithm, the data points can be gradually increased for clustering in the data stream environment without the need to recalculate all points. With the inflow of new data, incremental DBSCAN can update the clustering based on the newly added semantic vectors without recalculating the entire data set, can handle changing data, and meet the demand for adaptive dynamic updating. Thus, when new text data is converted into semantic vectors, the system only needs to compare these new data with the existing clusters and update the corresponding clusters.
[0110] In step S330, the feature information of the cluster center of each cluster is extracted to update the context information of the corresponding field scene.
[0111] The cluster center represents the core features of the cluster and is the essence of the clustering result, which can provide the core features of semantic summary for each field scene.
[0112] Exemplarily, the feature of the cluster center can be the mean vector of all points in the cluster to reflect the overall semantic features of the cluster. Assuming that the cluster C k contains n semantic vectors v1, v2,..., v n n, the calculation formula of the cluster center v center is as follows:
[0113]
[0114] In the formula, v s is each semantic vector in the cluster C k , and n is the size of the cluster.
[0115] The cluster center represents the core features of the field scene, and the system can extract the context information of the field scene by analyzing the semantic vector of the cluster center, which can reflect the focus of the user on a certain commodity category or demand scene.
[0116] Thus, by extracting the feature information of the cluster center and updating the context information of the field scene, the semantic changes of different field scenes can be accurately reflected, and the field scene can be adaptively updated to dynamically respond to the changes of the market and user behavior.
[0117] As for the implementation details of generating the extended synonym in step S230, in some examples of the embodiments of the present application, it can also be implemented in combination with a large language model. Through the powerful natural language understanding and generation capability of the large language model, the system can more intelligently generate the extended synonym according to the specific field scene, and ensure that the generated synonym meets the corresponding constraint condition through prompt word constraint engineering.
[0118] In some embodiments, the candidate word pair, the context information of each field scene, and the preset scene expansion prompt template are combined to construct a scene expansion prompt word, and the scene expansion prompt word is input into the large language model to perform chain reasoning according to each constraint item and correspondingly output each extended synonym, wherein the platform service category system is used as a knowledge base to support the large language model to generate the extended synonym.
[0119] More specifically, the scene expansion prompt template includes a scene target constraint item, a semantic consistency constraint item, and a category word constraint item. The scene target constraint item defines that the semantic expansion direction of the synonym should comply with the context information of the corresponding field scene, for example, in the "sports scene", the extended synonym should be a word related to "sports", such as "running shoes" or "training shoes". The semantic consistency constraint item defines that the extended generated synonym should be consistent with the core semantic attribute of the non-category word in the candidate word pair, for example, for "light and thin notebook", the generated synonym should be associated with "notebook", rather than other commodity semantics such as "light and thin clothes". The category word constraint item defines that the extended generated synonym should contain the category word in the platform service category system, for example, the extended synonym of "all-match student shoes" should be related to the "student shoes" category in the e-commerce platform, so as to be more consistent with the platform retrieval demand. These constraint items are effectively controlled through the prompt template input by the large language model, so that the generation of the synonym not only meets the semantic demand, but also guarantees the uniformity with the platform service system.
[0120] Various expansion examples can also be supplemented in the scene expansion prompt template to facilitate the learning of the large language model. An example of a simplified version of the scene expansion prompt template is as follows:
[0121] "{ " { non-category word} " related extended synonym. When generating the extended synonym, the following constraint conditions are followed:
[0122] 1. Scene target constraint: the extended synonym must be related to "{context information of the field scene}" and comply with the semantic characteristics of the scene.
[0123] 2. Semantic consistency constraint: the extended synonym should be consistent with the core attribute of "{non-category word}".
[0124]
[0125] 3. Category word constraint: The extended synonyms should contain at least one category word in the "{Platform Service Category System}".
[0126] Please generate a set of extended synonyms based on these requirements, and maintain the diversity and accuracy of the vocabulary.
[0127] }”
[0128] In some embodiments, the large language learning model can adopt a chain reasoning structure to perform step-by-step reasoning according to each constraint term in the input prompt word.
[0129] Specifically, the scene target constraint term is first parsed to identify the current domain scene (such as "sports scene" or "leisure scene") that needs to generate extended synonyms. According to the attributes of the scene, the model infers the characteristics that the extended synonyms should have, such as "comfort", "sports performance" or "portability".
[0130] For example, for the non-category word "all-purpose student shoes", if the scene context is "sports" related context, the model will infer that the synonyms need to include "running shoes", "fitness shoes" and other related categories, and these synonyms should have the characteristics suitable for sports.
[0131] In the reasoning process of maintaining semantic consistency constraint terms, the system checks whether the generated synonyms are consistent with the core semantics of the original non-category word. Ensure that the extended synonyms are consistent with the meaning of the original word, and do not deviate or change the core attributes of the original query (such as product attributes and functional attributes, etc.), such as confirming that these synonyms still meet the core characteristics of "all-purpose student shoes".
[0132] In the reasoning process of category word constraint terms, according to the platform's product category system, the model ensures that the extended synonyms contain one or more category words. Here, the purpose is to verify the extended synonyms, for example, if the synonyms are "beach shoes" or "lazy shoes" that do not meet the platform category system, the generated synonyms should contain extended synonyms such as "beach leisure shoes", "beach sandals", "light leisure shoes", "comfortable leisure shoes" that contain platform category words, to effectively call the platform search engine through the consistent category words.
[0133] By introducing a chain reasoning structure, the large language model can gradually follow each constraint condition and generate extended synonyms that meet the actual needs in an orderly manner. Using structured reasoning, the accuracy of the extended synonyms on multiple levels can be ensured, thereby improving the relevance and accuracy of search matching.
[0134] It should be understood that the type of large language learning model can be diverse, such as a general large language model (GPT series, Qwen series, etc.) or a specialized large model, and can also be achieved by appropriately fine-tuning a general large language model.
[0135] As a further optimization of the implementation, the general large language model can also be fine-tuned by designing a comprehensive loss function that takes into account semantic consistency, scenario adaptability, and category word matching at the same time, so as to ensure that the large language model can understand and learn various prompt constraints through training fine-tuning. The fine-tuned model has stronger semantic understanding ability and scenario adaptability when generating synonyms, and the generated extended synonyms are more consistent with the user's intention, improving the accuracy of the search system and the user experience.
[0136] Figure 4 An interface interaction schematic diagram of an example of data set management of fine-tuning a large language model according to an embodiment of the present application is shown.
[0137] As shown in Figure 4 , the data set management interface contains relevant information of multiple data sets, including data set name, import status, release status, data source, creator, creation time, modification time, etc. fields. Users can view the detailed information of existing data sets on this interface, and upload new data sets by clicking the "create data set" button. Users can easily manage multiple data sets. In addition, the data source of the data set is not limited to local upload, and can also be based on e-commerce platform background data for regular automatic incremental upload, so as to ensure that the content in the data set always remains consistent with the actual business and user demand, thereby improving the real-time and accuracy of the model in the fine-tuning process.
[0138] Figure 5 An interface interaction schematic diagram of an example of fine-tuning task of fine-tuning a large language model according to an embodiment of the present application is shown.
[0139] As shown in Figure 5 , in the management interface of the fine-tuning task, the user can create a new fine-tuning task and make related configurations. The user can select the corresponding general large language model (such as Qwen model), training method (such as LoRA or full update) according to the needs, and set other parameters of the task. In addition, the fine-tuning task can also display the performance comparison of different large language models to help users select the most suitable base model for fine-tuning. In this way, users can select the most suitable model and training method according to the specific needs of the task, improving the efficiency and accuracy of the fine-tuning task, so as to ensure that the finally trained model can better adapt to the specific application scenarios of the e-commerce platform.
[0140] Below, the semantic expansion matching method based on the field synonym library provided by the embodiments of the present application will be compared with the current three types of e-commerce search semantic matching methods, i.e., "search technology based on keyword matching", "expansion technology based on static synonym dictionary" and "word vector model based on general corpus training", and the differences in synonym expansion effect between the technical solutions.
[0141] Specifically, the search technology based on keyword matching matches the user query with the product text through keyword matching. In the expansion technology based on static synonym dictionary, the query word is expanded with the product information through the pre-constructed synonym table. In the word vector model based on general corpus training, the Word2Vec general word vector model is used for query expansion.
[0142] The specific experimental tasks are as follows:
[0143] Synonym expansion quality. Compare the accuracy and recall rate of synonym expansion of the technical solution in this paper and the traditional method.
[0144] Emerging vocabulary adaptability. Evaluate the recognition and expansion ability of the technical solution in this paper for emerging vocabulary, especially in the fast-changing scenarios of hot words and new product category language on e-commerce platforms, and verify the adaptability of the solution.
[0145] Query matching precision. Test the retrieval precision, recall rate, precision and other indicators of the four methods when processing e-commerce search queries.
[0146] In terms of data sets, the comparative experiment uses real data sets from e-commerce platforms, including:
[0147] Product title data: contains about 10,000 product titles.
[0148] Product description and function information: about 5,000 product detailed descriptions.
[0149] User behavior data: including user click, purchase, query history and other behavior data.
[0150] User comment data: about 3,000 user comments, including product ratings and comment content.
[0151] All data is standardized and preprocessed.
[0152] The selected synonym expansion quality evaluation indicators are as follows:
[0153] Accuracy (Accuracy): the proportion of accurately matched queries to all queries.
[0154] Recall (Recall): the proportion of relevant queries recalled by the system to all relevant queries.
[0155] Precision: the proportion of correctly matched queries in the extended query to all extended matching results.
[0156] F1-score: the harmonic mean of precision and recall.
[0157] Table 1. Comparison table of synonym expansion quality
[0158] Method Accuracy Recall Precision F1-score Based on keyword matching 0.72 0.65 0.68 0.66 Based on static synonym dictionary 0.78 0.70 0.75 0.72 Based on general word vector model 0.80 0.76 0.79 0.77 Technical solutions in this paper 0.85 0.83 0.82 0.82
[0159] As shown in Table 1, the technical solution in this paper is significantly better than the other three methods, especially in accuracy and recall, which proves that the combination of the dynamically updated domain synonym library and context information in this solution can generate more accurate synonyms and avoid the problem of static synonym tables not covering emerging words and changes in scenarios.
[0160] Figure 6 An experimental comparison simulation effect diagram showing an example of synonym expansion quality under different methods. The diagram shows the performance comparison of the four methods in terms of synonym expansion quality, mainly evaluated by four indicators: accuracy, recall, precision, and F1-score. The horizontal axis represents the four different methods.
[0161] As Figure 6 shown, the semantic expansion matching method based on the domain synonym library provided in this paper is significantly better than other methods in all indicators, especially in accuracy and recall, showing higher query matching precision and more comprehensive semantic expansion capability. Through the combination of dynamically updated domain synonym library and context information, it can effectively handle synonyms, abbreviations, and emerging words, provide more accurate matching and more extensive adaptability, and further enhance the search capability and user experience in rapidly changing environments such as e-commerce platforms.
[0162] It should be noted that, for the foregoing method embodiments, in order to simply describe, they are all expressed as a series of actions, but those skilled in the art should know that the present application is not limited to the order of the actions described, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application. In the above embodiments, the description of each embodiment is focused on, and the parts not described in detail in a certain embodiment can be referred to the relevant description of other embodiments.
[0163] Figure 7 A structural block diagram showing an example of a semantic expansion matching system based on a domain synonym library according to an embodiment of the present application.
[0164] As shown in Figure 7 The semantic expansion matching system 700 based on the domain synonym library includes an acquisition unit 710, a synonym set determination unit 720, a context analysis unit 730, and an expanded query generation unit 740.
[0165] The acquisition unit 710 is configured to acquire a query keyword input by a user, and generate a query context vector according to the query keyword and user context information.
[0166] The synonym set determination unit 720 is configured to, if the query keyword does not belong to a category word in a platform service category system, determine an expanded synonym set matched with the query keyword from a pre-constructed domain synonym library; the domain synonym library includes a plurality of domain scenarios and corresponding domain synonym tables, each of the domain synonym tables is configured to record a plurality of mapping relationships between non-category words and expanded synonyms, and the expanded synonyms are synonyms generated by combining a category word matched with the non-category word with context information of the corresponding domain scenario for semantic expansion; the category word is a standard vocabulary in the platform service category system.
[0167] The context analysis unit 730 is configured to, for each expanded synonym in the expanded synonym set, calculate a correlation score between the expanded synonym and the query context vector, and obtain a corresponding weighted expanded synonym through weighted processing.
[0168] The expanded query generation unit 740 is configured to generate an expanded query index for searching for a match according to each weighted expanded synonym and the query keyword.
[0169] In some embodiments, the embodiments of the present application provide a non-volatile computer readable storage medium, the storage medium stores one or more programs including execution instructions, the execution instructions can be read and executed by an electronic device (including but not limited to a computer, a server, or a network device, etc.) to execute the steps of any of the above-mentioned semantic expansion matching methods based on the domain synonym library.
[0170] In some embodiments, the embodiments of the present application also provide a computer program product, the computer program product includes a computer program stored on a non-volatile computer readable storage medium, the computer program includes program instructions, when the program instructions are executed by a computer, the computer executes the steps of any of the above-mentioned semantic expansion matching methods based on the domain synonym library.
[0171] In some embodiments, the electronic device also provided by the embodiments of the present application includes at least one processor, and a memory connected with the at least one processor in communication, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps of the method for semantic expansion matching based on the domain synonym library.
[0172] The product described above can perform the method provided by the embodiments of the present application, and has the corresponding function modules and beneficial effects of performing the method. Technical details not described in detail in the embodiments can be referred to the method provided by the embodiments of the present application.
[0173] The electronic device of the embodiments of the present application exists in various forms, including but not limited to: mobile communication devices, ultra-mobile personal computer devices, portable entertainment devices, or other onboard electronic devices with data interaction functions.
[0174] The device embodiments described above are only schematic, and the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e. they can be located in one place, or distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the embodiments of the present application.
[0175] From the above description of the embodiments, those skilled in the art can clearly understand that the embodiments can be realized by means of software plus a general hardware platform, and of course can also be realized by hardware. Based on such understanding, the above technical solutions can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in the various embodiments or some parts of the embodiments.
[0176] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements for some technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for semantic expansion matching based on domain synonym library, characterized in that, The method comprises: obtaining a query keyword input by a user, and generating a query context vector according to the query keyword and user context information; if the query keyword does not belong to a category word in a platform service category system, determining a set of extended synonym words matched with the query keyword from a pre-constructed domain synonym library; the domain synonym library comprises a plurality of domain scenarios and corresponding domain synonym tables, each of the domain synonym tables is used to record a plurality of sets of mapping relationships between non-category words and extended synonym words, and the extended synonym word is a synonym word generated by combining a category word matched with a non-category word with context information of a corresponding domain scenario for semantic expansion; for each extended synonym word in the set of extended synonym words, calculating a correlation score between the extended synonym word and the query context vector, and obtaining a corresponding weighted extended synonym word through weighted processing; generating an extended query index used for search matching according to each weighted extended synonym word and the query keyword.
2. The method of claim 1, wherein, For updating the domain synonym library, the method comprises: extracting a set of potential non-category word-category word matching pairs from a plurality of source data sets, the plurality of source data sets comprising at least one dimension selected from the following: product title, user historical query record, and user historical comment information; counting the co-occurrence frequency between non-category words and category words in each pair of potential non-category word-category word matching pairs, and screening a candidate word pair subset corresponding to a co-occurrence frequency exceeding a preset co-occurrence frequency threshold; the co-occurrence frequency is calculated based on the non-category word and the category word appearing simultaneously in the same query in the plurality of source data sets; fusing each word pair in the candidate word pair subset to a plurality of domain scenarios, and performing semantic expansion on the word pair based on the context information of each domain scenario to generate a corresponding each extended synonym word; constructing a mapping relationship between each extended synonym word and a corresponding non-category word to update the domain synonym library.
3. The method of claim 2, wherein, The method comprises: extracting at least one popular non-category word from the plurality of source data sets, the popular non-category word being a word whose appearance frequency in a predetermined time period exceeds a preset popular frequency threshold and is not included in a search standard vocabulary; based on the semantic similarity between the popular non-category word and each category word in the platform service category system, and screening at least one non-category word-category word matching pair corresponding to a semantic similarity exceeding a preset semantic threshold to generate a set of potential non-category word-category word matching pairs.
4. The method of claim 2, wherein, Before fusing each word pair in the candidate word pair subset to a plurality of domain scenarios, and performing semantic expansion on the word pair based on the context information of each domain scenario to generate a corresponding each extended synonym word, the method further comprises: based on a BERT model, converting text data in the plurality of source data sets into semantic vectors; using an incremental DBSCAN clustering algorithm to cluster the converted semantic vectors to update or generate at least one cluster; wherein each cluster uniquely corresponds to a domain scenario. Extract feature information of the cluster center of each cluster to update context information of the corresponding domain scene.
5. The method of claim 2, wherein, The merging processing of each word pair in the candidate word pair subset to each domain scene, and the semantic expansion of the word pair based on the context information of each domain scene to generate corresponding respective expanded synonyms, comprises: The candidate word pair, the context information of each domain scene, and a preset scene expansion prompt template are combined to construct a scene expansion prompt word, and the scene expansion prompt word is input into a large language model to perform chain reasoning according to each constraint item and output respective expanded synonyms accordingly; the platform service category system is used as a knowledge base to support the large language model to generate expanded synonyms; The scene expansion prompt template includes a scene target constraint item, a semantic consistency constraint item, and a category word constraint item; the scene target constraint item defines that the semantic expansion direction of the synonym should comply with the context information of the corresponding domain scene; the semantic consistency constraint item defines that the expanded synonym should be consistent with the core semantic attribute of the non-category word in the candidate word pair; and the category word constraint item defines that the expanded synonym should include the category word in the platform service category system.
6. The method of claim 1, wherein, The correlation score between the expanded synonym and the query context vector is calculated, and a corresponding weighted expanded synonym is obtained through weighted processing, comprising: The correlation score between the expanded synonym and the query context vector is calculated through a gating network; If the correlation score is less than or equal to a preset correlation threshold, the expanded synonym is filtered out; and If the correlation score exceeds the correlation threshold, the expanded synonym is weighted processed according to the correlation score to obtain a corresponding weighted synonym.
7. The method of claim 1, wherein, The expanded query index for search matching is generated according to each weighted expanded synonym and the query keyword, comprising: Each weighted expanded synonym is sorted in descending order according to the correlation score to form a weighted expanded synonym set; The query keyword and the weighted expanded synonym set are spliced to generate an expanded query index for search matching.
8. A semantic expansion matching system based on domain synonym library, characterized in that, The system comprises: An acquisition unit configured to acquire a query keyword input by a user, and generate a query context vector according to the query keyword and user context information; A synonym set determination unit configured to, if the query keyword does not belong to a category word in a platform service category system, determine an expanded synonym set matching the query keyword from a pre-constructed domain synonym library; the domain synonym library comprises a plurality of domain scenes and corresponding domain synonym tables, each domain synonym table is configured to record a plurality of mapping relationships between non-category words and expanded synonyms, the expanded synonym is a synonym generated by combining a category word matching the non-category word with context information of the corresponding domain scene, and the category word is a standard vocabulary in the platform service category system; a context analysis unit configured to calculate, for each extended synonym in the set of extended synonyms, a correlation score between the extended synonym and the query context vector, and obtain a corresponding weighted extended synonym through a weighting process; an extended query generation unit configured to generate an extended query index for searching a match according to each weighted extended synonym and the query keyword.
Citation Information
Patent Citations
Information retrieval method and device
CN103136262A
Query-type expansion method and device, computer device and storage medium
CN108959555A
Scene-based speech recognition method and device
CN118918883A
Information retrieving system and program
JP2003108584A
Retrieval object evaluation device and retrieval object evaluation method
JP2013164687A
Cited By
Industrial digital operation information big data management system
CN121543585A
Enterprise consultation system based on natural language processing
CN121562797A
Text similarity retrieval method and system based on embedded model
CN121597825A